RedNote (Xiaohongshu) Comments Scraper
Pricing
from $5.00 / 1,000 results
RedNote (Xiaohongshu) Comments Scraper
Scrape every comment on a RedNote / Xiaohongshu (小红书) note: text, author, likes, IP location, timestamps, and nested-reply samples. Paste the note URL (xsec_token auto-captured) plus your web_session cookie. Paginates the full thread. Chinese counts parsed to numbers.
Pricing
from $5.00 / 1,000 results
Rating
0.0
(0)
Developer
Muhamed Didovic
Maintained by CommunityActor stats
0
Bookmarked
15
Total users
15
Monthly active users
an hour ago
Last modified
Categories
Share
Pull the full comment thread of any 小红书 note — comment text, author, likes, IP location, timestamps, and samples of nested replies — as clean JSON rows.
Xiaohongshu gates its comments API behind login. With your web_session cookie the actor signs every request through Xiaohongshu's own web signing (x-s / x-t) in a headless page, seeds page 1 from the note page itself, then paginates the comment API until your page or item cap. Without a cookie it returns a preview: the first comment batch Xiaohongshu shows a guest (about 5 top-level comments with their replies), read from the mobile share page with no login at all.
No cookie? The rest of the RedNote suite needs none. Note Detail, User Profile, Trending & Category Feed, and Product all run with no login. Comments and keyword search are the only two operations Xiaohongshu locks behind a logged-in session.
What you get per comment
| Field | Description |
|---|---|
accessMode | full for a cookie-backed paginated crawl, preview for the guest first batch |
commentId | Comment ID |
content | Comment text |
likeCount / likeCountNum | Likes as shown (e.g. 1.2万) and parsed to a number (12000) |
ipLocation | Commenter's displayed IP region (e.g. 上海) |
createdAt | ISO timestamp |
userId, userName, userAvatar | Commenter profile |
subCommentCount | Number of replies under this comment |
subCommentsSample | Up to 5 nested replies: text, author, likes, IP location |
How to run it
- Copy a note URL from Xiaohongshu (e.g.
https://www.xiaohongshu.com/explore/<id>?xsec_token=…) and paste it as the input — thexsec_tokenis captured from the URL automatically. - For the full thread, log in at xiaohongshu.com, open DevTools → Application → Cookies, copy the
web_sessionvalue, and paste it into the cookie field (marked secret, never logged). Skip this step for a preview of the first comments. - Set
maxPages(~15–20 comments per page) and run.
Example input
{"noteId": "https://www.xiaohongshu.com/explore/644a3e3c00000000130085a0?xsec_token=ABw5H7OmT061JPr1RF2mmIQQ4v5auTThBae2wAf3wo17k=&xsec_source=pc_feed","maxPages": 5,"webSession": "<your web_session value>"}
FAQ
Do I need a cookie? Not for a preview. Xiaohongshu shows a guest only the first batch of comments (about 5 top-level comments with up to 3 replies each), and that is what a run without a cookie returns, with rows marked accessMode: "preview". Every comment API answers a login wall to a guest, so the full paginated thread needs your web_session. An expired cookie fails fast with a clear message instead of burning your budget on doomed requests.
Where do I find notes to scrape? Use the RedNote Search Scraper — every search row includes the note URL + xsec_token ready to paste here.
Does it get every nested reply? Each comment row carries its subCommentCount plus a sample of up to 5 replies with text, author, likes, and IP location.
Related scrapers
- RedNote Search Scraper — keyword search, feeds this actor
- RedNote Note Detail Scraper — the note itself, no login needed
- Xiaohongshu (RedNote) Scraper — the all-in-one actor: 8 operations including user profiles, channel feeds, and mall products
🤖 For AI Agents & LLM Apps
Compact reference for AI agents calling this actor via the Apify MCP server or the Apify API (actor: memo23/rednote-comments-scraper).
Purpose: Paginates the full comment thread of one Xiaohongshu (RedNote / 小红书) note into JSON rows — comment text, author, likes, IP location, timestamps, and samples of nested replies.
Minimal input:
{"noteId": "https://www.xiaohongshu.com/explore/644a3e3c00000000130085a0?xsec_token=ABw5H7OmT061JPr1RF2mmIQQ4v5auTThBae2wAf3wo17k=&xsec_source=pc_feed","webSession": "<your web_session cookie value>","maxPages": 2,"maxItems": 30}
Cookie-free preview: send only noteId (and maxItems).
Output: one dataset row per comment; key fields: accessMode, commentId, content, likeCount, likeCountNum, ipLocation, createdAt, userId, userName, userAvatar, subCommentCount, subCommentsSample (up to 5 nested replies: text, author, likes, IP location).
Behaviors an agent should know:
webSessionis optional. Without it the run returns a preview: the first comment batch Xiaohongshu shows a guest (about 5 top-level comments with replies), rows markedaccessMode: "preview", no pagination. With a valid logged-inweb_sessioncookie the run paginates the full thread (accessMode: "full"). An expired cookie fails fast with a clear message.webSessionis marked secret and never logged.- Always set
maxItems(and/ormaxPages, ~15–20 comments per page) to cap output; uncapped runs paginate the whole thread. - Pass the full note URL as
noteId; thexsec_tokenis extracted from it automatically. For a bare 24-hex ID, supplyxsecTokenseparately. - Find notes to feed in with the RedNote Search Scraper — each search row includes the note URL +
xsec_token. - Billing: Pay-per-event billing — see the Pricing tab on the actor page.
⚠️ Disclaimer
This actor collects publicly displayed data from Xiaohongshu for legitimate research, marketing, and archival purposes. You are responsible for complying with applicable laws, Xiaohongshu's terms, and for the account whose cookie you supply. Do not use collected data for spam or harassment.