Explore our Marketplace to buy and sell APIs, services, and social media solutions. Connect with a vibrant community of developers, businesses, and creators!
/fetch_article_stats 是两个独立接口,| 接口 | 能取到 | 建议 |
|---|---|---|
/fetch_article_stats | 阅读量 / 点赞 / 在看 / 分享 / 收藏 / 评论数(全部指标) | 需要阅读量等指标时用 |
/fetch_article_stats_h5(本接口) | 仅评论数 / 精选评论数;稳定性更好 | 只要评论数、或上面那条报错时用 |
null 并列在$.data.unavailable[],不会用 0 冒充 —— 调用方可据此区分「这篇文章真的是 0」/fetch_article_stats。comment_id / appmsgid 为 64 位大整数,请以字符串方式接收 / 传递。comment_id 可让上游跳过整篇文章的抓取解析,实测本接口从 15.10s 降到 6.91s / 评论接口从 8.28s 降到 6.13s。该值取自 /fetch_article_detail 或 /fetch_article_detail_h5 响应的 $.data.content.comment_id,拿它是零成本的。https://mp.weixin.qq.com/s/…)。null 并列在 unavailable[]raw=false(计数):#$.data.comment_count: 评论总数$.data.elected_comment_count: 精选评论数$.data.read_num / $.data.like_count / $.data.old_like_count /$.data.share_count / $.data.collect_count / $.data.star_num: 本接口恒为 null$.data.unavailable[]: 本接口取不到的字段名清单(与上一行对应)raw=true(附带原始计数字段):#data 顶层同 raw=false,另加:$.data.comment_raw.total_count / $.data.comment_raw.elected_total: 评论接口给的原始计数$.data.comment_raw.comment_id / $.data.comment_raw.appmsgid: 文章的评论 id / 图文 idnull and listed in $.data.unavailable[] (never faked as 0). Use/fetch_article_stats when you need them.Authorization: Bearer ********************curl --location 'https://api.tikhub.io/api/v1/wechat_mp/v2/fetch_article_stats_h5' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw",
"raw": true,
"comment_id": "string"
}'{
"code": 200,
"request_id": "string",
"message": "Request successful. This request will incur a charge.",
"message_zh": "请求成功,本次请求将被计费。",
"support": "Discord: https://discord.gg/aMEAS8Xsvz",
"time": "string",
"time_stamp": 0,
"time_zone": "America/Los_Angeles",
"docs": "string",
"cache_message": "string",
"cache_message_zh": "string",
"cache_url": "string",
"router": "",
"params": {},
"data": null
}