Xiaohongshu Comments and Reply Threads Scraper avatar

Xiaohongshu Comments and Reply Threads Scraper

Pricing

from $2.16 / 1,000 comment or replies

Go to Apify Store
Xiaohongshu Comments and Reply Threads Scraper

Xiaohongshu Comments and Reply Threads Scraper

Extract Xiaohongshu (RedNote) comments and the replies shown under them from note URLs, share links or IDs: text, author, likes, time, IP region, pictures, parent/reply links and incomplete-thread flags. No login.

Pricing

from $2.16 / 1,000 comment or replies

Rating

0.0

(0)

Developer

Automation Lab

Automation Lab

Maintained by Community

Actor stats

0

Bookmarked

6

Total users

2

Monthly active users

13 days ago

Last modified

Features

Limited permissions

Share

Collect every comment on a Xiaohongshu (小红书 / RedNote) note — with the replies Xiaohongshu shows under each one — from a note link, an xhslink.com share link or a bare note ID. Each comment and reply becomes its own row with text, author, likes, posting time, IP region, attached pictures, @-mentions and clean parent/reply links. No login, no cookies and no xsec_token needed.

Built for consumer-insight, brand and China-market teams who need what real users say under product reviews, launches and creator posts — in a flat table that loads straight into a spreadsheet, BI tool or sentiment model.

What does Xiaohongshu Comments and Reply Threads Scraper do?

You paste one or more Xiaohongshu notes. The Actor opens Xiaohongshu's public mobile website anonymously, reads the note's comment feed page by page (20 top-level comments per page) until the end of the thread or your limit, and saves:

  • 💬 Every top-level comment of the note, in the order Xiaohongshu serves them.
  • ↩️ Replies as their own rows — the replies Xiaohongshu shows under each comment (up to 3), linked to their thread with parentId, rootCommentId and replyToId.
  • 🧵 Thread completeness — every comment row has the true replyCount, the number of replies saved and a repliesIncomplete flag, so you always know which threads have more replies than were collected.
  • 👤 Author details — public user ID, nickname, avatar, profile link and Xiaohongshu's AI-agent flag.
  • ❤️ Likes as a number (display values such as 1.2万 are converted) and exactly as shown.
  • 📍 IP region — the province or country Xiaohongshu shows next to each comment.
  • 🖼 Pictures and mentions — original-size links of images attached to comments, and every @-mentioned user.

Who is it for?

WhoWhat they use Xiaohongshu comments for
Consumer insight and CX teamsProduct feedback, complaints and feature requests under review notes
Brand and social listening teamsReactions to launches, campaigns and KOL posts, by region
China market researchersUnfiltered opinions grouped by the commenter's province
Influencer and agency managersWhether a sponsored post's comments are real engagement
Data scientistsChinese-language comment datasets for sentiment, topic and intent models

Why use this scraper?

  • No account needed. It reads the public mobile comment feed anonymously, so you never risk your own Xiaohongshu account and never paste cookies.
  • Any link format. Full note URLs (with or without xsec_token), /discovery/item/ links, xhslink.com share links, the whole share text copied from the app, or a bare 24-character ID.
  • Analysis-ready threads. Normalized parent/child rows with a stable threadKey (noteId:rootCommentId) and stable comment IDs — easy to join, deduplicate and load incrementally on a schedule.
  • Honest completeness. Incomplete threads are flagged instead of silently cut, and a per-note RUN_SUMMARY tells you why each note stopped.
  • Fast and cheap to run. A 400-comment viral note finishes in well under a minute.

What data can you extract from Xiaohongshu comments?

FieldDescription
recordTypecomment (top-level) or reply
noteId, noteUrlThe note the comment belongs to
commentIdStable ID of this comment or reply
rootCommentId, parentIdTop-level comment of the thread; parentId is null on comment rows
replyToId, replyToUserId, replyToNicknameWhich comment or reply a reply answers, and its author
threadKey, positionnoteId:rootCommentId and the order within the note or thread
textComment text, including Xiaohongshu emoji codes such as [笑哭R]
authorId, authorNickname, authorAvatarUrl, authorProfileUrl, authorIsAiAgentPublic author details
createdAt, createdAtTimestampPosting time (ISO 8601 UTC and Unix ms)
likeCount, likeCountTextLikes as a number and as displayed
ipLocationRegion shown by Xiaohongshu (Chinese), e.g. 广东, 美国
picturesOriginal-size image URLs attached to the comment
mentions@-mentioned users: userId, nickname, profileUrl
replyCount, repliesReturned, repliesIncompleteTrue reply total, replies saved, and whether more exist
noteCommentCount, noteTopLevelCommentCountTotals Xiaohongshu reports for the note
scrapedAtCollection time

