How to get comments on a Xiaohongshu (RedNote) note
Pass the note ID and page with data.next. The first page held 10 comments and later pages 15 in our test, so 10 pages give about 145 comments for 10 calls and $0.20, without an xhs cookie or x-s signature.
Updated 2026-11-22·This page as Markdown
Page through the comments
id is the note ID: the 24-character string after /explore/ or /discovery/item/ in a note link. You can pass the share link as url instead. The cursor Xiaohongshu returns is a small JSON string; send it back unchanged inside data.next.
Xiaohongshu comments API·GET /v1/xiaohongshu/comments/list·$0.02 a call
curl "https://xtikapi.com/v1/xiaohongshu/comments/list?id=6aaf9168000000002b01c2bc" \
-H "Authorization: Bearer YOUR_API_KEY"import requests
URL = "https://xtikapi.com/v1/xiaohongshu/comments/list"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
params = {"id": "6aaf9168000000002b01c2bc"}
items = []
for _ in range(10): # one call per page
for attempt in range(3): # 5xx errors are not charged: retry
response = requests.get(URL, params=params, headers=HEADERS, timeout=60)
if response.status_code < 500:
break
response.raise_for_status()
data = response.json()["data"]
items += data["items"]
if not data.get("next"): # null on the last page
break
params.update(data["next"])
print(len(items), "items")const URL = "https://xtikapi.com/v1/xiaohongshu/comments/list";
const HEADERS = { Authorization: "Bearer YOUR_API_KEY" };
let params = {"id":"6aaf9168000000002b01c2bc"};
const items = [];
for (let page = 0; page < 10; page++) {
let response;
for (let attempt = 0; attempt < 3; attempt++) {
// 5xx errors are not charged: retry
response = await fetch(`${URL}?${new URLSearchParams(params)}`, { headers: HEADERS });
if (response.status < 500) break;
}
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { data } = await response.json();
items.push(...data.items);
if (!data.next) break; // null on the last page
params = { ...params, ...data.next };
}
console.log(items.length, "items");Recorded response (lists keep the first two items)
{
"data": {
"items": [
{
"id": "9xx5xx109630741864998711",
"text": "Example text",
"author": {
"id": "x9396x7xx0x02193x19362x0xx559",
"username": "example_user",
"name": "Example name",
"avatar": "https://example.com/image.jpg"
},
"createdAt": "2026-10-28T12:32:42.000Z",
"likeCount": 0,
"replyCount": 1
},
{
"id": "9xx8x71x96307418649651x1",
"text": "Example text",
"author": {
"id": "x7x237x10336x2x6xxx1228xxxxxx",
"username": "example_user",
"name": "Example name",
"avatar": "https://example.com/image.jpg"
},
"createdAt": "2026-10-18T12:19:57.000Z",
"likeCount": 0,
"replyCount": 0
}
],
"has_more": true,
"next": {
"cursor": "{\"contextId\"…"
}
},
"meta": {
"request_id": "example",
"endpoint": "xiaohongshu.comments.list",
"normalized": true,
"unavailable": [],
"billing": {
"charged": true,
"amount": 0.02,
"balance": 4.98
}
}
}What the example costs
Failed calls and timeouts are not charged. A new account with a verified email gets $0.50 of trial balance, enough to run this example.
Good to know
- In our test on 2026-11-22 the first page held 10 comments and the second 15, with no overlap.
- Sub-comments are separate:
xiaohongshu.comment_replies.listwith the note and the comment'sid. - Each page is $0.02, ten times a Douyin comment page, because the upstream read costs more.
- Pass
sort_strategy: like_countfor the most-liked comments first; the default is newest first.
Endpoints
- Xiaohongshu comments API · $0.02 a call
More about Xiaohongshu
- How to export every note from a Xiaohongshu account
- MediaCrawler errors (Verifytype, Douyin page 1 empty, XHS 406, Kuaishou) & hosted alternatives?
- Xiaohongshu warns my account about AI or automated operation: how can I still collect data?
- Why do Xiaohongshu comment replies return {"code":-1,"success":false}?
- How do I collect Xiaohongshu notes automatically with n8n?
- How do I export Xiaohongshu note comments to Excel?
- How do I connect Xiaohongshu data to Dify?
Questions
How much does this cost with XTikAPI?
The example here is 10 calls, $0.20 in total. Failed calls and timeouts are free, and a new account with a verified email gets $0.50 of trial balance.
Where do I find the note ID?
Open the note in a browser: the 24-character string after /explore/ is the ID. From the app, copy the share link and pass it as url.