---
title: "获取公众号文章评论/Get WeChat MP Article Comments"
method: POST
path: "/api/v1/wechat_mp/v2/fetch_article_comments"
tags: ["WeChat-Media-Platform-V2-API"]
---

# 获取公众号文章评论/Get WeChat MP Article Comments

`POST /api/v1/wechat_mp/v2/fetch_article_comments`

## Request

- Base URL: `https://api.tikhub.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tikhub.io/api/v1/wechat_mp/v2/fetch_article_comments`
- Auth: HTTP bearer

# [中文]
### 用途:
- 获取公众号文章评论（单页，`buffer` 游标翻页），返回文章的一页精选评论。
- **翻页**：首页 `buffer` 留空 → 取响应的 `buffer` → 下次请求传回 `buffer` 取下一页；`has_more` 为 false 即到末页。
- 逐条评论的二级回复请用 `fetch_comment_replies`（传评论的 `content_id`）。
- 价格：0.01$/次
- ⏱️ 由于微信服务器原因，本接口响应较慢，请将客户端请求超时（timeout）设置为 30 秒；timeout 设置过小会造成已扣费但收不到响应的情况。
- ⚠️ 大整数 ID 精度：响应中的 `content_id` 等为 64 位大整数，超出 JavaScript 安全整数范围（2^53-1）。请始终以**字符串**方式接收 / 传递这类 ID（解析 JSON 用 json-bigint 或按文本取值），勿让其经过 JS `Number`。Swagger UI 文档页对超大整数会末位舍入显示，属正常现象，不影响接口实际返回的数据。
- 💡 **提速**：传 `comment_id` 可让上游跳过整篇文章的抓取解析，实测本接口从 15.10s 降到 6.91s / 评论接口从 8.28s 降到 6.13s。该值取自 `/fetch_article_detail` 或 `/fetch_article_detail_h5` 响应的 `$.data.content.comment_id`，拿它是零成本的。
### 参数:
- url: 公众号文章链接（`https://mp.weixin.qq.com/s/…`）。示例 `https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw`
- buffer: 可选，默认空。翻页游标，首页留空；翻页传上一页响应的 `buffer`。
- raw: 可选，默认 True。True=完整原始评论对象；False=精简评论视图。
### 返回:
- 单页评论列表及翻页游标

### 响应结构与 JSON Path:
#### `raw=false`（精简视图）:
- `data` 外层为本页汇总，`comments[]` 为精简评论:
    - `$.data.appmsgid`: 图文消息 id
    - `$.data.elected_total`: 精选评论总数
    - `$.data.total_count`: 评论总数
    - `$.data.buffer`: 下一页游标（翻页回传 `buffer`；末页为空串）
    - `$.data.has_more`: 是否还有下一页
    - `$.data.comment_id`: 文章评论标识（内部用）
    - `$.data.comments[N].content_id`: 评论 id（**喂 `fetch_comment_replies` 的 `content_id`**）
    - `$.data.comments[N].nick_name`: 评论者昵称
    - `$.data.comments[N].content`: 评论内容
    - `$.data.comments[N].like_num`: 点赞数
    - `$.data.comments[N].create_time`: 评论时间戳
    - `$.data.comments[N].ip_wording`: IP 归属地（`province_name` / `city_name` 等）
    - `$.data.comments[N].is_elected` / `is_top`: 是否精选 / 置顶
    - `$.data.comments[N].reply_total`: 二级回复总数
    - `$.data.comments[N].replies[]`: 二级回复预览（精简，见 `fetch_comment_replies`）
#### `raw=true`（原始）:
- `data` 外层同上（`appmsgid` / `elected_total` / `total_count` / `buffer` / `has_more` / `comment_id`），`comments[]` 为完整原始评论对象，字段更全（snake_case）:
    - `$.data.comments[N].content_id`: 评论 id（同精简模式，仍是喂 `fetch_comment_replies` 的值）
    - `$.data.comments[N].content` / `nick_name` / `like_num` / `create_time` / `ip_wording` / `is_elected` / `is_top`: 与 `raw=false` 同名同义
    - 原始模式额外字段: `$.data.comments[N].id`（楼层序号）/ `openid` / `identity_type` / `logo_url`（头像）/ `like_status` / `is_from_me` / `$.data.comments[N].reply_new`（含 `reply_total_cnt` / `reply_list`，对应精简模式的 `reply_total` / `replies`）

