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

1

Total users

0

Monthly active users

a day 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. This actor signs every request through Xiaohongshu's own web signing (x-s / x-t) using a headless page and your web_session cookie, seeds page 1 from the note page itself, then paginates the comment API until your page or item cap.

What you get per comment

FieldDescription
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. Log in at xiaohongshu.com, open DevTools → ApplicationCookies, copy the web_session value, and paste it into the cookie field (marked secret, never logged).
  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

Why do I need a cookie? Xiaohongshu returns a login wall for guest calls to the comments API. The actor fails fast with a clear message when the cookie is missing or expired, 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
}

Output: one dataset row per comment; key fields: 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:

  • Requires a logged-in Xiaohongshu web_session cookie — the comments API is login-gated. Without a valid cookie the run 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.