WeChat Get Article Detail

20.65 credits/call
ae_wechat_get_article_detail

## Purpose Retrieve a WeChat Official Account article's text and details from its URL, including the title, author, account name, digest, cover image, publication time, and album information. ## Inputs - `request_body` is required. - `request_body.url` is required: an `http://` or `https://` article link on `mp.weixin.qq.com/s`, such as a short `/s/…` link or a long `/s?...` link containing `__biz`. Maximum length: 2048 characters. - `request_body.raw` is an optional boolean, defaulting to `true`. Use `true` for the full article item, or `false` for a simplified selection of outer fields. In both modes, `content` is parsed into an object; this setting does not switch content parsing on or off. ## Returned data Article details are under `data`: - With `raw=false`, `data` contains `url` (article URL), `bizUin` (account identifier), `itemIdx` (article position), and `content` (parsed article object). - Common `data.content` fields include `title`, `nick_name` (account name), `user_name` (account username), `author`, `desc` (digest), `create_time` (publication time text), `ori_create_time` (publication timestamp in seconds), `cdn_url` (cover image), `comment_id` (comment identifier), `appmsgalbuminfo` (album ID, title, and previous/next article links), and `content_text` (plain text extracted from the body HTML). - With `raw=true`, `data` includes the same article content plus additional metadata such as `msgId`, `lastModifyTime`, `tmplVersion`, `tmplVersions`, and `clientCacheTime`. ## Usage notes Set the client request timeout to 30 seconds because responses can be slow. IDs such as `comment_id` and `msgId` can exceed JavaScript's safe-integer limit (2^53−1). Use lossless JSON parsing, preserve these IDs as exact strings when receiving or passing them, and do not convert them through JavaScript `Number`. The result contains article details, not the contents of article comments.

Social
20.65 credits/call

Pricing

20.65 credits/call
ConditionCharge
Each call20.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.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYes获取微信公众号文章正文及详情的请求体对象;url 指定文章链接,raw 可选,用于选择返回完整条目或精简外层字段,两种模式均将 content 解析为对象。/Request body for retrieving a WeChat Official Account article's body and details. url specifies the article link; optional raw selects the full item or a simplified projection of outer fields. Both modes parse content into an object.—
request_body.rawbooleanNoTrue=原始响应;False=精简解析结构/True=raw response; False=simplified parsed structuretrue
request_body.urlstringYes公众号文章链接(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.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_wechat_get_article_detail' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "raw": true,
      "url": "https://mp.weixin.qq.com/s?__biz=MzYzMTg0NzQ1NA==&mid=2247484013&idx=1&sn=f6b919c3d4759a99841f7c1902cc9abf&chksm=f1619fbbb0748a14c28aeaf0d8a4308f5b6f6c5682a5cf79b8b1136f146db2e7c822813cfcf6&scene=126&sessionid=0#rd"
    }
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "detail": {
    "code": 400,
    "docs": "https://api.tikhub.io/#/WeChat-Media-Platform-V2-API/fetch_article_detail_api_v1_wechat_mp_v2_fetch_article_detail_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": true,
      "url": "https://mp.weixin.qq.com/s?__biz=MzYzMTg0NzQ1NA==&mid=2247484013&idx=1&sn=f6b919c3d4759a99841f7c1902cc9abf&chksm=f1619fbbb0748a14c28aeaf0d8a4308f5b6f6c5682a5cf79b8b1136f146db2e7c822813cfcf6&scene=126&sessionid=0#rd"
    }
  }
}

This example shows part of the response. Copied content is valid JSON.