# [English]
### Purpose:
- Get WeChat MP article comments (single page, `buffer` cursor pagination); returns one page of featured comments.
- **Pagination**: leave `buffer` empty for the first page → take `buffer` from the response → pass it back in the next request; `has_more` false means the last page.
- For second-level replies of a specific comment, use `fetch_comment_replies` (pass the comment's `content_id`).
- Price: $0.01 per request
- ⏱️ Due to WeChat server latency, this endpoint responds slowly; please set your client request timeout to 30 seconds — a timeout that is too small may result in being billed without receiving the response.
- ⚠️ Large-integer ID precision: IDs such as `content_id` in the response are 64-bit big integers beyond JavaScript's safe-integer range (2^53-1). Always receive / pass such IDs as **strings** (parse JSON with json-bigint or read them as text), never through JS `Number`. Swagger UI rounds the trailing digits of huge integers in its docs view — this is expected and does not affect the actual data returned by the API.
### Parameters:
- url: WeChat MP article URL (`https://mp.weixin.qq.com/s/…`). E.g. `https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw`
- buffer: Optional, default empty. Pagination cursor; leave empty for the first page, pass `buffer` from the previous response for the next page.
- raw: Optional, default True. True=full raw comment objects; False=simplified comment view.
### Return:
- One page of comments with pagination cursor

### Response structure & JSON Path:
#### `raw=false` (simplified view):
- `data` outer level is the page summary; `comments[]` are simplified comments:
    - `$.data.appmsgid`: message id
    - `$.data.elected_total`: total featured comments
    - `$.data.total_count`: total comments
    - `$.data.buffer`: next-page cursor (pass back as `buffer`; empty string at the last page)
    - `$.data.has_more`: whether there is a next page
    - `$.data.comment_id`: article comment identifier (internal)
    - `$.data.comments[N].content_id`: comment id (**feed into `content_id` of `fetch_comment_replies`**)
    - `$.data.comments[N].nick_name`: commenter nickname
    - `$.data.comments[N].content`: comment content
    - `$.data.comments[N].like_num`: like count
    - `$.data.comments[N].create_time`: comment timestamp
    - `$.data.comments[N].ip_wording`: IP region (`province_name` / `city_name` etc.)
    - `$.data.comments[N].is_elected` / `is_top`: featured / pinned flags
    - `$.data.comments[N].reply_total`: total second-level replies
    - `$.data.comments[N].replies[]`: reply preview (simplified, see `fetch_comment_replies`)
#### `raw=true` (raw):
- `data` outer level same as above (`appmsgid` / `elected_total` / `total_count` / `buffer` / `has_more` / `comment_id`); `comments[]` are full raw comment objects with more fields (snake_case):
    - `$.data.comments[N].content_id`: comment id (same as simplified mode, still the value fed into `fetch_comment_replies`)
    - `$.data.comments[N].content` / `nick_name` / `like_num` / `create_time` / `ip_wording` / `is_elected` / `is_top`: same names and meanings as `raw=false`
    - Raw-only extra fields: `$.data.comments[N].id` (floor number) / `openid` / `identity_type` / `logo_url` (avatar) / `like_status` / `is_from_me` / `$.data.comments[N].reply_new` (with `reply_total_cnt` / `reply_list`, corresponding to `reply_total` / `replies` of the simplified mode)

## Request body

- FetchArticleCommentsRequest
  - `url` string, required: 公众号文章链接（https://mp.weixin.qq.com/s/…）/WeChat MP article URL (https://mp.weixin.qq.com/s/…)
  - `buffer` string, nullable: 翻页游标，首页留空；翻页传上一页响应的 buffer/Pagination cursor, leave empty for first page; pass buffer from the previous response
  - `comment_id` string, nullable: 文章的评论 id（可选，**性能捷径**）：不传时上游要先抓并解析整篇文章 HTML 才能拿到它，约占本接口耗时的一半；已有该值时传进来可显著加快。取自 /fetch_article_detail 或 /fetch_article_detail_h5 响应的 `$.data.content.comment_id`/Article comment id (optional, performance shortcut): when omitted, upstream must fetch and parse the whole article HTML to obtain it, which accounts for about half of this endpoint's latency
  - `raw` boolean: True=原始响应；False=精简解析结构/True=raw response; False=simplified parsed structure

## Response `200`

Successful Response

- ResponseModel
  - `code` integer: HTTP status code | HTTP状态码
  - `request_id` string, nullable: Unique request identifier | 唯一请求标识符
  - `message` string: Response message (EN-US) | 响应消息 (English)
  - `message_zh` string: Response message (ZH-CN) | 响应消息 (中文)
  - `support` string: Support message | 支持消息
  - `time` string: The time the response was generated | 生成响应的时间
  - `time_stamp` integer: The timestamp the response was generated | 生成响应的时间戳
  - `time_zone` string: The timezone of the response time | 响应时间的时区
  - `docs` string, nullable: Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接
  - `cache_message` string, nullable: Cache message (EN-US) | 缓存消息 (English)
  - `cache_message_zh` string, nullable: Cache message (ZH-CN) | 缓存消息 (中文)
  - `cache_url` string, nullable: The URL to access the cached result | 访问缓存结果的 URL
  - `router` string: The endpoint that generated this response | 生成此响应的端点
  - `params` unknown
  - `data` unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-08** `96a122a5f220`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-09-08** `485e774cb449`: 1 info
  - added the new optional request property `comment_id`
- **2026-09-01** `50f9ec6e1cd3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/changes/api/v1/wechat_mp/v2/fetch_article_comments/post.md)

---

[API](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi.md) - [All operations](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/llms.txt) - [OpenAPI document](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/revisions/86a3483c705a?raw)