How much does it cost to scrape Xiaohongshu comments?

This Actor uses pay-per-event pricing: a small fee when a run starts plus a fee for each saved row (each top-level comment and each reply is one row). You only pay for rows you get.

EventFree planBronzeSilverGold and above
Run start (once per run)$0.005$0.005$0.005$0.005
Comment or reply row$0.0041354$0.003596$0.0028049$0.0021576

Examples at Bronze prices:

  • 100 rows (one typical note): $0.005 + 100 × $0.003596 ≈ $0.37
  • 1,000 rows (a few busy notes): ≈ $3.60
  • 10,000 rows (a scheduled brand watch): ≈ $35.97

Notes with no comments, invalid inputs and failed notes produce no rows and cost nothing beyond the run start. Use Max rows in total to cap spend per run; Apify's maximum cost per run setting is also respected. When the maximum cost is reached mid-thread, the last comment keeps only the replies that fit, its repliesReturned/repliesIncomplete match what was saved, and notes not reached are listed as not-attempted in RUN_SUMMARY.

How to scrape Xiaohongshu comments

  1. Open the Actor and paste your notes into Note URLs, share links or IDs — one per line.
  2. Set Max top-level comments per note (0 reads the whole thread).
  3. Keep Include replies on if you want reply rows, and choose how many (1–3) per comment.
  4. Optionally set Max rows in total as a budget cap.
  5. Click Start. Download the results as JSON, CSV, Excel or XML, or read them through the API.

Input

FieldTypeDefaultWhat it does
noteUrlsarray of strings—Note URLs, xhslink.com share links, share text, or 24-character note IDs. Duplicates are read once.
maxCommentsPerNoteinteger100Top-level comments per note; replies are not counted. 0 = all.
includeRepliesbooleantrueSave the replies shown under each comment as separate rows.
maxRepliesPerCommentinteger 1–33Replies to keep per comment when replies are on.
maxResultsinteger1000Total rows (comments + replies) across all notes.
proxyConfigurationobjectoffOptional Apify Proxy; not needed normally.

Example input:

{
"noteUrls": [
"https://www.xiaohongshu.com/explore/6ae45c88000000001200dd79",
"http://xhslink.com/o/1jhV61MlNNc",
"69db721a00000000220290a8"
],
"maxCommentsPerNote": 0,
"includeReplies": true,
"maxRepliesPerComment": 3,
"maxResults": 2000
}

Output example

A top-level comment and the reply under it (real rows from a test run):

