RedNote (Xiaohongshu) Comments Scraper avatar

RedNote (Xiaohongshu) Comments Scraper

Pricing

from $5.00 / 1,000 results

Go to Apify Store
RedNote (Xiaohongshu) Comments Scraper

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

Muhamed Didovic

Maintained by Community

Actor 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

FieldDescription
accessModefull for a cookie-backed paginated crawl, preview for the guest first batch
commentIdComment ID
contentComment text
likeCount / likeCountNumLikes as shown (e.g. 1.2万) and parsed to a number (12000)
ipLocationCommenter's displayed IP region (e.g. 上海)
createdAtISO timestamp
userId, userName, userAvatarCommenter profile
subCommentCountNumber of replies under this comment
subCommentsSampleUp to 5 nested replies: text, author, likes, IP location

How to run it

  1. Copy a note URL from Xiaohongshu (e.g. https://www.xiaohongshu.com/explore/<id>?xsec_token=…) and paste it as the input — the xsec_token is captured from the URL automatically.
  2. For the full thread, log in at xiaohongshu.com, open DevTools → ApplicationCookies, copy the web_session value, and paste it into the cookie field (marked secret, never logged). Skip this step for a preview of the first comments.
  3. 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.

🤖 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:

  • webSession is optional. Without it the run returns a preview: the first comment batch Xiaohongshu shows a guest (about 5 top-level comments with replies), rows marked accessMode: "preview", no pagination. With a valid logged-in web_session cookie the run paginates the full thread (accessMode: "full"). An expired cookie fails fast with a clear message. webSession is marked secret and never logged.
  • Always set maxItems (and/or maxPages, ~15–20 comments per page) to cap output; uncapped runs paginate the whole thread.
  • Pass the full note URL as noteId; the xsec_token is extracted from it automatically. For a bare 24-hex ID, supply xsecToken separately.
  • 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.