获取公众号文章详情/Get WeChat MP Article Detail
WeChat MPapi
About
获取公众号文章详情/Get WeChat MP Article Detail
Documentation
获取公众号文章详情/Get WeChat MP Article Detail
[中文]
用途:
- 传文章 URL,返回文章正文 / 标题 / 作者 / 封面 / 发布时间 / 合集信息等。
- 无论
raw取值,嵌套的contentJSON 串都会被解析成对象(结构归一化),raw只控制外层字段的投影范围。 - 价格:0.01$/次
- ⏱️ 由于微信服务器原因,本接口响应较慢,请将客户端请求超时(timeout)设置为 30 秒;timeout 设置过小会造成已扣费但收不到响应的情况。
- ⚠️ 大整数 ID 精度:响应中的
comment_id/msgId等为 64 位大整数,超出 JavaScript 安全整数范围(2^53-1)。请始终以字符串方式接收 / 传递这类 ID(解析 JSON 用 json-bigint 或按文本取值),勿让其经过 JSNumber。Swagger UI 文档页对超大整数会末位舍入显示,属正常现象,不影响接口实际返回的数据。
参数:
- url: 公众号文章链接(
https://mp.weixin.qq.com/s/…或带__biz的长链)。示例https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw - raw: 可选,默认 True。True=原始响应;False=精简投影。
返回:
- 文章详情(正文 / 标题 / 作者 / 封面 / 发布时间 / 合集信息)
响应结构与 JSON Path:
raw=false(精简投影):
data顶层仅 4 个字段,文章正文聚合在content:$.data.url: 文章 URL$.data.bizUin: 公众号 bizUin(int)$.data.itemIdx: 图文位置序号$.data.content: 已解析的正文对象,常用路径:$.data.content.title: 标题$.data.content.nick_name/$.data.content.user_name: 公众号名 / gh_username$.data.content.author: 作者$.data.content.desc: 摘要$.data.content.create_time: 发布时间("2025-03-05 12:22"文本)$.data.content.ori_create_time: 发布时间戳(int 秒)$.data.content.cdn_url: 封面图$.data.content.comment_id: 评论 id(喂评论接口的内部 id)$.data.content.appmsgalbuminfo: 所属合集(album_id/title/ 上下篇链接)$.data.content.content_text: 正文 HTML 转出的纯文字
raw=true(原始):
data为完整 item(含raw=false的全部字段,外加模板 / 缓存 / 时间等元信息):$.data.url/$.data.bizUin/$.data.itemIdx: 同精简模式$.data.msgId: 图文消息 id$.data.lastModifyTime: 最后修改时间戳$.data.tmplVersion/$.data.tmplVersions[]: H5 模板版本$.data.clientCacheTime: 客户端缓存秒数$.data.content.*: 与raw=false的content同结构(同样含content_text)
[English]
Purpose:
- Pass an article URL to get the article body / title / author / cover / publish time / album info.
- Regardless of
raw, the nestedcontentJSON string is always parsed into an object (structure normalized);rawonly controls the projection scope of outer fields. - 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
comment_id/msgIdin 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 JSNumber. 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/…or long URL with__biz). E.g.https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw - raw: Optional, default True. True=raw response; False=simplified projection.
Return:
- Article detail (body / title / author / cover / publish time / album info)
Response structure & JSON Path:
raw=false (simplified projection):
datahas only 4 top-level fields; the article body is aggregated incontent:$.data.url: article URL$.data.bizUin: official account bizUin (int)$.data.itemIdx: article position index$.data.content: parsed body object, common paths:$.data.content.title: title$.data.content.nick_name/$.data.content.user_name: account name / gh_username$.data.content.author: author$.data.content.desc: digest$.data.content.create_time: publish time (text like"2025-03-05 12:22")$.data.content.ori_create_time: publish timestamp (int seconds)$.data.content.cdn_url: cover image$.data.content.comment_id: comment id (internal id fed into comment endpoints)$.data.content.appmsgalbuminfo: album info (album_id/title/ prev & next links)$.data.content.content_text: plain text extracted from the body HTML
raw=true (raw):
datais the full item (all fields ofraw=false, plus template / cache / time metadata):$.data.url/$.data.bizUin/$.data.itemIdx: same as simplified mode$.data.msgId: message id$.data.lastModifyTime: last modified timestamp$.data.tmplVersion/$.data.tmplVersions[]: H5 template versions$.data.clientCacheTime: client cache seconds$.data.content.*: same structure ascontentofraw=false(also includescontent_text)
Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.
Try 获取公众号文章详情/Get WeChat MP Article Detail
Test this model in the Sandbase Playground with your own prompts.
Open in PlaygroundRelated Models
获取公众号文章列表/Get WeChat MP Account ArticlesWeChat MPapi获取公众号资料页/Get WeChat MP Account ProfileWeChat MPapi获取公众号服务/自定义菜单/Get WeChat MP Account Services & Custom MenuWeChat MPapi获取公众号文章广告/Get WeChat MP Article AdsWeChat MPapi获取公众号文章评论/Get WeChat MP Article CommentsWeChat MPapi获取公众号文章互动数据/Get WeChat MP Article StatsWeChat MPapi获取公众号评论的二级回复/Get WeChat MP Comment RepliesWeChat MPapi获取公众号关联文章/Get WeChat MP Related ArticlesWeChat MPapi