Social media5 min readBy Purrkey teamUpdated

How to compare Xiaohongshu note engagement by keyword

Search Xiaohongshu notes by keyword and compare returned engagement counts across cursor pages

On this page

You have 30 Xiaohongshu notes to scan for the keyword coffee, across the general, hot and time sort lanes and up to three cursor pages per lane, and a content brief waiting on a shortlist of note angles and creators

anyapi.rednote.search is the call that fills the shortlist. The catalog describes it as a search over RedNote (Xiaohongshu) notes by keyword that returns normalized note records with pagination. Nothing in this article has been run, so the tables below are a design, not a result

The shortlist table and an example keyword

The input is one keyword. Example: coffee. Replace it with the keyword from your brief

Design the sheet with one row per note per lane:

sortnoteIdtitleauthorNicknamelikeCountcommentCountcollectCountshareCountcreatedUtc
general(note id)(note title)(display name)0000(epoch seconds)

Values here are placeholders showing the shape. The sort column records which sort value produced the row, so a reader can tell a hot-lane note from a time-lane note. If you want one row per note instead of one row per note per lane, drop duplicates on noteId and keep the lane you care about

Two more output fields belong in a side column rather than the shortlist: xsecToken, which the contract calls the security token required to fetch a note's full detail, and type, which it gives as "normal" or "video"

Inputs the search takes

query is required and is the keyword to search for, with a minimum length of 1

sort is optional and defaults to general. The enum is general, hot or time. Three lanes means three calls with the same query and a different sort value

cursor is optional, has a minimum length of 1, and comes from nextCursor in the previous response. Leave it out on the first call of a lane

The endpoint listed in the price block is called through POST /v1/runs with toolId anyapi.rednote.search. The contract's input block lists query, sort and cursor for this tool, and a catalog revision can change the shape of a request, so read the current contract before you script a batch

Read the fields that drive a keep or drop

found is a boolean: true when matching notes were found, false when the search returned nothing. When found is false, reason appears with the value not_found, and the contract calls that a successful call, not an error

data wraps notes and nextCursor, or is null when nothing was found. data.notes is the array you flatten into shortlist rows. The counts behind engagement comparison are likeCount, commentCount, collectCount and shareCount, plus createdUtc in UTC epoch seconds; multiply by 1000 for a JS Date in milliseconds

The counts arrive as raw integers. A ranking rule such as a collect-to-like ratio or a minimum commentCount is your own arithmetic on those fields, not a verdict the tool returns

Paging limit that sets your stop rule

nextCursor is opaque. Pass it back as cursor unchanged, and it is null when that lane has no more notes. That null is the stop signal for the lane

Set the three-page cap in the prompt as well, because the cap is a planning choice rather than a tool limit. A lane that still holds a non-null cursor after page three is cut off by your rule, not by the search

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to search Xiaohongshu
notes for the keyword coffee in three sort lanes: general, hot and time.
Check the current inputs and price of anyapi.rednote.search before running
anything. For each lane, call the tool with query "coffee" and that sort
value, then follow data.nextCursor as cursor for up to three pages per
lane. Stop a lane when data.nextCursor is null. Return a table with
sort, noteId, title, authorNickname, likeCount, commentCount,
collectCount, shareCount and createdUtc, one row per note per lane. Do not
invent note IDs and do not fetch note detail pages.

Replace the keyword and the three-lane scope with your own before running. Keep the first pass to the general lane so you can see the row shape before the hot and time lanes add calls

Estimated tool cost

Prices read from the Purrkey catalog on November 13, 2026. The unit is max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." Totals below are ceilings, not settled charges

StepFormulaUnit pricePlanned quantityTotal
Single keyword, first page1 call x max price$0.012 per call1$0.012
Three-page cursor scan, one lane3 calls x max price$0.012 per call3$0.036
Three-page scan, three lanes9 calls x max price$0.012 per call9$0.108

Call count is set by pages, not by notes, so the three-page cap is what bounds the spend on a 30-note target. Model fees for the agent are not counted

Start with one lane

Run general first and read the rows before spending on the hot and time lanes. The tool page is Xiaohongshu search. When the shortlist needs a note's body or full detail, carry the xsecToken into the note-by-id guide

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.
Explore Xiaohongshu tools and pricing

FAQ

How do I compare Xiaohongshu note engagement by keyword?

Run the keyword through anyapi.rednote.search once per sort lane, then put likeCount, commentCount, collectCount and shareCount into one table with a sort column. The search returns paginated note records, and each page is a separate call.

What inputs does anyapi.rednote.search take?

query is required and is the keyword to search for. sort is optional, defaults to general and accepts general, hot or time. cursor is optional and comes from nextCursor in the previous response.

What does nextCursor mean in the response?

It is an opaque cursor for the next page of notes, and it is null when that lane has no more. Pass it back as cursor unchanged to continue paging.

How much does it cost to scan three pages across three sort lanes?

At most $0.108: 9 calls at the listed $0.012 per call, which is a max_call ceiling. Successful runs settle at the actual AnyAPI charge, so the settled cost can be lower.

Why did the search return found false?

found is false when the search returned nothing, and reason then holds not_found. The contract calls that a successful call, not an error.

What is xsecToken used for?

The contract says it is the security token required to fetch the note's full detail. The search record carries it alongside the engagement counts.

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.

See Xiaohongshu tools

Share this article