# How to get Xiaohongshu (RedNote) note comments in bulk

3 endpoints do it: Xiaohongshu note search → Xiaohongshu note comments → Xiaohongshu comment replies. The worked example below is 14 calls and costs $0.28 in all; a failed call is not charged.

Updated 2026-11-06

Search Xiaohongshu (RedNote) for notes on a keyword, take the top-level comments under each note, then open the replies of the busiest comments. You end up with one table of comments: text, commenter, likes, replies and time posted.

## Step by step

### Step 1: Xiaohongshu note search

Get a page of notes for your search terms; `sort` can put the newest or the most liked first. Each item's `id` is the note ID, passed as it is to the next step; `metrics.comments` is its comment count, so you can start with the busiest. ([Xiaohongshu note search](https://onefeedapi.com/apis/xiaohongshu/notes/search/), $0.0200 / a call)

cURL

```bash
curl -G "https://onefeedapi.com/v1/xiaohongshu/notes/search" \
  --data-urlencode "query=咖啡" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
```

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.xiaohongshu.notes.search(query="咖啡")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.xiaohongshu.notes.search({ query: "咖啡" });
console.log(result.data.items);
```

CLI

```bash
onefeedapi call xiaohongshu.notes.search 'query=咖啡'
```

Recorded response: From a response recorded 2026-10-12 18:43 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

```jsonc
{
  "code": "ok",
  "request_id": "d2403177-e4f6-4d04-99eb-afce599b4c31",
  "data": {
    "items": [
      {
        "id": "67d5e2be00000000d803d22d",
        "url": "https://www.xiaohongshu.com/explore/67d5e2be00000000d803d22d",
        "type": "image",
        "title": "实测一个月咖啡，结论有点意外",
        "text": "把咖啡从头到尾讲清楚，看完少走弯路",
        "published_at": "2026-05-17T05:25:25.000Z",
        "author": {
          "id": "6130783200000000883b2a1e",
          "username": "coffee_lab_sh",
          "name": "山野咖啡馆",
          "avatar_url": "https://sns-avatar-qc.xhscdn.com/avatar/610f17040000000049dd4887.jpg"
        },
        "metrics": {
          "likes": 48,
          "comments": 21,
          "shares": 5,
          "favorites": 10
        },
        "images": [
          "https://sns-webpic-qc.xhscdn.com/20261010/2d7c7c32da67d3c3d839!nd_dft_wlteh_webp_3"
        ]
      },
      // … 14 more
    ]
  },
  "page": {
    "next_cursor": "c1.Ip12-f4dS4HmSDpdPex7WuLPBr1zJAbdhL_Wj8K0",
    "cursor_expires_at": "2026-10-12T19:43:26.000Z",
    "has_more": true,
    "returned": 15
  },
  "warnings": [],
  "meta": {
    "capability": "xiaohongshu.notes.search",
    "result_status": "complete",
    "fetched_at": "2026-10-12T18:43:26.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "lang": "capability",
      "metrics.views": "platform",
      "metrics.reposts": "platform",
      "author.verified": "capability",
      "author.followers": "capability",
      "hashtags": "capability",
      "mentions": "capability",
      "is_pinned": "capability",
      "post_id": "platform",
      "parent_id": "platform",
      "root_id": "platform"
    },
    "billing": {
      "amount": "0.02",
      "currency": "USD",
      "balance_after": "9.98"
    }
  }
}
```

### Step 2: Xiaohongshu note comments

Put the note ID into `id` to get a page of top-level comments, newest first. For the next page, call again with `page.next_cursor` as `cursor`. Each comment's `id`, `post_id` and reply count (`metrics.comments`) go into the next step. ([Xiaohongshu note comments](https://onefeedapi.com/apis/xiaohongshu/notes/comments/list/), $0.0200 / a call)

cURL

```bash
curl -G "https://onefeedapi.com/v1/xiaohongshu/notes/comments/list" \
  --data-urlencode "id=6a9c5884000000002b002d95" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
