Social Note Comments Scraper
Pricing
from $4.50 / 1,000 results
Social Note Comments Scraper
Unofficial RedNote / Xiaohongshu comments scraper. Extract public comments, authors, likes, reply counts, locations, timestamps, and optional nested replies from post URLs. Export structured results to JSON, CSV, Excel, or use them through the Apify API.
Pricing
from $4.50 / 1,000 results
Rating
0.0
(0)
Developer
Julio Gonzalez
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
Extract normalized comments and optional second-level replies from public RedNote / Xiaohongshu posts and save them to an Apify dataset.
Unofficial tool. Not affiliated with, endorsed by, or operated by RedNote / Xiaohongshu.
Input
- Post URLs — one or more public Xiaohongshu / RedNote post URLs or supported share links (required)
- Maximum comments per post — default
100 - Include replies — default
false - Maximum replies per comment — default
20 - Comment order —
LatestorHot / most liked
The input form requires at least one post URL, which prevents accidental empty runs.
Output
Each dataset item is a normalized top-level comment or reply. Fields can include:
- item type (
commentorreply) - comment ID and parent comment ID
- comment/reply text
- author ID, name, and avatar URL when available
- like count
- timestamp
- location label when supplied by the source
- reply count for top-level comments
- source post URL
The public Actor does not expose the raw TikHub response object or the TikHub API credential.
TikHub configuration
The Actor uses TikHub's Xiaohongshu App V2 API as its upstream provider. Configure this secret environment variable in the Actor settings:
TIKHUB_API_KEY
TIKHUB_TOKEN is accepted as an operator fallback.
For full Xiaohongshu URLs, the Actor extracts and sends note_id, which TikHub documents as preferred. For supported short/share links where the note ID cannot be extracted locally, it uses TikHub's share_text parameter.
Pagination and replies
Top-level comments follow TikHub's documented pagination contract:
- first request: empty cursor, index
0, pageAreaUNFOLDED - next request: reuse the previous response's cursor, index, and pageArea
Second-level replies follow TikHub's documented sub-comment pagination contract:
- first request: empty cursor, index
1 - next request: reuse cursor and index from the previous response
Replies are fetched only when the top-level source metadata indicates that replies exist. This avoids blindly issuing a paid sub-comment request for every comment.
If a later pagination request is rejected after earlier pages succeeded, the Actor keeps the already returned dataset results and stops that pagination branch cleanly.
Upstream safety controls
The Actor implements conservative TikHub request handling:
- one TikHub request at a time per Actor run
- minimum 500 ms interval between upstream requests by default
- maximum three attempts only for transient network/5xx failures
- exponential backoff with jitter
- HTTP/API
401,403, and429immediately halt further TikHub requests in that run - HTTP
400and other request-specific client errors are not hammered with retries - hard upstream request cap per run (default
2,000) - pagination loop protection
- duplicate dataset protection
- Apify spending-limit detection stops further upstream work as soon as the SDK reports the run limit has been reached
- clearly unrelated URLs are rejected before making a TikHub request
Operator-only environment variables:
TIKHUB_MIN_INTERVAL_MS— default500; minimum enforced250TIKHUB_MAX_REQUESTS_PER_RUN— default2000
API routes used
GET /api/v1/xiaohongshu/app_v2/get_note_commentsGET /api/v1/xiaohongshu/app_v2/get_note_sub_comments
Verification
Run from inside the Actor folder:
$python3.14 self_test.py
Expected output:
Social Note Comments Scraper v1.0 final self-test passed (22 checks).
The release self-test covers exact first-request parameters, top-level pagination handoff, sub-comment pagination, preservation of first-page results after a later-page HTTP 400, nested replies, duplicate protection, spending-limit stop behavior, authentication/rate-limit circuit breakers, retry caps, request caps, serialization of concurrent calls, input validation, and Actor schemas.
Responsible use
Use this Actor only for lawful purposes and public data, subject to applicable privacy, intellectual-property, and platform requirements. Do not use it to redistribute protected content without authorization or to expose upstream credentials/direct API access.