# 微信公众号 文章评论 API (wechat_oa.article_comments)

- Canonical page: [https://everyinfra.com/wechat-oa-api/article_comments](https://everyinfra.com/wechat-oa-api/article_comments?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "wechat_oa", "action": "article_comments", "params": {...}}
- Price: $0.006764 per call ($6.76 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 13, max 260 per call
- Mode: sync; add "mode": "async" for slow tasks

文章评论按公众号文章的 `url` 读取这篇文章下的评论：评论 `id`、正文 `text`、评论者昵称和头像、点赞数 `like_count`、发布时间 `posted_at`，以及是否置顶 `is_top`、回复数 `reply_count` 和评论者所在的国家、省份。收集读者反馈、做口碑抽样，或把置顶评论单独拎出来看，都从这里取数。

`reply_count` 为 null 表示不公开，不等于没有回复；想看某条评论下的回复，把这条评论的 ID 和同一个文章链接交给评论回复那一页。评论时间 `posted_at` 是 UTC 时区的 ISO 8601 格式，展示前要换算成本地时间。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | article_comments / comment_replies / article_metrics / article_detail 使用 mp.weixin.qq.com 的文章自身链接（打开文章后复制：/s/<id> 短链，或带 __biz、mid、idx、sn 的链接）；从搜索结果复制的临时链接（带 signature/timestamp）可能读不了，读不了时扣费前返回 422。账号类接口仅把它作为公众号解析的最低优先级输入。 |
| limit | integer (1–260) | no | 13 | 这次调用最多返回的条数，整数，1–260；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| author_name | 作者昵称（显示名）。 |
| author_avatar_url | 作者头像。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| is_top | 是否为置顶内容。 |
| reply_count | 回复数，通常用于评论的子回复。null 表示不公开。 |
| country | 国家或地区。可能是全称也可能是 ISO 代码，取决于平台，未归一。 |
| province | 所在省份。 |
| 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_oa",
  "action": "article_comments",
  "params": {
    "url": "https://mp.weixin.qq.com/s?__biz=MzA4MTg0MjA5OQ==&mid=2655362972&idx=1&sn=b56fabd8e4c53259498100f05f20dbb0"
  }
}'
```

```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_oa",
        "action": "article_comments",
        "params": {
            "url": "https://mp.weixin.qq.com/s?__biz=MzA4MTg0MjA5OQ==&mid=2655362972&idx=1&sn=b56fabd8e4c53259498100f05f20dbb0",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

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

```text
{
  "id": "req_…",
  "platform": "wechat_oa",
  "action": "article_comments",
  "results": [
    {
      "id": "•••",
      "text": "我曾经因为不刮腋毛被朋友说“恶心”。。。。。\n不知道哪里来的这种审美捆绑。。。。。。\n谢谢丁香为我正名！！！！！",
      "author_name": "•••",
      "author_avatar_url": "https://wx.qlogo.cn/•••",
      "like_count": 1056,
      "posted_at": "2026-07-31T03:59:18+00:00",
      "is_top": 0,
      "reply_count": 4,
      "country": "中国",
      "province": "广东",
      "platform": "wechat_oa"
    },
    {
      "id": "•••",
      "text": "有没有什么止汗露什么的测评来一期！ 爱出汗星人强烈求一期",
      "author_name": "•••",
      "author_avatar_url": "https://wx.qlogo.cn/•••",
      "like_count": 235,
      "posted_at": "2026-07-31T03:59:05+00:00",
      "is_top": 0,
      "reply_count": 1,
      "country": "中国",
      "province": "湖南",
      "platform": "wechat_oa"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 什么样的 `url` 能读到评论？

用打开文章后复制的链接：/s/<id> 短链，或带 __biz、mid、idx、sn 的链接。从搜索结果复制的临时链接带 signature 和 timestamp，可能读不了，读不了时会在扣费前返回 422。

### 一次能拿多少条评论？

默认只给 13 条，做舆情抽样时记得把 `limit` 调大，单次上限是 260 条。`like_count` 为 null 表示不公开，不等于 0，按点赞排序前先把 null 单独处理。

### 评论回复那个接口里有 `is_top` 和 `reply_count` 吗？

没有。这两项是文章评论独有的：`is_top` 标是否置顶，`reply_count` 通常用于评论的子回复数，null 表示不公开。评论回复那个接口换成了评论者的城市。

## Also

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