```

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.xiaohongshu.notes.comments.list(id="6a9c5884000000002b002d95")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.xiaohongshu.notes.comments.list({ id: "6a9c5884000000002b002d95" });
console.log(result.data.items);
```

CLI

```bash
onefeedapi call xiaohongshu.notes.comments.list id=6a9c5884000000002b002d95
```

Recorded response: From a response recorded 2026-10-12 18:43 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

```jsonc
{
  "code": "ok",
  "request_id": "fd58d135-ef6e-4271-869d-fbb8d27199ce",
  "data": {
    "items": [
      {
        "id": "68d0607400000000edd345fe",
        "text": "我上次也踩了这个坑哈哈",
        "published_at": "2026-10-11T13:28:37.000Z",
        "author": {
          "id": "6da35157000000005fdd7a79",
          "username": "nanfeng_0721",
          "name": "南边的风",
          "avatar_url": "https://sns-avatar-qc.xhscdn.com/avatar/65250da200000000167ab981.jpg"
        },
        "metrics": { "likes": 0, "comments": 0 },
        "post_id": "6696eaf60000000000904fc3",
        "parent_id": null,
        "root_id": null
      },
      // … 9 more
    ]
  },
  "page": {
    "next_cursor": "c1.lk7Qsam6A9ERrgAE_Wv8XIQJG0N-AN_z2Xy0yA78",
    "cursor_expires_at": "2026-10-12T19:43:50.000Z",
    "has_more": true,
    "returned": 10
  },
  "warnings": [],
  "meta": {
    "capability": "xiaohongshu.notes.comments.list",
    "result_status": "complete",
    "fetched_at": "2026-10-12T18:43:50.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": { "url": "platform" },
    "billing": {
      "amount": "0.02",
      "currency": "USD",
      "balance_after": "9.98"
    }
  }
}
```

### Step 3: Xiaohongshu comment replies

For a comment with many replies, put its `id` into `id` and its `post_id` into `post_id` to get the replies under it. Each reply's `parent_id` is the comment it answers directly. ([Xiaohongshu comment replies](https://onefeedapi.com/apis/xiaohongshu/comments/replies/list/), $0.0200 / a call)

cURL

