Xiaohongshu Note Comments Scraper avatar

Xiaohongshu Note Comments Scraper

Pricing

$0.10 / actor start

Go to Apify Store
Xiaohongshu Note Comments Scraper

Xiaohongshu Note Comments Scraper

Fetch the public comment list for a Xiaohongshu note by note_id or share_text. Supports pagination (page 1-10) with cursor + index + pageArea tokens and three sort strategies.

Pricing

$0.10 / actor start

Rating

0.0

(0)

Developer

wang wei

wang wei

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

19 days ago

Last modified

Share

Fetch the public comment list for a Xiaohongshu note by note_id or share_text. Supports cursor-based pagination (page 1–10) with three sort strategies: latest, most liked, or default.

When both note_id and share_text are provided, note_id wins.

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 Keyword Search ScraperJECW4SdwsOOgtuobcstep ① — discover noteIds by keyword
sister Actor / step ②Xiaohongshu Image Note Detail ScraperkP7I5XcMAaLxaYj0Rstep ② — pair with this Actor for the parent note's metadata (title / images / author)
after / step ③Xiaohongshu Video Note Detail ScrapernIGSWsYF5htLotphkstep ② — same, but for the parent video note

You are here: Xiaohongshu Note Comments Scraper (step ③) — run this on its own for pull the full comment thread (cursor-paginated). The other 3 Actors live in their own Apify listings — click their Console links to open them in a new tab.

No Setup Required

No setup required. The upstream API key and base URL are preconfigured in this Actor — no Environment variables to add, no Console setup steps to follow. Just click Start and fill in the input form.

Schema changed? Apify Console caches the input form. Click Reload editor (or hard-refresh) to pick up new fields after a schema bump.

Why Use This Actor

ProblemHow This Actor Solves It
You have a Xiaohongshu note URL and want to monitor or archive the comment thread.Pass the URL as share_text; get a normalized dataset of comments with author, engagement, and timestamps.
You want deeper data than a single page.User-driven pagination: pass the next-page cursor / index / pageArea tokens returned by the previous run.
You want to sort comments differently.Pick latest_v2 (recommended), like_count, or default.

What You Get

A normalized dataset with one row per unique comment:

  • IdentifierscommentId, noteId, targetCommentId (for replies)
  • Contentcontent, publishTime, publishTimeText, ipLocation
  • EngagementlikedCount, subCommentCount, isAuthor, isLiked
  • AuthoruserId, nickname, avatar, plus targetUserNickname for replies
  • Provenancepage, rank, sortStrategy, collectedAt, rawData

Plus a SUMMARY record with the page count, request count, dedup count, and the next-page tokens.

Quick Start

1. Run with Example Input

{
"note_id": "697c0eee000000000a03c308",
"page": 1,
"sort_strategy": "latest_v2"
}

Or paste the full app share text:

{
"share_text": "美食 https://www.xiaohongshu.com/explore/abc?xsec_token=xyz 复制打开",
"page": 1,
"sort_strategy": "latest_v2"
}

2. Paginate to the next page

After the first run, the SUMMARY record contains nextCursor, nextIndex, and nextPageArea. Pass them back as inputs for the next run:

{
"note_id": "697c0eee000000000a03c308",
"page": 2,
"cursor": "<paste nextCursor>",
"index": <paste nextIndex>,
"pageArea": "UNFOLDED",
"sort_strategy": "latest_v2"
}

3. Export Your Results

The dataset is available as a JSON array; the SUMMARY record is in the default key-value store.

Input Reference

note_id — Note ID

RequiredTypeDescription
Optional (one of two)stringXiaohongshu note ID, up to 64 alphanumeric characters. Wins over share_text when both are provided.

share_text — Share text

RequiredTypeDescription
Optional (one of two)stringA Xiaohongshu share link or the full share text from the app. up to 2000 characters; the Actor extracts the first http(s) URL. Use when you don't have the raw note_id.

page — Page number

RequiredTypeDescription
Optionalinteger 1–10Default 1. Each page = one upstream request.

cursor — Pagination cursor

Required (page >= 2)TypeDescription
OptionalstringFrom the previous run's nextCursor. Leave blank for page 1.

index — Comment index

Required (page >= 2)TypeDescription
Optionalinteger ≥ 0From the previous run's nextIndex. Use 0 for the first page.

pageArea — Fold status

Required (page >= 2)TypeDescription
Optionalenum UNFOLDED / FOLDEDDefault UNFOLDED. From the previous run's nextPageArea.

sort_strategy — Sort order

RequiredTypeDescription
Optionalenum latest_v2 / like_count / defaultDefault latest_v2 (recommended for stable pagination). default is not recommended because pagination may skip or duplicate comments.

Output Reference

See "What You Get" above for the full field list. Each row also includes rawData, the unmodified upstream payload, for audit and re-parsing.

Pricing & Limits

  • Free tier: 5 runs/day (each run = up to 10 upstream requests).
  • Paid users: Unlimited runs.
  • Hard caps: 10 pages per run (configurable via MAX_PAGES_HARD_CAP).
  • Note about default sort: default may cause pagination to skip or duplicate comments; prefer latest_v2.

FAQ

  • How do I paginate? After each run, copy nextCursor, nextIndex, and nextPageArea from the SUMMARY, then re-run with page = current + 1 and the new tokens.
  • My free run is blocked? Free tier is 5 runs/day. Upgrade your Apify plan, wait until tomorrow, or set APIFY_USER_IS_PAYING=1.
  • Can I sort by hot / engagement? like_count sorts by likes (desc). default is upstream-default but unstable across pages.
  • What happens if the upstream returns no comments on page 2? The Actor stops and reports the previous page's nextCursor in the SUMMARY, so you don't lose pagination state.
  • Do I need to add an upstream API key? No. This Actor ships with the upstream integration preconfigured — UPSTREAM_API_KEY and UPSTREAM_BASE_URL are baked into the build. No Console setup, no secrets to manage.

Support

Open an issue on the Actor Console page or contact via Discord linked in the upstream SUMMARY.

Actor

Changelog

See ./CHANGELOG.md.