Xiaohongshu Keyword Search Scraper avatar

Xiaohongshu Keyword Search Scraper

Pricing

$0.10 / actor start

Go to Apify Store
Xiaohongshu Keyword Search Scraper

Xiaohongshu Keyword Search Scraper

Search Xiaohongshu(小红书) notes by keyword. Filter by sort order, note type, and publishing time with automatic pagination.

Pricing

$0.10 / actor start

Rating

0.0

(0)

Developer

wang wei

wang wei

Maintained by Community

Actor stats

0

Bookmarked

9

Total users

6

Monthly active users

8 days ago

Last modified

Categories

Share

Search public Xiaohongshu (Little Red Book / REDnote / 小红书) notes by one keyword per run and export structured results to an Apify Dataset. Built for marketers, content teams, e-commerce operators, and researchers who need reliable Xiaohongshu data without scraping infrastructure.

Use it together with the other Xiaohongshu Actors

This Actor is one piece of a 4-piece Xiaohongshu toolkit. Run them in sequence to go from a topic, to a single note detail, to its comment thread.

Where in the pipelineActorConsoleUse it to
before / step ①Xiaohongshu Image Note Detail ScraperkP7I5XcMAaLxaYj0Rstep ② — feed it any noteId from your search output to get the full image-note payload
sister Actor / step ②Xiaohongshu Video Note Detail ScrapernIGSWsYF5htLotphkstep ② — same, but for video notes (returns playback URLs + duration)
after / step ③Xiaohongshu Note Comments ScraperLNXEA0uuHX70vchNWstep ③ — once you have a note, pull the comment thread (paginated)

You are here: Xiaohongshu Keyword Search Scraper (step ① (start here)) — run this on its own for find notes by keyword. The other 3 Actors live in their own Apify listings — click their Console links to open them in a new tab.

What this Xiaohongshu scraper does

  • 🔎 Search Xiaohongshu by keyword — one search query, up to 20 unique notes returned.
  • 📊 Structured Xiaohongshu data — note ID, title, description, note type, engagement metrics, author profile, cover image, and a shareable noteUrl.
  • 🧹 Deduplicated output — duplicate note IDs are removed automatically.
  • 📦 Raw payload preserved — every record keeps the original upstream response under rawData for downstream pipelines.
  • 📈 Run-level summarySUMMARY includes quota usage, source request count.
  • 💸 Free tier friendly — 5 runs per day for free Apify users; no setup or API key required.

Xiaohongshu Keyword Search Scraper — Input

{
"keyword": "美食推荐",
"page": 1,
"sortType": "general",
"noteType": "不限",
"timeFilter": "不限"
}

Input fields