[
{
"recordType": "comment",
"noteId": "6ae45c88000000001200dd79",
"noteUrl": "https://www.xiaohongshu.com/explore/6ae45c88000000001200dd79",
"commentId": "6ae5c0d400000000010097a0",
"rootCommentId": "6ae5c0d400000000010097a0",
"parentId": null,
"replyToId": null,
"replyToUserId": null,
"replyToNickname": null,
"threadKey": "6ae45c88000000001200dd79:6ae5c0d400000000010097a0",
"position": 1,
"text": "很有气质!一看就是hin有💰的贵妇[喝奶茶R]",
"authorId": "5f44f1c000000000010072a2",
"authorNickname": "婷婷玉玉",
"authorAvatarUrl": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31lofva905m605nq4u7008sl241talug?imageView2/2/w/120/format/jpg",
"authorProfileUrl": "https://www.xiaohongshu.com/user/profile/5f44f1c000000000010072a2",
"authorIsAiAgent": false,
"createdAt": "2026-10-31T10:20:05.000Z",
"createdAtTimestamp": 1793442005000,
"likeCount": 0,
"likeCountText": "0",
"ipLocation": "广东",
"pictures": [],
"mentions": [],
"replyCount": 1,
"repliesReturned": 1,
"repliesIncomplete": false,
"noteCommentCount": 50,
"noteTopLevelCommentCount": 41,
"scrapedAt": "2026-11-01T07:15:23.542Z"
},
{
"recordType": "reply",
"noteId": "6ae45c88000000001200dd79",
"noteUrl": "https://www.xiaohongshu.com/explore/6ae45c88000000001200dd79",
"commentId": "6ae5c9880000000014002186",
"rootCommentId": "6ae5c0d400000000010097a0",
"parentId": "6ae5c0d400000000010097a0",
"replyToId": "6ae5c0d400000000010097a0",
"replyToUserId": "5f44f1c000000000010072a2",
"replyToNickname": "婷婷玉玉",
"threadKey": "6ae45c88000000001200dd79:6ae5c0d400000000010097a0",
"position": 1,
"text": "哈哈哈哈哈哈哈哈笑鼠 看来这个项链很衬人!",
"authorId": "62b982a000000000190297d8",
"authorNickname": "月亮不亮",
"authorAvatarUrl": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo317tnnckugq005olpgag6d5uours7r3o?imageView2/2/w/120/format/jpg",
"authorProfileUrl": "https://www.xiaohongshu.com/user/profile/62b982a000000000190297d8",
"authorIsAiAgent": false,
"createdAt": "2026-10-31T10:57:13.000Z",
"createdAtTimestamp": 1793444233000,
"likeCount": 0,
"likeCountText": "0",
"ipLocation": "浙江",
"pictures": [],
"mentions": [],
"replyCount": null,
"repliesReturned": null,
"repliesIncomplete": false,
"noteCommentCount": 50,
"noteTopLevelCommentCount": 41,
"scrapedAt": "2026-11-01T07:15:23.542Z"
}
]

The run's key-value store also holds RUN_SUMMARY: for every distinct input (duplicates of the same note are listed once), the resolved note ID, status, comments and replies saved, the note's totals and why it stopped.

statusMeaning
okComments were read until the thread ended or a cap was reached (see stoppedBy)
no-commentsXiaohongshu returned an empty feed for the note
incompleteXiaohongshu said more comments exist but its feed stopped advancing; the saved rows are kept and error explains what happened
not-attemptedThe run stopped before reaching this note (stoppedBy gives the reason); run it again to collect it
invalid-inputThe line was not a note link or ID
failedThe note could not be read; error has the reason

stoppedBy is one of end-of-thread, maxCommentsPerNote, maxResults (your row cap), maxTotalChargeUsd (the run's maximum cost was reached), upstream-stalled or session-exhausted (Xiaohongshu kept refusing the anonymous session).

Tips and limits

  • Replies: Xiaohongshu's public mobile page shows at most 3 replies under each comment. Full reply threads need a logged-in account, which this Actor never uses. Use replyCount and repliesIncomplete to see where more replies exist.
  • Order: top-level comments come in the order Xiaohongshu's mobile page serves them (pinned and popular comments first, then newer ones). There is no sort option.
  • Empty notes: a note with no comments, a deleted or private note, and a mistyped ID all return zero rows and are marked no-comments in RUN_SUMMARY.
  • Invalid lines (not a note link or ID) are skipped and listed as invalid-input; if no line is usable the run fails with a clear message.
  • Incremental loads: commentId and threadKey are stable, so you can upsert rows from repeated runs.
  • IP region is what Xiaohongshu displays, not a precise location.
  • If Xiaohongshu refuses the anonymous session, the Actor retries with a fresh session (and a fresh proxy IP when a proxy is set) before marking the note failed.

Integrations

  • Google Sheets / Excel: export the dataset as CSV or connect the Google Sheets integration to append new comments after each run.
  • Scheduled brand monitoring: create a Schedule that runs daily on your watch-list notes and upsert rows by commentId in your database.
  • Sentiment and topic analysis: send the dataset to a webhook, Make, Zapier or n8n flow that runs a Chinese sentiment model on text and groups results by ipLocation.
  • Data warehouses: load the JSON into BigQuery, Snowflake or Postgres; use threadKey to rebuild conversations.

Use the Actor through the API

cURL

curl -X POST "https://api.apify.com/v2/acts/automation-lab~xiaohongshu-comments-reply-threads-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"noteUrls":["6ae45c88000000001200dd79"],"maxCommentsPerNote":50}'

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('automation-lab/xiaohongshu-comments-reply-threads-scraper').call({
noteUrls: ['https://www.xiaohongshu.com/explore/6ae45c88000000001200dd79'],
maxCommentsPerNote: 0,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((row) => row.repliesIncomplete).length, 'threads have more replies');

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("automation-lab/xiaohongshu-comments-reply-threads-scraper").call(
run_input={"noteUrls": ["69db721a00000000220290a8"], "maxCommentsPerNote": 0}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["recordType"], row["ipLocation"], row["text"])

Use with AI agents via MCP

Connect the Actor to Claude, Cursor or another MCP client through Apify's hosted MCP server.

Claude Code:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/xiaohongshu-comments-reply-threads-scraper"

Claude Desktop, Cursor or VS Code (JSON config):

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/xiaohongshu-comments-reply-threads-scraper"
}
}
}

