# 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

## 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](https://xtikapi.com/apis/xiaohongshu/comments/list): `GET /v1/xiaohongshu/comments/list`, $0.02 a call

```bash
curl "https://xtikapi.com/v1/xiaohongshu/comments/list?id=6aaf9168000000002b01c2bc" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```python
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")
```

```javascript
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):

```json
{
  "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

| Step | Calls | Price | Subtotal |
| --- | --- | --- | --- |
| Comments, 10 pages of 10 to 15 | 10 | $0.02 | $0.2 |
| Total | 10 | | $0.20 |

## 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.list` with the note and the comment's `id`.
- Each page is $0.02, ten times a Douyin comment page, because the upstream read costs more.
- Pass `sort_strategy: like_count` for the most-liked comments first; the default is newest first.

## Endpoints

- [Xiaohongshu comments API](https://xtikapi.com/apis/xiaohongshu/comments/list): $0.02 a call

## More about Xiaohongshu

- [How to export every note from a Xiaohongshu account](https://xtikapi.com/guides/xiaohongshu-user-notes)
- [MediaCrawler errors (Verifytype, Douyin page 1 empty, XHS 406, Kuaishou) & hosted alternatives?](https://xtikapi.com/answers/mediacrawler-errors-and-alternatives)
- [Xiaohongshu warns my account about AI or automated operation: how can I still collect data?](https://xtikapi.com/answers/xiaohongshu-ai-operation-detected)
- [Why do Xiaohongshu comment replies return {"code":-1,"success":false}?](https://xtikapi.com/answers/xiaohongshu-comment-replies-code-minus-1)
- [How do I collect Xiaohongshu notes automatically with n8n?](https://xtikapi.com/answers/n8n-xiaohongshu-notes)
- [How do I export Xiaohongshu note comments to Excel?](https://xtikapi.com/answers/xiaohongshu-comments-export-excel)
- [How do I connect Xiaohongshu data to Dify?](https://xtikapi.com/answers/dify-xiaohongshu-data)

## 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.

---

XTikAPI: one API key for public social media data, prepaid per call. [HTML version](https://xtikapi.com/guides/xiaohongshu-note-comments) · [llms.txt](https://xtikapi.com/llms.txt) · [OpenAPI](https://xtikapi.com/openapi.json)
