# 微信视频号 评论 API (wechat_channels.comments)

- Canonical page: https://everyinfra.com/wechat-channels-api/comments
- Endpoint: POST /api/v1/social with {"platform": "wechat_channels", "action": "comments", "params": {...}}
- Price: $0.008 per call ($8 per 1,000 requests); failed and empty results are not charged
- Returns: list, one page of up to 25 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=wechat_channels&action=comments

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| object_id | not declared | yes | not declared | 要读评论的视频 ID，纯数字（例如 15039881603147501275），取自 user_posts 或 video 返回行的 id；也可以直接传视频的分享链接（https://weixin.qq.com/sph/…）。每次返回一页顶层评论。 |
| page_token | not declared | no | not declared | 翻页令牌：把上一次响应里的 next_page_token 原样传回，拿下一页；不传从第一页开始。object_id 须与拿到令牌的那次调用一致，令牌 24 小时有效，每页算一次调用。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 视频 ID（user_posts / video），纯数字字符串；作为 video 的 object_id 传回可读这条视频。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| like_count | 点赞数：search、user_posts、video 是视频的点赞，comments 是这条评论的点赞。user_posts、video 里过 1 万时平台只给到百位、末尾固定是 02（如 20002 约 2 万）；10 万以上一律是 100002（平台只显示「10万+」）。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| author_username | 作者的视频号账号 ID，形如 v2_…@finder（user_posts / video）；作为 user_posts 的 username 传回可读这个账号的视频。 |
| author_name | 作者昵称（显示名）。 |
| author_avatar_url | 作者头像图片链接（多数平台带签名、会过期）。 |
| ip_location | platform-native meaning |
| next_page_token | platform-native meaning |
| 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": "wechat_channels",
  "action": "comments",
  "params": {
    "object_id": "15039881603147501275"
  }
}'
```

```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": "wechat_channels",
        "action": "comments",
        "params": {
            "object_id": "15039881603147501275",
        },
    },
    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": "wechat_channels",
  "action": "comments",
  "results": [
    {
      "id": …,
      "text": …,
      "like_count": …,
      "posted_at": …,
      "author_username": …,
      "author_name": …,
      "author_avatar_url": …,
      "ip_location": …,
      "next_page_token": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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