Sand AISand AI MAGI-2MAGI-2 est maintenant sur SandBase : vidéo 1080p avec audio natifEssayer maintenant

WeChat MP Account Articles

Docs API
https://api.sandbase.ai/v1/api/wechat-mp/v2/account-articles

Get the published articles of a WeChat official account by its gh_ username: titles, links, covers and post dates, one page at a time, including video and audio tabs.

Prix
$0.01USD / appel
Méthode
POST
Réponse
JSON
Paramètres
1 obligatoires · 4 facultatifs

Bac à sable

Entrée
Official account `gh_username` (`gh_…`). E.g. `gh_363b924965e9`
Optional content tab (matches the "Articles / Videos / Audios" tabs on the account homepage). Empty / `0`=articles (default), `5`=videos, `7`=audios, `8`=image-text posts. Omitting it = articles, behavior unchanged.
Optional pagination cursor (base64), **leave empty for the first page**; for the next page pass `next_offset` from the previous response. E.g. `CAMQChiS5KfRBiAKOJLkp9EGQABIAVgAYABwAQ==`
1020
Optional, default 20, range **10-20**. Articles per page. Plage : de 10 à 20.
Optional, default True. True=raw; False=simplified parsing.
SortieExemple
Réponseoutputs · 5.4 KB · 82 lignes
[
  {
    "data": {
      "articles": [
        {
          "app_msg_id": 2667038019,
          "cover": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXtjiaLuicdMHEgFUZSHeDgNFXX9CbzDlznQyiceDQWBxyWqUbiclf0OKxewMtdJcouASibEF9TeE32ZDibIh2OUQWLILzdXicJqk2OQp0/640?wxtype=jpeg&wxfrom=25",
          "covers": {
            "16_9": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXtjiaLuicdMHEgFUZSHeDgNFXX9CbzDlznQyiceDQWBxyWqUbiclf0OKxewMtdJcouASibEF9TeE32ZDibIh2OUQWLILzdXicJqk2OQp0/640?wxtype=jpeg&wxfrom=25",
            "1_1": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXtPfByjl2776SJvWFtpMC8siaKQO5uepOYhek2BZ5J0np090Hhre0iccxOpJOWKvtoPWXnic4SrJGODCPW8vwgG9TT70zQ0Xtpg3Y/300?wxtype=jpeg&wxfrom=25",
            "235_1": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXtjiaLuicdMHEgFUZSHeDgNFXX9CbzDlznQyiceDQWBxyWqUbiclf0OKxewMtdJcouASibEF9TeE32ZDibIh2OUQWLILzdXicJqk2OQp0/640?wxtype=jpeg&wxfrom=25",
            "3_4": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXtjiaLuicdMHEgFUZSHeDgNFXX9CbzDlznQyiceDQWBxyWqUbiclf0OKxewMtdJcouASibEF9TeE32ZDibIh2OUQWLILzdXicJqk2OQp0/540?wxtype=jpeg&wxfrom=25"
          },
          "create_time": 1791276963,
          "digest": "",
          "idx": 1,
          "is_paid": 0,
          "is_pay_subscribe": 0,
          "item_show_type": 0,
          "msg_type": 9,
          "pic_count": 0,
          "source_url": "https://www.peopleapp.com/home",
          "title": "谁家的龙,一直坐着啊?",
          "update_time": 1791276988,
          "url": "http://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038019&idx=1&sn=43a48edf16265c7ce126b489891309b8&chksm=bcb93d6bfab979d6defef8998806ebd8b9f65b10919fc29d0bb674956d89db0e772ec596b5eb&scene=126&sessionid=0#rd"
        },
        {
          "app_msg_id": 2667037985,
          "cover": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXvKxcQS6a2PZXhN7kq6cEJ0F151GhRziaTmdOGHVKnpQs3pyFHHQ7KicsX1tEMglK9MseWg4XmOichm60lCFBcHQPLdF8ApJJHEEs/640?wxtype=jpeg&wxfrom=25",
          "covers": {
            "16_9": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXvKxcQS6a2PZXhN7kq6cEJ0F151GhRziaTmdOGHVKnpQs3pyFHHQ7KicsX1tEMglK9MseWg4XmOichm60lCFBcHQPLdF8ApJJHEEs/640?wxtype=jpeg&wxfrom=25",
            "1_1": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXv6qL7b7CSHadMgjGjlIYthoXHuiassU9SURyRSJWicrQqp5HTD0CqL42gfOnhJ0YT7BSJvmWLIXlg0qL1bnm4uZNb3FsdW3BZoc/300?wxtype=jpeg&wxfrom=25",
            "235_1": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXvKxcQS6a2PZXhN7kq6cEJ0F151GhRziaTmdOGHVKnpQs3pyFHHQ7KicsX1tEMglK9MseWg4XmOichm60lCFBcHQPLdF8ApJJHEEs/640?wxtype=jpeg&wxfrom=25",
            "3_4": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXvKxcQS6a2PZXhN7kq6cEJ0F151GhRziaTmdOGHVKnpQs3pyFHHQ7KicsX1tEMglK9MseWg4XmOichm60lCFBcHQPLdF8ApJJHEEs/540?wxtype=jpeg&wxfrom=25"
          },
          "create_time": 1791268691,
          "digest": "",
          "idx": 1,
          "is_paid": 0,
          "is_pay_subscribe": 0,
          "item_show_type": 0,
          "msg_type": 9,
          "pic_count": 0,
          "source_url": "https://www.peopleapp.com/home",
          "title": "很多猝死的人,是因为搞坏了这个人体最长器官",
          "update_time": 1791269470,
          "url": "http://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667037985&idx=1&sn=777aba3df29e480cdb9aaaefec00d148&chksm=bc834ba8ad2e15cefb5efd21b81983bd0810ee51abec01603171f840f65db51e558d9fce241f&scene=126&sessionid=0#rd"
        },
        {
          "app_msg_id": 2667037984,
          "cover": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXuwed94ibfYgTkPrhwdYRIzDXiaOpzkUJRb58yYD4p3jRMzkA8CiaT5jBtEMmgQo5FaGbV0blbApm7bdplibladeOFvibVBFR1JxQzI/640?wxtype=jpeg&wxfrom=25",
          "covers": {
            "16_9": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXuwed94ibfYgTkPrhwdYRIzDXiaOpzkUJRb58yYD4p3jRMzkA8CiaT5jBtEMmgQo5FaGbV0blbApm7bdplibladeOFvibVBFR1JxQzI/640?wxtype=jpeg&wxfrom=25",
            "1_1": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXviamHShhmmcZ0J9p8Tlu5e4Ot2WgecOMEicx3KYaDceEibVm2ibRLyW6DiarHI4TCCqRK42zAU7wsgX34ErGviaSxCJ5PgJSmSd6vnk/300?wxtype=jpeg&wxfrom=25",
            "235_1": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXuwed94ibfYgTkPrhwdYRIzDXiaOpzkUJRb58yYD4p3jRMzkA8CiaT5jBtEMmgQo5FaGbV0blbApm7bdplibladeOFvibVBFR1JxQzI/640?wxtype=jpeg&wxfrom=25",
            "3_4": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXuwed94ibfYgTkPrhwdYRIzDXiaOpzkUJRb58yYD4p3jRMzkA8CiaT5jBtEMmgQo5FaGbV0blbApm7bdplibladeOFvibVBFR1JxQzI/540?wxtype=jpeg&wxfrom=25"
          },
          "create_time": 1791265464,
          "digest": "",
          "idx": 1,
          "is_paid": 0,
          "is_pay_subscribe": 0,
          "item_show_type": 0,
          "msg_type": 9,
          "pic_count": 0,
          "source_url": "https://www.peopleapp.com/home",
          "title": "男子错过高速出口,竟掉头开远光灯逆行10公里,被抓时狡辩“不知道违法”",
          "update_time": 1791266232,
          "url": "http://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667037984&idx=1&sn=fdb7135dfc7955342a046720dbd1f5d2&chksm=bc986bd4e6fcac08bfa2044215a4c7e51416cf2dd46ab859288d965ef13e8e2e12c8f39df687&scene=126&sessionid=0#rd"
        },
        "… 7 more items in the full response"
      ],
      "biz_username": "gh_363b924965e9",
      "count": 10,
      "debug_id": "01742c27",
      "debug_info": "gAAAAABqxLkfN-OrA9g7d898bwX0UTcT5Q2_lfaFBbjfTxHhTpbz3s911Hgz42y_DL0YRXvSkF5pULQvDfVTTNZsZZJ0IogqE3Gf36QRblWJEZ_u-hZ_sIYusqhKU8aFO4tu-19pz1DvUWIdNsffiBeX616wm--nE_-k2Is3zHg3SaSnJkl5etl_3YzBxA__iMJTbK5nHTmpMALyCaA1D9E8-Mx3JgWDgMEOEihLm6N4zD8Z3gB3T91IAyuPsEkh6CGAhhffX9l1RGd-2WX9UwvOZaM_JdeTSg==",
      "is_end": 0,
      "next_offset": "WABgAGiB3pO+j5OM4mo=",
      "pages": 1
    }
  }
]

