# B站 评论回复 API (bilibili.comment_replies)

- Canonical page: [https://everyinfra.com/bilibili-api/comment_replies](https://everyinfra.com/bilibili-api/comment_replies?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "bilibili", "action": "comment_replies", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of up to 20 per call; the number of rows varies from page to page and a short page is not the end (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page; no next_page_token means the end)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=bilibili&action=comment_replies

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 评论所在的 B 站视频：完整链接 https://www.bilibili.com/video/<BV号>，或直接填 BV 号。认不出 BV 号时返回 422，不扣费。 |
| comment_id | not declared | yes | not declared | 一级评论的编号，即 comments 返回行的 id，一串数字。不是一串数字时返回 422，不扣费。 |
| page_token | not declared | no | not declared | 翻页令牌。第一页不传；之后把上一页响应里的 next_page_token 原样传回取下一页，其余参数不变。回复按时间从早到晚排，每页最多 20 条，每页算一次调用；limit 不起作用。令牌 24 小时内有效，翻到底时响应里没有 next_page_token。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| reply_count | 回复数，通常用于评论的子回复。null 表示不公开。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| root_comment_id | 这条回复所在的一级评论 ID（comment_replies），和请求的 comment_id 一致。 |
| reply_to_comment_id | 这条回复是在回复哪条回复（comment_replies）；直接回复一级评论时没有这个字段。 |
| video_id | 视频 BV 号。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_name | 作者昵称（显示名）。 |
| author_url | 作者在原平台的主页链接。 |
| author_avatar_url | 作者头像图片链接（多数平台带签名、会过期）。 |
| author_level | 回复者的 B 站等级（0–6，comment_replies）。 |
| is_by_uploader | 这条回复是不是视频的 UP 主本人发的（comment_replies）。 |
| ip_location | 发布地：popular 是 B 站在视频页显示的投稿 IP 属地，省份或国家；comment_replies 是这条回复发出时的 IP 属地，B 站没显示时没有。 |
| image_urls | 图片链接数组，按平台展示顺序；没有图片时不出现这个字段。 |
| mentions | 回复里 @ 到的用户昵称（comment_replies），数组；没有 @ 时没有这个字段。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "bilibili",
  "action": "comment_replies",
  "params": {
    "url": "https://www.bilibili.com/video/BV1uv411q7Mv",
    "comment_id": "3249407228"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "bilibili",
        "action": "comment_replies",
        "params": {
            "url": "https://www.bilibili.com/video/BV1uv411q7Mv",
            "comment_id": "3249407228",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:17:18Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 5. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "bilibili",
  "action": "comment_replies",
  "results": [
    {
      "id": "•••",
      "url": "https://www.bilibili.com/video/BV1uv411q7Mv#reply178599527152",
      "text": "这波和头像配合得不是很好[tv_doge][tv_doge][tv_doge]",
      "like_count": 4,
      "reply_count": 0,
      "posted_at": "2023-08-02T13:52:38+00:00",
      "root_comment_id": "•••",
      "video_id": "BV1uv411q7Mv",
      "author_id": "•••",
      "author_name": "D•••1",
      "author_url": "https://space.bilibili.com/•••",
      "author_avatar_url": "https://i0.hdslb.com/•••",
      "author_level": 6,
      "is_by_uploader": false,
      "ip_location": "•••",
      "platform": "bilibili"
    },
    {
      "id": "•••",
      "url": "https://www.bilibili.com/video/BV1uv411q7Mv#reply251062381824",
      "text": "最喜欢的创作了",
      "like_count": 1,
      "reply_count": 0,
      "posted_at": "2024-12-30T11:56:13+00:00",
      "root_comment_id": "•••",
      "video_id": "BV1uv411q7Mv",
      "author_id": "•••",
      "author_name": "老•••l",
      "author_url": "https://space.bilibili.com/•••",
      "author_avatar_url": "https://i1.hdslb.com/•••",
      "author_level": 6,
      "is_by_uploader": false,
      "ip_location": "•••",
      "platform": "bilibili"
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": 5,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=bilibili
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
