# 小红书 评论回复列表

小红书 评论回复列表。返回一页 data.items，以及可用的下一页游标。

GET `/v1/xiaohongshu/comments/replies/list`

- **认证** 使用含 catalog 权限的 Social2api API Key，并在 X-DataXAPI-Key 中提供自己的 DataXAPI Key。启用可选的 TikHub 或 SocialToAI 通道时，这两项仍必填。
- **成功状态** `200`
- **计费与限额** DataXAPI 默认报价为每次请求 USD 0.02，本站单次 DataXAPI 上游费用上限 USD 0.02。报价版本 22（2026-11-25 UTC）。取数尝试计入 Social2api 用量。
- **空结果与未找到** DataXAPI 空结果（empty）报价 USD 0.02。目标未找到（not\_found）报价 USD 0。
- **分页** 保持原请求参数，使用 page.next\_cursor 续页。每页独立调用；按 page.cursor\_expires\_at 判断失效，过期后从第一页重新查询。 每页通常 5 条。 上限 20 条。 目录列出的有效期为 3600 秒，个别通道可能更早失效。

## 请求参数

| 参数 | 类型 | 位置 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| `Authorization` | Bearer &lt;Social2api API Key&gt; | `header` | 否 | Social2api 访问密钥。 |
| `X-API-Key` | string | `header` | 否 | Social2api Bearer 认证的替代请求头。 |
| `X-DataXAPI-Key` | string | `header` | 是 | 向 DataXAPI 调用时使用的个人供应商密钥。 |
| `Idempotency-Key` | string | `header` | 否 | 将本次调用固定到 DataXAPI。相同请求可复用 1–255 个可见 ASCII 字符组成的幂等键。 |
| `X-Max-Price` | string | `header` | 否 | 将本次调用固定到 DataXAPI，并以 USD 指定更低的费用上限，最多六位小数。 |
| `id` | string | `query` | 是 | 目标在该平台上的标识，保持原来的字符串格式。 |
| `post_id` | string | `query` | 是 | 所属作品的原始平台 ID。 |
| `cursor` | string | `query` | 否 | 将上次响应的 page.next\_cursor 原样传入。 |
| `view` | compact \| standard \| full | `query` | 否 | compact 返回常用字段，standard 返回标准字段，full 可包含平台扩展字段。 默认 standard。 |
| `fields` | string\[\] | `query` | 否 | 指定 1–100 个点分字段路径，单项最多 256 个字符。点分段以英文字母或下划线开头，随后可含数字。GET 用一个逗号分隔的 fields 参数，例如 id,author.name。POST JSON 用字符串数组。选择扩展字段时同时传 view=full。 |
| `X-TikHub-Key` | string | `header` | 否 | 使用你自己的 TikHub Key 启用该端点的 TikHub 通道。 |
| `X-SocialToAI-Key` | string | `header` | 否 | 使用你自己的 SocialToAI Key 启用该端点的 SocialToAI 通道。 |

## 请求示例

先在本机设置 SOCIAL2API\_API\_KEY 环境变量。JavaScript 示例使用 Node.js 运行。

为 Social2api 密钥启用「扩展数据 API」，并设置你自己的 DATAXAPI\_API\_KEY。下例使用 DataXAPI，费用在对应的 DataXAPI 账户结算。 返回一页 data.items，以及可用的下一页游标。

**cURL**

```bash
curl -i -X GET 'https://social2api.com/v1/xiaohongshu/comments/replies/list?id=6a9c5c160000000015022a5c&post_id=6a9c5884000000002b002d95' \
  -H "Authorization: Bearer $SOCIAL2API_API_KEY" \
  -H "X-DataXAPI-Key: $DATAXAPI_API_KEY"
```

**Python**

```python
import os
from urllib.error import HTTPError
from urllib.request import Request, urlopen

request = Request(
    "https://social2api.com/v1/xiaohongshu/comments/replies/list?id=6a9c5c160000000015022a5c&post_id=6a9c5884000000002b002d95",
    method="GET",
    headers={
        "Authorization": "Bearer " + os.environ["SOCIAL2API_API_KEY"],
        "X-DataXAPI-Key": os.environ["DATAXAPI_API_KEY"],
    },
)
send = urlopen
try:
    with send(request) as response:
        print(response.status, response.read().decode("utf-8"))
except HTTPError as error:
    print(error.code, error.read().decode("utf-8"))
```

