Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

WeChat MP Article Stats (H5)

Dokumentasi API
https://api.sandbase.ai/v1/api/wechat-mp/v2/article-stats-h5

Get WeChat MP Article Stats (H5) on WeChat MP. Returns the platform data as structured JSON.

Harga
$0.01USD / panggilan
Metode
POST
Respons
JSON
Parameter
1 wajib · 2 opsional

Playground

Input
/mp.weixin.qq.com/s/WeChat MP article URL (https://mp.weixin.qq.com/s/… or long URL with __biz)
True=raw response; False=simplified parsed structure
Article comment id (optional, performance shortcut): when omitted, the API must fetch and parse the whole article HTML to obtain it, which accounts for about half of this endpoint's latency
OutputSiap

Output Anda akan muncul di sini

Lengkapi input, lalu klik Run.

README API

WeChat MP Article Stats (H5) API

Returns comment counts and engagement stats for one WeChat official account article. It needs the article url, either the short https://mp.weixin.qq.com/s/… form or the long form with __biz.

Use cases

  • Track how many comments a WeChat article has gathered, and how many were selected for display.
  • Get the comment_id of an article so you can pass it to a comments API.
  • Check which engagement counts WeChat exposes for an article before building a report on it.

Request

curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/v2/article-stats-h5" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw", "raw": true}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
urlstringYes/mp.weixin.qq.com/s/WeChat MP article URL (https://mp.weixin.qq.com/s/… or long URL with __biz)
comment_idstringNoArticle comment id (optional, performance shortcut): when omitted, the API must fetch and parse the whole article HTML to obtain it, which accounts for about half of this endpoint's latency
rawbooleanNoTrue=raw response; False=simplified parsed structure

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "_via": "h5",
  "collect_count": null,
  "comment_count": 26,
  "comment_raw": {
    "appmsgid": "2247780992",
    "comment_id": "3884868893382230017",
    "elected_total": 21,
    "total_count": 26
  },
  "debug_id": "d81634db",
  "debug_info": "gAAAAABq6ZFAaqjYyv3jGWwq26w9Lb0pPyWUxjSpT707gLkGDCq1qMDl2WvffZiKB-HLCwI2aawhofkY…",
  "elected_comment_count": 21,
  "like_count": null,
  "old_like_count": null,
  "read_num": null,
  "share_count": null,
  "star_num": null
}

Response fields

FieldMeaning
comment_countTotal number of comments on the article. It matches comment_raw.total_count.
elected_comment_count / comment_raw.elected_totalNumber of comments that were selected for display on the article.
comment_raw.comment_idID of the article's comment thread. Pass it as comment_id on later calls.
comment_raw.appmsgidID of the article message, returned as a string.
read_num / like_count / old_like_countRead and like counts. In this response they are null and listed in unavailable.
collect_count / share_count / star_numOther engagement counts. In this response they are null, so no value was returned for them.
unavailableList of stat fields that could not be filled for this article.
_viaShows which route returned the data. Here it is h5.

Notes

  • Pass comment_id from comment_raw.comment_id on later calls for the same article. This skips fetching the article page and shortens the response time.
  • Set raw to false to get a simplified parsed structure instead of the raw response.
  • Check unavailable before using a count. Fields listed there are null.
  • To read the comments themselves, call WeChat MP Article Comments.

Pricing

$0.01 per successful call. Failed calls are not charged.

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
WeChat MP$0.01 per panggilanJSON
WeChat MP$0.01 per panggilanJSON
WeChat MP$0.01 per panggilanJSON
WeChat MP$0.01 per panggilanJSON
WeChat MP$0.01 per panggilanJSON
WeChat MP$0.01 per panggilanJSON

Panduan:Best WeChat MP API in 2026: Pricing Compared

Pertanyaan

FAQ

Bagaimana cara menggunakan API WeChat MP Article Stats (H5)?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/wechat-mp/v2/article-stats-h5 dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API WeChat MP Article Stats (H5)?

$0.01 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API WeChat MP Article Stats (H5)?

Wajib: url (string). Opsional: raw (boolean) dan comment_id (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API WeChat MP Article Stats (H5)?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API WeChat MP?

Tidak. WeChat MP Article Stats (H5) berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API WeChat MP secara terpisah.