```bash
curl -G "https://onefeedapi.com/v1/xiaohongshu/comments/replies/list" \
  --data-urlencode "id=6a9c5c160000000015022a5c" \
  --data-urlencode "post_id=6a9c5884000000002b002d95" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
```

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.xiaohongshu.comments.replies.list(id="6a9c5c160000000015022a5c", post_id="6a9c5884000000002b002d95")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.xiaohongshu.comments.replies.list({ id: "6a9c5c160000000015022a5c", post_id: "6a9c5884000000002b002d95" });
console.log(result.data.items);
```

CLI

```bash
onefeedapi call xiaohongshu.comments.replies.list id=6a9c5c160000000015022a5c post_id=6a9c5884000000002b002d95
```

Recorded response: From a response recorded 2026-10-12 18:43 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

```jsonc
{
  "code": "ok",
  "request_id": "73e9cdd5-25d4-43a3-8ab7-2b772d6dc423",
  "data": {
    "items": [
      {
        "id": "6b61353f00000000bc461a89",
        "text": "收藏了，周末就去试试",
        "published_at": "2026-09-05T18:19:37.000Z",
        "author": {
          "id": "6fae30ea000000006c636e24",
          "username": "aya_living",
          "name": "认真生活的阿雅",
          "avatar_url": "https://sns-avatar-qc.xhscdn.com/avatar/66909e6f00000000f1d7fcc8.jpg"
        },
        "metrics": { "likes": 639 },
        "post_id": "66f902af00000000446f66ed",
        "parent_id": "637d056a000000009ef97bd5",
        "root_id": "6516fd30000000006f684b97"
      },
      // … 4 more
    ]
  },
  "page": {
    "next_cursor": "c1.LyZyLf38XXqnHCcC989t2SLQpglHo8Vxq-bqAIPK",
    "cursor_expires_at": "2026-10-12T19:43:51.000Z",
    "has_more": true,
    "returned": 5
  },
  "warnings": [],
  "meta": {
    "capability": "xiaohongshu.comments.replies.list",
    "result_status": "complete",
    "fetched_at": "2026-10-12T18:43:51.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": { "url": "platform", "metrics.comments": "platform" },
    "billing": {
      "amount": "0.02",
      "currency": "USD",
      "balance_after": "9.98"
    }
  }
}
```

## What the example costs

One page of search results, the first page of comments under 10 of the notes, then the replies under 3 of those comments

| Endpoint | Calls | Price | Subtotal |
| --- | --- | --- | --- |
| [Xiaohongshu note search](https://onefeedapi.com/apis/xiaohongshu/notes/search/) | 1 | $0.0200 | $0.0200 |
| [Xiaohongshu note comments](https://onefeedapi.com/apis/xiaohongshu/notes/comments/list/) | 10 | $0.0200 | $0.20 |
| [Xiaohongshu comment replies](https://onefeedapi.com/apis/xiaohongshu/comments/replies/list/) | 3 | $0.0200 | $0.0600 |
| Total | 14 |  | $0.28 |

Prices are the prices in force when this page was built. A failed call costs nothing.

## In your AI (MCP)

Connect OneFeedAPI to your AI client once. Then say what you want; the agent finds these endpoints, checks the price and calls them on your balance.

Say: Search Xiaohongshu for 咖啡 (coffee), get the first page of comments under the top 10 notes, then the replies under the 3 comments with the most replies, as one table.

What the agent sends to the call tool: 

```json
{
  "capability": "xiaohongshu.notes.search",
  "query": "咖啡",
  "idempotency_key": "<a new UUID>"
}
```

[About the MCP server](https://onefeedapi.com/mcp/)

## With a Skill

The Comments and word of mouth Skill does this job as a ready-made task, under a spending cap. “What are people praising and complaining about under this post?” Its example run: 3 calls, at most $0.0060. [Comments and word of mouth](https://onefeedapi.com/skills/comments/)

## Why OneFeedAPI

- Steady: endpoints were available 100% of the last 30 days, on a public status page you can check.
- Fast: a paid call took 1.3 seconds at the median over the last 7 days (counted 2026-11-06).
- Fewer tokens: across 21 endpoints on Xiaohongshu (RedNote), one recorded real response each, the platform's own JSON comes to 480k tokens and what an AI reads through OneFeedAPI's MCP server to 36k, 92% fewer; the JSON of a direct API call is 85% fewer too (counted 2026-11-06). Every platform answers in one shape: the author in `author`, counts in `metrics`, the next page in `page.next_cursor`, so another platform needs no new parser.
- See before you pay: every endpoint's page shows a recorded real response, field by field.
- Spending you control: a failed call is not charged; each key can have a limit, `X-Max-Price` caps one call, and the same `Idempotency-Key` within 24 hours is never charged twice.
- Ready for AI: a remote MCP server listed in the official MCP registry as `com.onefeedapi/mcp`, usable from Claude, Cursor and ChatGPT.
- Free trial of up to 333 calls, no card.

## Good to know

- Comments come about 10 a page, 20 at most, top-level only: replies come from the replies endpoint. A `page.next_cursor` is good for an hour.
- A note ID is 24 hexadecimal characters. For an ID that matches no note, the comments endpoint answers not found and charges nothing.
- Comments have no link of their own (`url`). The IP location is there only where the platform shows one: add `view=full` and read `ext.ip_location`.

## The whole script

The task above as one script that runs as it is: Python, the SDK, your key from ONEFEED_API_KEY. It writes a CSV file and ends by printing what it called, fetched and was charged.

```python
# pip install onefeedapi
# export ONEFEED_API_KEY=dx_...   (your key)
import csv
from decimal import Decimal
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()
calls, fetched, charged = 0, 0, Decimal("0")