FieldRequiredDefaultDescription
keywordYes美食推荐One Xiaohongshu search keyword, max 100 characters (e.g. 美食推荐, 护肤, 东京旅游)
pageNo1Page number, between 1 and 10. Each page triggers one upstream request (page=3 = 3 requests). See Pagination below.
searchIdWhen page >= 2""Pagination token from a previous run. Copy from the previous SUMMARY field nextSearchId (or from the first Dataset item's rawData.search_id). Leave blank for page 1.
searchSessionIdWhen page >= 2""Pagination token from a previous run. Copy from the previous SUMMARY field nextSearchSessionId (or from the first Dataset item's rawData.search_session_id). Leave blank for page 1.
sortTypeNogeneralSort order: general (Xiaohongshu default), time_descending (latest), popularity_descending (most liked), comment_descending (most commented), collect_descending (most collected), english_preferred (English-first)
noteTypeNo不限Note type filter: 不限 (all), 视频笔记 (video only), 普通笔记 (image only), 直播笔记 (live only)
timeFilterNo不限Publish-time filter: 不限 (all time), 一天内 (within 24 hours), 一周内 (within 7 days), 半年内 (within 6 months)

The Actor is locked to one keyword per run (use multiple runs for different keywords). The page field controls how many pages — and therefore how many upstream requests (a request) — one run performs. The three filter fields map 1:1 to upstream query parameters; leaving them at their defaults is identical to Xiaohongshu's default search page.

Pagination

The Actor follows Xiaohongshu's pagination protocol: every page after the first needs the opaque search_id / search_session_id tokens that the upstream returned on the previous page.

How to paginate (two-step pattern)

Step 1 — First page (always works without tokens):

{
"keyword": "美食推荐",
"page": 1,
"sortType": "popularity_descending"
}

After this run, read the Apify Key-Value Store entry SUMMARY — it contains:

{
"ok": true,
"pagesFetched": 1,
"requests": 1,
"nextSearchId": "PASTE_THIS_INTO_searchId",
"nextSearchSessionId": "PASTE_THIS_INTO_searchSessionId",
"hasMoreInSource": true
}

If hasMoreInSource is true, more pages exist.

Step 2 — Subsequent pages (must include both tokens):

{
"keyword": "美食推荐",
"page": 2,
"searchId": "<paste nextSearchId from Step 1>",
"searchSessionId": "<paste nextSearchSessionId from Step 1>"
}

Each call to page=N walks N pages forward. If page=5 is requested but hasMore becomes false after page 3, the Actor stops and the SUMMARY's pagesFetched will be 3, not 5.

Cost & quota

  • Cost: each page costs the same as a single request — see the Apify Actor pricing model.
  • Free Apify users: 5 runs per day, regardless of pages per run. A page=5 run consumes 1 quota slot.
  • Paid Apify users: unlimited runs and unlimited pages.
  • Maximum pages per run is 10 (input cap, validator rejects page > 10).

Why pagination tokens are opaque

Xiaohongshu's app API generates a fresh pagination token pair for every search session; the Actor must forward these exact tokens to fetch the next page. There is no way to derive them from the keyword alone. Treat them like a session cookie: copy from the previous run's SUMMARY and pass back unchanged.

What you get in the Apify Dataset

Each Dataset item is one Xiaohongshu note with the following fields:

  • Query lineagekeyword, page, rank, collectedAt
  • Xiaohongshu note identifiersnoteId, xsecToken, noteUrl
  • Contenttitle, description, noteType, coverUrl
  • EngagementlikedCount, collectedCount, commentCount, sharedCount
  • AuthoruserId, nickname, avatar
  • Raw upstream response — full rawData object for any custom downstream processing

Free tier and pricing

TierDaily runsPer runNotes
Free Apify users5 runs / dayUp to 20 unique notesQuota enforced via Actor KV store
Paid Apify users (APIFY_USER_IS_PAYING=1)UnlimitedUp to 20 unique notesNo quota gate inside the Actor

Quota is per calendar day (UTC). Runs 1-5 succeed; run 6+ on the free tier fails fast with Free tier limit reached and writes a SUMMARY.ok=false record so you can detect the rejection programmatically.

How to use the Xiaohongshu scraper

  1. Open the Actor page on Apify.
  2. Type one Xiaohongshu keyword (Chinese, English, or any language) into the keyword field.
  3. Optionally pick a sortType, noteType, or timeFilter — see Common filter recipes below for ready-made combos. All three default to Xiaohongshu's standard search page.
  4. Set page to the number of pages you want (default 1, max 10). Each page = one upstream request.
  5. If page >= 2, paste searchId and searchSessionId from the previous run's SUMMARY (see Pagination above).
  6. Click Start. The Actor searches Xiaohongshu and writes results to the run's Dataset in seconds.
  7. Download the Dataset as JSON, CSV, or Excel, or pipe it into another Apify Actor.

Common filter recipes

GoalInput combination
Trending video posts from the last weekkeyword: "美食推荐", noteType: "视频笔记", timeFilter: "一周内", sortType: "popularity_descending"
Latest image notes onlykeyword: "护肤", noteType: "普通笔记", sortType: "time_descending"
24-hour hot list, any typekeyword: "东京旅游", timeFilter: "一天内", sortType: "popularity_descending"
Most-discussed videos this half-yearkeyword: "健身", noteType: "视频笔记", timeFilter: "半年内", sortType: "comment_descending"
English-first discoverykeyword: "Tokyo travel", sortType: "english_preferred"

Leaving every filter at its default reproduces Xiaohongshu's standard search page — the most common usage. Combine any recipe with page=2..10 plus the previous run's pagination tokens for deeper coverage.

Use cases

  • Xiaohongshu keyword research for content marketing and SEO.
  • Trend monitoring on Xiaohongshu by recurring keyword searches.
  • Competitor note collection for benchmark studies.
  • Influencer and KOL discovery through author metadata.
  • E-commerce sourcing for trending product mentions on Xiaohongshu.
  • Academic and market research on Chinese social media content.

Limitations

  • Exactly one keyword and one upstream request per run. Multi-keyword batch runs and pagination are intentionally disabled to keep the free tier predictable.
  • Field availability depends on the data returned by Xiaohongshu for the given search.
  • Search rankings and available notes may change between runs.
  • Use the data responsibly and comply with applicable laws and Xiaohongshu's terms of service.

FAQ

Is this an official Xiaohongshu API? No. This Actor is a third-party Xiaohongshu scraper built on top of an independent data source. It is not affiliated with, endorsed by, or connected to Xiaohongshu.

Do I need to bring my own API key or pay for Xiaohongshu data? No. The Actor is fully managed. You only need an Apify account.

Can I scrape multiple keywords in one run? Not in this Actor. Run the Actor once per keyword. To automate batches, chain it with another Apify Actor such as the Apify Scheduler or a workflow tool.

Why are the results limited to 20 notes per run? Each run performs exactly one upstream request, and the upstream returns roughly 20 notes per page. The cap matches real upstream capacity and keeps the Actor affordable for casual users. Paid users can still get more coverage by running the Actor multiple times with different keywords.

How do I paginate to get more than one page of results? Run the Actor with page=1 first. After it finishes, open the Apify Key-Value Store entry SUMMARY and copy the nextSearchId / nextSearchSessionId values. Then run again with page=2 and paste those two values into searchId and searchSessionId. Repeat for page=3, etc. See the Pagination section above for the full pattern.

How many pages can I fetch in one run? Up to 10 pages (the page field caps at 10). The Actor stops early if upstream returns hasMore=false or an empty page — the SUMMARY's pagesFetched field reports the actual count.

How is the free-tier quota counted? Each Actor run — successful or not — consumes one quota slot. Quota resets every day at 00:00 UTC.

If you are looking for a way to scrape Xiaohongshu, search Xiaohongshu notes by keyword, run a Xiaohongshu search scraper, or pull a Xiaohongshu dataset for analysis, this Actor is the simplest starting point. The output JSON is schema-stable, so you can build downstream pipelines (Python, Node.js, Sheets, Airtable, Notion) without parsing the raw Xiaohongshu HTML.