Selecting this Actor also adds Apify's run and storage helper tools (get-actor-run, get-dataset-items, get-key-value-store-record, abort-actor-run), so the server exposes more than one tool. List the tools first and use only the ones you need. A reliable agent workflow:

  1. Start one run and keep its run ID. call-actor waits at most 45 seconds (waitSecs, default 30), so a large note may still be running when it returns. Keep the returned run ID and defaultDatasetId; they are metadata, not results.
  2. Follow that same run. If it is not finished, call get-actor-run for the same run ID with short backoff (for example 2, 4, 8, then every 10 seconds) and a fixed overall deadline (for example 120 seconds). Set the client request timeout above the server wait. If the client times out, check the known run instead of starting a new one. At the deadline, report the run as still running with its ID and stop polling. If the run failed, say so. Any rows it saved are a partial result, not a full one.
  3. Read a bounded slice of results. Call get-dataset-items with the dataset ID, limit: 20, an offset starting at 0, and only the fields you need (for example recordType,commentId,parentId,text,likeCount,ipLocation,repliesIncomplete). Stop at 100 rows or 64 KiB of serialized JSON in the model's context, whichever comes first. If your client can inspect a response before it reaches the model, drop or summarize an oversized page and say so. If it cannot, do not claim a hard byte limit and keep limit small.
  4. Report what you returned. State how many rows you read, the next offset if more exist, and whether the result is partial. For per-note completeness, read the RUN_SUMMARY record with get-key-value-store-record and pass on any incomplete, not-attempted or failed notes. Keep full exports (CSV, Excel, JSON) in Apify storage or a downstream tool instead of the model's context.

These deadlines and budgets are example choices for an agent, not Apify defaults, and they do not limit what the Actor collects.

Example prompts:

This Actor only reads comments that Xiaohongshu shows publicly to anonymous visitors of its mobile website; it does not log in or bypass access controls. Comments contain personal data (nicknames, user IDs, avatars, regions), so make sure you have a legitimate purpose, follow applicable data protection laws such as GDPR and China's PIPL, minimize what you keep, and respect Xiaohongshu's terms. If in doubt, ask your legal team. This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by Xiaohongshu or RedNote. Results are stored only in your own Apify run storage and follow your account's retention settings. Read more in Apify's guide to the legality of web scraping.

Error reporting

Failed runs report sanitized diagnostic input, Actor/build/run IDs and exceptions to our private GlitchTip error tracker so we can fix problems quickly. Secret fields and URL query strings are removed. Reports are kept for 30 days.

FAQ

Do I need a Xiaohongshu account, cookies or the xsec_token? No. The Actor reads the public mobile comment feed anonymously; a bare note ID is enough.

Why are there only up to 3 replies per comment? That is what Xiaohongshu's public mobile page shows. Every comment row carries the real replyCount and a repliesIncomplete flag, so you can see where more replies exist.

My note returned no rows. What happened? Check RUN_SUMMARY. no-comments means Xiaohongshu returned an empty feed — the note has no comments yet, was deleted or made private, or the ID is mistyped. invalid-input means the line was not a note link or ID.

A run failed with "kept refusing the anonymous mobile session". What should I do? Xiaohongshu occasionally rejects a session. Run again; if it repeats, turn on Apify Proxy in Proxy configuration so each retry gets a fresh IP.

Can I monitor notes for new comments? Yes. Schedule the Actor and upsert rows by commentId; new comments get new IDs.