def run(capability, params):
    """One call; counts it and what it was charged."""
    global calls, charged
    result = dx.call(capability, params)
    calls += 1
    charged += Decimal(str(result["meta"]["billing"]["amount"]))
    return result

QUERY = "露营"
NOTES = 5

# 1. A page of notes for the search terms.
notes = run("xiaohongshu.notes.search", {"query": QUERY})["data"]["items"][:NOTES]

# 2. The first page of comments under each note.
rows = []
for note in notes:
    for comment in run("xiaohongshu.notes.comments.list", {"id": note["id"]})["data"]["items"]:
        rows.append([note["id"], comment.get("published_at"), comment["author"].get("name"), comment["metrics"].get("likes"), comment.get("text")])

fetched = len(rows)
with open("xiaohongshu-comments.csv", "w", newline="", encoding="utf-8") as file:
    csv.writer(file).writerows([["note_id", "published_at", "commenter", "likes", "text"], *rows])

print(f"calls: {calls}, items: {fetched}, charged: ${charged}")
```

Run for real on 2026-10-29: 6 calls, 50 rows written, $0.12 charged. A failed call is not charged.

## Endpoints

- [Xiaohongshu note search](https://onefeedapi.com/apis/xiaohongshu/notes/search/)
- [Xiaohongshu note comments](https://onefeedapi.com/apis/xiaohongshu/notes/comments/list/)
- [Xiaohongshu comment replies](https://onefeedapi.com/apis/xiaohongshu/comments/replies/list/)

## More about Xiaohongshu (RedNote)

- [Xiaohongshu (RedNote) API](https://onefeedapi.com/apis/xiaohongshu/)
- [How to look up Xiaohongshu (RedNote) PGY creator rates and audience](https://onefeedapi.com/guides/xiaohongshu-pgy-creator-rates/)
- [How to search and export Xiaohongshu (RedNote) notes by keyword](https://onefeedapi.com/guides/xiaohongshu-search-export-notes/)
- [How to get a keyword's search index and related keywords on Xiaohongshu PGY](https://onefeedapi.com/guides/xiaohongshu-pgy-keywords/)
- [Does Xiaohongshu (RedNote) have an API? Get notes and comments with Python (2026)](https://onefeedapi.com/guides/xiaohongshu-api-python/)
- [How do I export Xiaohongshu (RedNote) data?](https://onefeedapi.com/answers/export-xiaohongshu-data/)
- [Can ChatGPT read Xiaohongshu (RedNote)?](https://onefeedapi.com/answers/can-chatgpt-read-xiaohongshu/)
- [What is xsec_token on Xiaohongshu?](https://onefeedapi.com/answers/xiaohongshu-xsec-token/)
- [What is a Xiaohongshu note ID, and what is an xhslink link?](https://onefeedapi.com/answers/xiaohongshu-note-id-and-xhslink/)
- [What is CPE on Xiaohongshu PGY and on Douyin Xingtu?](https://onefeedapi.com/answers/xiaohongshu-pgy-cpe-vs-xingtu-cpe/)
- [What is Xiaohongshu PGY?](https://onefeedapi.com/answers/what-is-xiaohongshu-pgy/)
- [Xiaohongshu video API: the video file and its subtitles (2026)](https://onefeedapi.com/answers/xiaohongshu-video-url-subtitles-api/)
- [How do I collect hit topic ideas on Xiaohongshu in bulk? (2026)](https://onefeedapi.com/answers/xiaohongshu-hit-topic-ideas/)
- [Which Xiaohongshu data API? The official platform, third-party APIs or your own scraper (2026)](https://onefeedapi.com/answers/best-xiaohongshu-data-api/)

---

Catalog revision dc959672dd18e2d0. [HTML version](https://onefeedapi.com/guides/xiaohongshu-note-comments/)