Exemples

Sélectionnez un exemple pour charger ses entrées et son résultat dans le playground.

README de l'API

WeChat Official Account Articles API

This API returns one page of published posts from a WeChat official account. It needs the account's gh_ username and returns each post's title, link, cover images and timestamps. You can switch between the articles, videos, audios and image-text tabs.

Use cases

  • Check an official account every day for new posts and alert your team when one appears.
  • Back-fill a full archive of an account's posts page by page for search or analysis.
  • Collect article url values and send them to an article detail API to fetch full text.
  • Pull cover images in several aspect ratios to build a media preview board.

Request

curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/v2/account-articles" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "gh_363b924965e9", "raw": false}'

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

Parameters

NameTypeRequiredDescription
usernamestringYesOfficial account gh_username (gh_…). E.g. gh_363b924965e9
item_show_typestringNoOptional content tab (matches the "Articles / Videos / Audios" tabs on the account homepage). Empty / 0=articles (default), 5=videos, 7=audios, 8=image-text posts. Omitting it = articles, behavior unchanged.
offsetstringNoOptional pagination cursor (base64), leave empty for the first page; for the next page pass next_offset from the previous response. E.g. CAMQChiS5KfRBiAKOJLkp9EGQABIAVgAYABwAQ==
page_sizeintegerNoOptional, default 20, range 10-20. Articles per page.
rawbooleanNoOptional, default True. True=raw; False=simplified parsing.

