WeChat Article Metrics Scraper — 公众号文章阅读/点赞/分享/收藏数 avatar

WeChat Article Metrics Scraper — 公众号文章阅读/点赞/分享/收藏数

Pricing

$0.06 / actor start

Go to Apify Store
WeChat Article Metrics Scraper — 公众号文章阅读/点赞/分享/收藏数

WeChat Article Metrics Scraper — 公众号文章阅读/点赞/分享/收藏数

EN — Fetch WeChat article metrics: read/like/share/collect/comment/star counts. default returns full; h5 is fast path (comments + elected comments). Free users: 5 runs/day. ZH — 公众号文章互动数据:阅读/点赞/分享/收藏/评论/星标数。default 全量,h5 仅评论数+精选评论数。

Pricing

$0.06 / actor start

Rating

0.0

(0)

Developer

wang wei

wang wei

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Categories

Share

WeChat Article Metrics Scraper

EN — Fetch public interaction metrics for any WeChat Official Account article. Returns read count, like count, share count, collect count, comment count, and star count. Two engines: default returns full metrics; h5 is a fast path that returns only comment_count and elected_comment_count, with an optional pre-known comment_id to skip the HTML pre-fetch.

ZH — 抓取任意公众号文章的公开互动数据:阅读数、点赞数、分享数、收藏数、评论数、星标数。两种引擎:default 返回全量指标;h5 是快速路径,只返回评论数 + 精选评论数,可通过预知 comment_id 跳过 HTML 预抓(节省约一半延迟)。


When to use this Actor

GoalActor
List every article on an accountWeChat Account Articles Scraper
Read a single article's full body + authorWeChat Article Detail Scraper
Pull interaction metrics for a given article URL (this Actor)—
Read the account's profile (IP region, original count, ban status)WeChat Account Profile Scraper
Read all comments + replies on an articleWeChat Article Comments Scraper
Search across all of WeChatWeChat Universal Search Scraper

Input

FieldTypeDefaultNotes
urlstringhttps://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIwArticle URL. Both short (/s/<sn>) and long (/s?__biz=...&mid=...) forms accepted.
enginestring"default"default = full metrics via /fetch_article_stats. h5 = /fetch_article_stats_h5 fast path; returns only comment_count + elected_comment_count.
commentIdstring""Pre-known comment_id from /fetch_article_detail response's commentId field. Only used when engine=h5; speeds up the upstream call by skipping the HTML pre-fetch. Leave empty to let upstream fetch the article HTML itself.
rawstring"false"false = omit raw upstream payload; true = attach rawData for debugging.

Where to get a URL


Output (one row per Actor run)

engine=default

{
"url": "https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw",
"engine": "default",
"readNum": 19839,
"likeCount": 74,
"oldLikeCount": 123,
"shareCount": 693,
"collectCount": 108,
"starNum": 46,
"commentCount": 3,
"electedCommentCount": null,
"unavailable": [],
"collectedAt": "2026-09-16T12:00:00.000Z"
}

engine=h5

{
"url": "https://mp.weixin.qq.com/s/...",
"engine": "h5",
"readNum": null,
"likeCount": null,
"oldLikeCount": null,
"shareCount": null,
"collectCount": null,
"starNum": null,
"commentCount": 4,
"electedCommentCount": 2,
"unavailable": ["read_num", "like_count", "old_like_count", "share_count", "collect_count", "star_num"],
"collectedAt": "2026-09-16T12:00:00.000Z"
}

Field notes

  • For engine=h5, fields the H5 page doesn't expose come back as null (not zero). The unavailable array lists the names the upstream explicitly marked unavailable.
  • oldLikeCount is the legacy "likes" count tracked separately from the modern in-article likes.
  • starNum is "star" (星标) — users who favorited the official account from this article.
  • electedCommentCount is the count of comments hand-picked by the publisher (精选评论).

How to run

  1. Console: paste any article URL (or use the default) and click Start.
  2. API:
    curl -X POST "https://api.apify.com/v2/acts/<ACTOR_ID>/runs?waitForFinish=60" \
    -H "Authorization: Bearer <APIFY_TOKEN>" \
    -H "Content-Type: application/json" \
    -d '{"url":"https://mp.weixin.qq.com/s/...", "engine":"default"}'
  3. CLI:
    apify call wechat-article-metrics-scraper \
    -i '{"url":"https://mp.weixin.qq.com/s/...", "engine":"h5", "commentId":"12345"}'

Free users: 5 runs/day. Paid users: 1 PPE event per run (article-metrics-result).


Use it together with the other WeChat Actors

Where in the pipelineActorConsole
step ① listingAccount Articles Scraper…/vxAjW6anQJQWk7xTF
step ② detailArticle Detail Scraper…/5vrr8dBcnclIva0Lx
step ③ metrics (you are here)Article Metrics Scraper…/actor
step ④ commentsArticle Comments Scraper…/comments
step ① profile (alt)Account Profile Scraper…/3JV499ECEjb5un854

You are here: Article Metrics Scraper (step ③) — pair it with a Detail Scraper output to get the body's commentId and pass it here as commentId for fast-path engine=h5.


Pricing

1 PPE event per Actor run (article-metrics-result). Engine choice doesn't affect pricing — both call the upstream once.


Tests

$npm test

Runs unit assertions (input validation, body shape, normalize across default / h5 / raw=true / raw=false, null handling) plus 9 integration scenarios (mock fetch drives the full run() flow including default/h5 engines, commentId forwarding, free-tier gating, upstream errors).

✅ unit.js: all assertions passed.
integration.js: 9 scenarios passed.