How to search Xiaohongshu notes by keyword with RedNote API
Get normalized Xiaohongshu note records for a keyword search with sort options and cursor pagination
On this page
You have a research brief on coffee for Xiaohongshu and need 30 note records with engagement counts before you commit themes to a content calendar. The job is a keyword search that returns normalized note records, sorted so the comparison is worth making, and read into a table you can annotate
The worksheet is the deliverable. One row per note, carrying the counts the tool returns and a review priority column you fill in yourself. No run has been executed for this guide, so the values below are placeholders that fix the shape rather than results
The deliverable table
The columns come from the note record the search returns, plus one you add
| Column | Source |
|---|---|
noteId | note identifier, the required field on a note |
title | note title |
authorNickname | display name of the note author |
likeCount | number of likes on the note |
commentCount | number of comments on the note |
collectCount | number of times the note was collected |
createdUtc | UTC epoch timestamp in seconds |
type | note type, for example "normal" or "video" |
| Review priority | your column: high, medium or skip |
Filled with placeholders, the sheet looks like this. Values here are placeholders showing the shape
| noteId | title | authorNickname | likeCount | commentCount | collectCount | createdUtc | type | Review priority |
|---|---|---|---|---|---|---|---|---|
| (id) | (title) | (display name) | 0 | 0 | 0 | 0 | normal or video | high, medium or skip |
Set sort to hot when the comparison should start from what the platform treats as hot, or to time when recency is the point. general applies when you send no sort
The input the search takes
Example input:
query: coffee
sort: hotquery is required and takes the keyword from your brief. sort is optional, defaults to general and accepts general, hot or time. cursor is optional and takes the nextCursor value from a previous response
The catalog describes the tool as: "Search RedNote (Xiaohongshu) notes by keyword and return normalized note records with pagination." The contract's input schema lists those three properties, and it does not state that the service accepts nothing else
Reading the note records
The response carries found and data at the top. data wraps a notes array and a nextCursor, and is null when nothing was found. When found is false the response also carries reason with the value not_found, described in the contract as the source stating the target does not exist or returning nothing for it. A found: false answer is a successful call, not an error
Each note requires noteId and can carry title, description, authorNickname, authorRedId, authorUserId, authorImage, image, type, createdUtc, updatedUtc, likeCount, commentCount, collectCount, shareCount and xsecToken. The contract says the descriptive fields are populated whenever the provider has data for the entity
Three fields drive the review decision. likeCount, commentCount and collectCount are integers and give the engagement comparison you came for. createdUtc is a UTC epoch timestamp in seconds, and the contract notes you multiply by 1000 for a JS Date in milliseconds, which matters when the calendar needs a posting window. type separates video notes from normal ones, and a theme that only works as video should be read from video rows
xsecToken is described as the security token required to fetch the note's full detail. When a row earns a high priority, the companion guide on Xiaohongshu note details by id covers that second call
Paging through results
Pagination is the limit to plan around. Pass the returned nextCursor back as cursor to fetch the next page, and read a null nextCursor as the end of that search lane. There is nothing further to continue with at that point
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to search
Xiaohongshu notes for the keyword below. Check the current inputs and
price of anyapi.rednote.search before running anything. Call it with
query "coffee" and sort "hot". Follow nextCursor as cursor for up to two
more pages, and stop when nextCursor is null or when you have 30 rows.
Return a table with noteId, title, authorNickname, likeCount,
commentCount, collectCount, createdUtc, type and an empty review
priority column. Leave cells empty rather than inventing notes or counts.Replace the keyword with your own before running it
Estimated tool cost
Agents call it through POST /v1/runs with toolId anyapi.rednote.search. Prices from the Purrkey catalog, read November 12, 2026, under price revision anyapi-catalog-2026-11-05. The tool is listed as max_call, which the catalog defines as "Maximum per call. Successful runs settle at the actual AnyAPI charge", so the totals below are ceilings rather than settled charges
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Single-page keyword search | calls x max price | $0.012 per call | 1 | $0.012 |
| Three-page keyword scan | calls x max price | $0.012 per call | 3 | $0.036 |
The three-page row assumes you need two more pages after the first. Nothing in the contract states a page size, so treat 30 notes as a planning figure for the scan rather than a promise. Model fees for the agent are not counted
Start with one page
Run the single-page search first at up to $0.012, read the note records, and decide whether the hot or time ordering gives you a comparison worth extending. Then open the RedNote search tool page and run it on your own keyword
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Xiaohongshu.FAQ
How do I search Xiaohongshu notes by keyword?
Call anyapi.rednote.search with the keyword in query, and optionally set sort to general, hot or time. The response returns note records plus a nextCursor for the following page.
What inputs does anyapi.rednote.search take?
The input schema lists query, which is required, plus sort and cursor. sort defaults to general and accepts general, hot or time, and cursor takes a nextCursor from a previous response.
What does a RedNote search response contain?
It contains found and data. data wraps a notes array and a nextCursor, and each note requires noteId and can carry fields such as title, authorNickname, likeCount, commentCount, collectCount, createdUtc and type.
What happens when the search finds nothing?
found is false and reason is not found. The contract says a found false answer is a successful call, not an error.
How do I get the next page of Xiaohongshu notes?
Pass the returned nextCursor back as cursor. A null nextCursor means no more notes for that search lane.
How much does a three-page keyword scan cost?
Three calls at up to $0.012 per call is a ceiling of $0.036. Successful runs settle at the actual AnyAPI charge, and model fees for the agent are not counted.
What does createdUtc mean in the note record?
It is a UTC epoch timestamp in seconds, and the contract says to multiply by 1000 for a JS Date in milliseconds.
Next step
Try this with Xiaohongshu
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.