**JavaScript**

```javascript
const response = await fetch("https://social2api.com/v1/xiaohongshu/comments/replies/list?id=6a9c5c160000000015022a5c&post_id=6a9c5884000000002b002d95", {
  method: "GET",
  headers: {
    Authorization: "Bearer " + process.env.SOCIAL2API_API_KEY,
    "X-DataXAPI-Key": process.env.DATAXAPI_API_KEY,
  },
});
console.log(response.status, await response.text());
```

## Agent 提示词

**查看可复制的任务提示词**

```
使用 GET https://social2api.com/v1/xiaohongshu/comments/replies/list 执行「小红书 评论回复列表」。
缺少这些输入时先向我索取：id、post_id。
先读取本页参数说明和我的调用预算。使用本地 SOCIAL2API_API_KEY 作 Bearer，并用 DATAXAPI_API_KEY 作 X-DataXAPI-Key。请求默认走 DataXAPI。
返回一页 data.items，以及可用的下一页游标。
需要续页时在同一请求中保留参数与密钥，使用 page.next_cursor。到我的调用上限、cursor 过期或 has_more 为 false 时停止。
交付返回的数据和已执行调用数，并记录 request_id、meta.result_status 及可用的 meta.provider、meta.unavailable。
https://social2api.com/docs/api/catalog-xiaohongshu-comments-replies-list/
```

## 响应

**200 · 示例响应**

```json
{
  "code": "ok",
  "request_id": "3f022215-9708-4eef-9878-cc67b31f3d6b",
  "data": {
    "items": [
      {
        "id": "2345678901",
        "text": "A sample comment.",
        "published_at": "2026-11-15T12:00:00Z",
        "metrics": {
          "likes": 4
        },
        "post_id": "6a9c5884000000002b002d95",
        "parent_id": "6a9c5c160000000015022a5c"
      }
    ]
  },
  "page": {
    "next_cursor": null,
    "cursor_expires_at": null,
    "has_more": false,
    "returned": 1
  },
  "warnings": [],
  "meta": {
    "capability": "xiaohongshu.comments.replies.list",
    "result_status": "complete",
    "fetched_at": "2026-11-15T12:00:00Z"
  }
}
```

**200 · 还有下一页**

```json
{
  "code": "ok",
  "request_id": "3f022215-9708-4eef-9878-cc67b31f3d6b",
  "data": {
    "items": [
      {
        "id": "2345678901",
        "text": "A sample comment.",
        "published_at": "2026-11-15T12:00:00Z",
        "metrics": {
          "likes": 4
        },
        "post_id": "6a9c5884000000002b002d95",
        "parent_id": "6a9c5c160000000015022a5c"
      }
    ]
  },
  "page": {
    "next_cursor": "EXAMPLE_NEXT_CURSOR",
    "cursor_expires_at": "2026-11-15T12:20:00.000Z",
    "has_more": true,
    "returned": 1
  },
  "warnings": [],
  "meta": {
    "capability": "xiaohongshu.comments.replies.list",
    "result_status": "complete",
    "fetched_at": "2026-11-15T12:00:00Z"
  }
}
```

**错误示例**

```json
{
  "error": "此 API Key 没有运行该工具的权限。",
  "code": "api_key_permission_denied",
  "requestCount": 0
}
```

EXAMPLE\_NEXT\_CURSOR 是示意值。下一次请求保留原路径、筛选、view、fields 和密钥，只添加或替换 cursor 为实际响应的 page.next\_cursor；URL 编码一次。has\_more 为 false 时停止。

**请求第一页和下一页 · Node.js**

```javascript
const url = new URL("https://social2api.com/v1/xiaohongshu/comments/replies/list?id=6a9c5c160000000015022a5c&post_id=6a9c5884000000002b002d95");
const headers = {
  Authorization: "Bearer " + process.env.SOCIAL2API_API_KEY,
  "X-DataXAPI-Key": process.env.DATAXAPI_API_KEY,
};
async function readPage() {
  const response = await fetch(url, { headers });
  if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
  return response.json();
}

const first = await readPage();
console.log(first.data.items);
if (first.page?.has_more && first.page.next_cursor) {
  const expires = Date.parse(first.page.cursor_expires_at);
  if (Number.isFinite(expires) && Date.now() >= expires) {
    throw new Error("Cursor expired. Restart without a cursor.");
  }
  url.searchParams.set("cursor", first.page.next_cursor);
  const next = await readPage();
  console.log(next.data.items);
}
```

| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `code` | string | 成功时为 ok。 |
| `request_id` | string \| null | 数据源请求标识，可用于排查调用。 |
| `data.items` | object\[\] | 本次查询匹配的项目。 |
| `data.items[].id` | string \| null | 来源平台上的标识。 |
| `data.items[].url` | URI \| null | 原始对象链接。 |
| `data.items[].text` | string \| null | 内容文本。 |
| `data.items[].published_at` | ISO 8601 date-time \| null | 内容发布时间。 |
| `data.items[].author` | object \| null | 公开作者信息。 |
| `data.items[].metrics` | object \| null | 平台提供的统计量。 |
| `data.items[].post_id` | string \| null | 关联作品 ID。 |
| `data.items[].parent_id` | string \| null | 直接上级内容 ID。 |
| `data.items[].root_id` | string \| null | 线程根内容 ID。 |
| `data.items[].approximate` | (object \| null)\[\] \| null | 使用近似值的字段。 |
| `data.missing` | object\[\] | 上游明确报告未返回的目标，可包含 id 和 reason。 |
| `page.next_cursor` | string \| null | 下一页游标。到末页时为 null。 |
| `page.cursor_expires_at` | ISO 8601 date-time \| null | 游标有效期结束时间。 |
| `page.has_more` | boolean | 是否有下一页。 |
| `page.returned` | integer | 本页已返回的结果数量。 |
| `warnings` | object\[\] | 平台给出的字段缺失、截断或部分结果提示。 |
| `meta.capability` | string | 执行的上游能力标识。 |
| `meta.provider` | dataxapi \| tikhub \| socialtoai | 实际响应的上游通道。只用 DataXAPI 通道时该字段可省略。 |
| `meta.result_status` | string | 这次数据结果的状态，例如 complete、partial、empty、not\_found。转录进度另读 data.item.status。 |
| `meta.fetched_at` | ISO 8601 date-time | 上游取数时间。 |
| `meta.cached` | boolean | 结果是否来自上游缓存。 |
| `meta.replayed` | boolean | 结果是否为上游重放。 |
| `meta.unavailable` | Record&lt;string, string&gt; | 数据源列出的不可用字段和相关原因。 |

## 错误状态

| HTTP | 原因与处理 |
| --- | --- |
| `400` | 参数、JSON 请求体或上游密钥格式无效。 |
| `401` | 缺少有效的 Social2api API Key 或 DataXAPI Key。 |
| `402` | DataXAPI 余额或密钥预算不足。 |
| `403` | API Key 未授权 catalog、来源校验失败，或上游限制当前密钥访问。 |
| `404` | 目标对象找不到或已不可用。 |
| `405` | 请求方法与端点定义不符。 |
| `409` | 上游正在处理相同请求，或幂等键已用于另一个请求。 |
| `410` | 分页游标或上游结果已过期。 |
| `413` | 编码后的查询串或 JSON 请求体超过 16,000 字节。 |
| `422` | 上游无法处理当前目标或参数。 |
| `429` | 队列已满或等待超时时，接口返回 HTTP 429、catalog\_concurrency\_limit 和 Retry-After: 1。等待期间取消或被限流的尝试不计量。requestCount 表示已计量的上游尝试次数。 达到账户或 API Key 每日限额、或触发上游限流时，也会返回 429。 |
| `502` | 上游拒绝访问、请求失败或响应格式无效。 |
| `503` | 当前部署的调用服务暂不可用。 |
| `504` | 上游调用超时或查询已取消。 |

## 使用细节

