WeChat Get Article Comments
## Purpose Get one page of featured comments on a WeChat Official Account article, with comment counts and pagination information. ## Inputs Supply a required `request_body` object: - `url` (required): WeChat article URL, for example `https://mp.weixin.qq.com/s/…`; maximum 2,048 characters. - `buffer` (optional, string or null; default `""`): Leave empty for the first page. For subsequent pages, copy the previous response's `data.buffer`; maximum 8,192 characters. - `raw` (optional, boolean; default `true`): `true` returns full raw comment objects; `false` returns a simplified comment view. - `comment_id` (optional, numeric string or null; maximum 32 digits): Article-level comment identifier. If already available from article details, supplying it can reduce latency. It is not an individual comment's `content_id`. ## Results `data.comments` contains the current page. The page summary includes `appmsgid` (article message ID), `elected_total` (featured comment count), `total_count` (total comment count), `comment_id` (article-level comment identifier), `buffer` (next-page cursor), and `has_more` (whether another page exists). In simplified mode, each comment includes its `content_id`, commenter nickname, text, likes, timestamp, IP region, featured/pinned flags, reply count (`reply_total`), and reply previews (`replies`). Raw mode preserves additional comment fields and represents reply information in `reply_new.reply_total_cnt` and `reply_new.reply_list`. Pass `data.buffer` back as `request_body.buffer` to continue; stop when `data.has_more` is `false`. The last-page cursor is an empty string. This is a single-page result, not a complete export of all comments or replies. Full second-level replies require separate retrieval using the individual comment's `content_id`. ## Handling notes Preserve large IDs as strings with precision-safe JSON parsing; do not convert them through JavaScript `Number`. Responses may be slow, so a 30-second client timeout is recommended. This is a client setting, not an additional tool input.
Pricing
| Condition | Charge |
|---|---|
| Each call | 20.65 credits/call |
Each call has a fixed charge of 20.65 credits. Charges are per query. A successful query is billed even if it returns no results.
Each call retrieves one page of featured comments. Each subsequent page requested using the pagination cursor is billed as a separate call.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | 获取微信公众号文章一页精选评论的请求体对象:url 为必填文章链接;buffer 为可选翻页游标,首页留空,后续页传入上一页响应的 data.buffer;raw 可选,用于选择完整原始评论对象或精简视图;comment_id 可选,为已知的文章级评论标识,提供后可减少文章抓取解析耗时。/Request body object for retrieving one page of featured comments on a WeChat Official Account article: url is the required article URL; optional buffer is the pagination cursor, left empty for the first page and set to the previous response's data.buffer for subsequent pages; optional raw selects full raw comment objects or a simplified view; optional comment_id is a known article-level comment identifier that can reduce article fetching and parsing latency. | — |
request_body.raw | boolean | No | True=原始响应;False=精简解析结构/True=raw response; False=simplified parsed structure | true |
request_body.url | string | Yes | 公众号文章链接(https://mp.weixin.qq.com/s/…)/WeChat MP article URL (https://mp.weixin.qq.com/s/…) | — |
request_body.buffer | string | null | No | 翻页游标,首页留空;翻页传上一页响应的 buffer/Pagination cursor, leave empty for first page; pass buffer from the previous response | "" |
request_body.comment_id | string | null | No | 文章的评论 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 | — |
Invocation example
Copy the request and explore its response example.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_wechat_get_article_comments' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"buffer": "",
"comment_id": "4454525788075278340",
"raw": false,
"url": "https://mp.weixin.qq.com/s?__biz=MzYzMTg0NzQ1NA==&mid=2247483667&idx=1&sn=9094067913f488740a83b73b26d625a0&chksm=f1fc4554c0949a35cfc73d1042f398dc51476a0b8c85b074412d5d1e717c09af83abbb3006d7&scene=126&sessionid=0#rd"
}
}
}'{
"code": 200,
"data": {
"appmsgid": "2247483667",
"buffer": "GAAgADAA",
"comment_id": "4454525788075278340",
"comments": [],
"continue_flag": false,
"debug_id": "de106b31"
},
"docs": "https://api.tikhub.io/#/WeChat-Media-Platform-V2-API/fetch_article_comments_api_v1_wechat_mp_v2_fetch_article_comments_post",
"message": "Request successful. This request will incur a charge.",
"message_zh": "请求成功,本次请求将被计费。",
"params": {
"buffer": "",
"comment_id": "4454525788075278340",
"raw": false,
"url": "https://mp.weixin.qq.com/s?__biz=MzYzMTg0NzQ1NA==&mid=2247483667&idx=1&sn=9094067913f488740a83b73b26d625a0&chksm=f1fc4554c0949a35cfc73d1042f398dc51476a0b8c85b074412d5d1e717c09af83abbb3006d7&scene=126&sessionid=0#rd"
}
}This example shows part of the response. Copied content is valid JSON.


