WeChat Get Article Detail H5
Retrieve the text and metadata of a WeChat Official Account article from its link. Inputs: - request_body is required. Its url must be a WeChat article URL, such as https://mp.weixin.qq.com/s/... or a long article link containing __biz, matching the declared URL format and no longer than 2048 characters. - request_body.raw is optional and defaults to true. Set it to false for core article fields; true adds metadata such as account avatars, copyright status and the fetched page's HTML character count. The top-level result structure is unchanged. Results: The response returns article details directly under data: url is the article URL, bizUin identifies the account, itemIdx is the article position, and content contains the parsed article. Typical details include the title, author, account name, summary, cover image, publication time, plain-text body and HTML body. Albums, tags and images may also be available, depending on the article. Publication timestamps are in seconds. Limitations and handling: - content._content_type distinguishes article, immersive, video and unknown page types. content.content_noencode contains HTML only for article pages; it is empty for other types. For unknown types, the body is the summary. - Readership metrics and comment lists are not included. The comment_id field is an identifier, not comment content, and may be empty on immersive or image pages. - Page retrieval and parsing can be slower than a lightweight detail lookup; a 30-second client timeout is recommended. - Preserve large IDs such as mid and comment_id as strings with lossless JSON parsing. Do not convert them through JavaScript Number.
Pricing
| Condition | Charge |
|---|---|
| Each call | 20.65 credits/call |
20.65 credits/call Charges are per query. A successful query is billed even if it returns no results.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | 用于获取微信公众号文章正文与元信息的请求体对象。url 为必填的文章链接;raw 为可选字段,默认 true,控制是否附带头像、版权状态和页面 HTML 字符数等额外元信息,false 时仅返回核心字段。 | — |
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/… 或带 __biz 的长链)/WeChat MP article URL (https://mp.weixin.qq.com/s/… or long URL with __biz) | — |
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_detail_h5' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"raw": false,
"url": "http://mp.weixin.qq.com/s?__biz=MzA3MTA0MTMzNw==&mid=2652035045&idx=1&sn=87f35e64a73991b818cb1915cc112c1b&chksm=85b3942d9b3716cee7c93e2bec3835efa8ac0cd068c6530b65dbd31dcffeeade821971b8dbea&scene=126&sessionid=0#rd"
}
}
}'{
"detail": {
"code": 400,
"docs": "https://api.tikhub.io/#/WeChat-Media-Platform-V2-API/fetch_article_detail_h5_api_v1_wechat_mp_v2_fetch_article_detail_h5_post",
"headers": {},
"message": "Request failed. Please retry. Check the docs below to verify your parameters, test with the default demo parameters, and send the response JSON to support. You won't be charged for this request.",
"message_zh": "请求失败,请重试。请查看下方文档核对参数,使用默认演示参数测试,并将响应 JSON 提交给支持团队。本次请求不会被扣费。",
"params": {
"raw": false,
"url": "http://mp.weixin.qq.com/s?__biz=MzA3MTA0MTMzNw==&mid=2652035045&idx=1&sn=87f35e64a73991b818cb1915cc112c1b&chksm=85b3942d9b3716cee7c93e2bec3835efa8ac0cd068c6530b65dbd31dcffeeade821971b8dbea&scene=126&sessionid=0#rd"
}
}
}This example shows part of the response. Copied content is valid JSON.