-   每个 Social2api 账户最多同时执行 300 次扩展 API 上游请求。同一账户的所有密钥和共享数据库的服务实例共用名额。并发已满时，每个实例可为该账户按入队顺序等待最多 4 次尝试，等待期限为 250 毫秒。每日调用限额仍然适用。
-   DataXAPI 的相同请求可使用同一个 Idempotency-Key 重试以复用已有结果。不同页属于不同请求。每次上游尝试计入 Social2api 调用限额。
-   响应示例为合成数据。实际响应及可用字段由对象公开状态、地区、供应商和所选档位决定。保留 request\_id 与 meta.provider 便于排查。
-   用 meta.result\_status 区分空列表（data.items: \[\]）与单个对象未找到（data.item: null）。data.missing 用于列出缺失的已请求 ID。HTTP 错误与这两种业务状态分开处理，实际费用请核对供应商回执。
-   GET 每个参数名只可出现一次。重复传 fields 会返回 400；包含问号的编码查询串超过 16,000 字节会返回 413 payload\_too\_large。
-   实际供应商取决于输入、已提供的密钥及账号故障切换设置。DataXAPI、TikHub、SocialToAI 分别在所用供应商的账户计费。此处 USD 报价、X-Max-Price 和 Idempotency-Key 属于 DataXAPI 通道；后两个请求头会固定 DataXAPI。
-   备用通道游标通常以 s2a1. 开头。下一页需使用原 Social2api Key、原供应商 Key 和全部原参数。备用游标带 DataXAPI 价格或幂等请求头会返回 400 catalog\_cursor\_provider\_conflict。缺密钥返回 401 missing\_catalog\_cursor\_key，参数或绑定不符返回 400 invalid\_catalog\_cursor，过期返回 410 catalog\_cursor\_expired。若响应为 partial 且 meta.unavailable 标出 page.next\_cursor，保留已返回数据并记录覆盖不完整。DataXAPI 自己的游标按原值直传。

## 相关工作流

-   [评论回复接口对照](<https://social2api.com/roles/comments-replies-list/>)

## 同组接口

-   [GET 小红书 图片搜索](<https://social2api.com/docs/api/catalog-xiaohongshu-images-search/>)
-   [GET 小红书 笔记评论列表](<https://social2api.com/docs/api/catalog-xiaohongshu-notes-comments-list/>)
-   [GET 小红书 笔记详情](<https://social2api.com/docs/api/catalog-xiaohongshu-notes-get/>)
-   [GET 小红书 笔记搜索](<https://social2api.com/docs/api/catalog-xiaohongshu-notes-search/>)
-   [GET 小红书 蒲公英创作者受众画像详情](<https://social2api.com/docs/api/catalog-xiaohongshu-pgy-creators-audience-get/>)
-   [GET 小红书 蒲公英创作者成本统计](<https://social2api.com/docs/api/catalog-xiaohongshu-pgy-creators-costs-metrics/>)
-   [GET 小红书蒲公英博主详情与图文视频报价 API](<https://social2api.com/docs/api/catalog-xiaohongshu-pgy-creators-get/>)
-   [GET 小红书蒲公英博主笔记表现 API](<https://social2api.com/docs/api/catalog-xiaohongshu-pgy-creators-metrics/>)
-   [GET 小红书 蒲公英创作者搜索](<https://social2api.com/docs/api/catalog-xiaohongshu-pgy-creators-search/>)
-   [GET 小红书蒲公英关键词逐日搜索指数 API](<https://social2api.com/docs/api/catalog-xiaohongshu-pgy-keywords-history/>)
-   [GET 小红书 蒲公英笔记热门](<https://social2api.com/docs/api/catalog-xiaohongshu-pgy-notes-trending/>)
-   [GET 小红书 话题笔记列表](<https://social2api.com/docs/api/catalog-xiaohongshu-topics-notes-list/>)
-   [GET 小红书 趋势列表](<https://social2api.com/docs/api/catalog-xiaohongshu-trends-list/>)
-   [GET 小红书 用户详情](<https://social2api.com/docs/api/catalog-xiaohongshu-users-get/>)
-   [GET 小红书 用户笔记列表](<https://social2api.com/docs/api/catalog-xiaohongshu-users-notes-list/>)
-   [GET 小红书 用户搜索](<https://social2api.com/docs/api/catalog-xiaohongshu-users-search/>)
-   [GET 小红书 视频详情](<https://social2api.com/docs/api/catalog-xiaohongshu-videos-get/>)
-   [GET 小红书 视频转录](<https://social2api.com/docs/api/catalog-xiaohongshu-videos-transcript-get/>)

规范页面：<https://social2api.com/docs/api/catalog-xiaohongshu-comments-replies-list/>
