# 微博 评论回复 API (weibo.comment_replies)

- Canonical page: https://everyinfra.com/weibo-api/comment_replies
- Endpoint: POST /api/v1/social with {"platform": "weibo", "action": "comment_replies", "params": {...}}
- Price: $0.000806 per call ($0.81 per 1,000 requests); failed and empty results are not charged
- Returns: list, default 20, max 20 per call (larger values are capped)
- Mode: sync; add "mode": "async" for slow tasks

微博评论回复按一级评论的 `comment_id` 读取它下面的回复，每条带正文、点赞数、发布时间、IP 属地 `ip_location`、回复者昵称和头像；`root_comment_id` 是所在的一级评论，`reply_to_comment_id` 标出这条是在回复哪一条回复。它回答「这条评论下面大家怎么接话、怎么争」，适合舆情分析里深挖高热评论、还原一段争论的来回，或者收集用户的追问和补充。

`comment_id` 是数字 ID，从微博评论结果每行的 `id` 取。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| comment_id | not declared | yes | not declared | 一级评论的数字 ID（weibo comments 返回行的 id）。 |
| limit | integer (1–20) | no | 20 | 这次调用最多返回的条数，整数，1–20；不传按默认值，实际返回可能少于这个数。超过上限照收，按上限返回。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| 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）；直接回复一级评论时没有这个字段。 |
| ip_location | 发布时的 IP 属地（comment_replies），如「来自 广东」；微博没显示时没有。 |
| author_id | 作者在原平台的唯一 ID。 |
| author_name | 作者昵称（显示名）。 |
| author_avatar_url | 作者头像。 |
| 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": "weibo",
  "action": "comment_replies",
  "params": {
    "comment_id": "5334306381630982"
  }
}'
```

```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": "weibo",
        "action": "comment_replies",
        "params": {
            "comment_id": "5334306381630982",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "weibo",
  "action": "comment_replies",
  "results": [
    {
      "id": …,
      "text": …,
      "like_count": …,
      "posted_at": …,
      "root_comment_id": …,
      "reply_to_comment_id": …,
      "ip_location": …,
      "author_id": …,
      "author_name": …,
      "author_avatar_url": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 怎么把回复还原成对话结构？

用 `reply_to_comment_id` 连线：有这个字段的回复是在回某一条回复，没有的则直接回复一级评论。按这层关系把回复挂成树，就能看清谁在和谁对话。

### `ip_location` 能用来做地域分析吗？

可以作为参考。它是微博显示的发布时 IP 属地，比如「来自 广东」，微博没显示时没有这个字段。统计一条热评下回复者的属地分布，可以看出争论主要发生在哪些地区的用户之间。

### 一级评论的 ID 从哪里拿？

先用微博评论读这条微博的一级评论，每行的 `id` 就是这里要的 `comment_id`。挑点赞多、讨论热的那几条传进来，读它们下面的回复。

## Also

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