Example response

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

{
  "articles": [
    {
      "app_msg_id": 2667043262,
      "cover": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXuuJvoef2xYDJDM1gT68bahKtzZW8icwkhMD…",
      "covers": {
        "16_9": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXuuJvoef2xYDJDM1gT68bahKtzZW8icwkhMD…",
        "1_1": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXuPF9A7Lbmgk30txKLibicJhkKnnWHNPUYp6…",
        "235_1": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXuuJvoef2xYDJDM1gT68bahKtzZW8icwkhMD…",
        "3_4": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXuuJvoef2xYDJDM1gT68bahKtzZW8icwkhMD…"
      },
      "create_time": 1793687341,
      "digest": "",
      "idx": 1,
      "is_paid": 0,
      "is_pay_subscribe": 0,
      "item_show_type": 0,
      "msg_type": 9,
      "pic_count": 0,
      "source_url": "https://www.peopleapp.com/"
    }
  ],
  "biz_username": "gh_363b924965e9",
  "count": 10,
  "debug_id": "3abf1131",
  "debug_info": "gAAAAABq6ZEyXemFYbNluN88EMaiChiAu1gBtoObz7ewpDqb_YwtslUuVI9cFGFJ77gF3uk2Fs5o8NUT…",
  "is_end": 0,
  "next_offset": "WABgAGiBpOW+74vB9Go=",
  "pages": 1
}

Response fields

FieldMeaning
articles[].titleTitle of the post.
articles[].urlLink to the post on mp.weixin.qq.com. Use it to open the post or pass it to an article API.
articles[].app_msg_idNumeric ID of the post. It also appears as mid in the post url.
articles[].create_time / update_timeUnix timestamps in seconds for when the post was created and last updated.
articles[].coverURL of the main cover image.
articles[].coversObject with cover image URLs cropped to different aspect ratios. Each key is named after its ratio.
articles[].idxPosition of the post within its publish batch. A value of 1 is the first post in that batch.
articles[].is_paid / is_pay_subscribeFlags for paid content. In this response both are 0.
articles[].source_urlThe external link attached to the post, when there is one.
count / is_end / next_offsetcount is the number of posts on this page. is_end shows whether this is the last page. next_offset is the cursor for the next page.

Notes

  • Leave offset empty for the first page. For the next page, pass the next_offset value from the previous response as offset.
  • Stop paging when is_end is truthy. In this response is_end is 0, so more pages exist.
  • page_size accepts 10 to 20. item_show_type picks the tab: empty or 0 for articles, 5 for videos, 7 for audios, 8 for image-text posts.
  • To read the full text of a post, send its url to WeChat MP Article Detail. To look up the account itself, use WeChat MP Account Profile.

Pricing

$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Explorer plus

APIs associées

Toutes les APIs
APIPrixRéponse
WeChat MP$0.01 par appelJSON
WeChat MP$0.01 par appelJSON
WeChat MP$0.01 par appelJSON
WeChat MP$0.01 par appelJSON
WeChat MP$0.01 par appelJSON
WeChat MP$0.01 par appelJSON

Guides :Best WeChat MP API in 2026: Pricing Compared

Questions

FAQ

Comment utiliser l’API WeChat MP Account Articles ?

Envoyez une requête POST à https://api.sandbase.ai/v1/api/wechat-mp/v2/account-articles avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.

Combien coûte l’API WeChat MP Account Articles ?

$0.01 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.

Quels paramètres l’API WeChat MP Account Articles accepte-t-elle ?

Obligatoire : username (string). Facultatif : item_show_type (any), offset (any), page_size (integer) et raw (boolean). Le tableau des paramètres et le Playground sur cette page listent tous les champs.

Que renvoie l’API WeChat MP Account Articles ?

Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.

Ai-je besoin d’un compte développeur ou d’une clé API WeChat MP ?

Non. WeChat MP Account Articles fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API WeChat MP séparément.