Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

WeChat MP Account Articles

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.

價格
$0.01美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 4 個選填

Playground

輸入
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. 範圍:10 到 20。
Optional, default True. True=raw; False=simplified parsing.
輸出範例
回應outputs · 5.4 KB · 82 行
[
  {
    "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
    }
  }
]

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

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.

探索更多

相關 APIs

所有 APIs
API價格回應
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON

指南:Best WeChat MP API in 2026: Pricing Compared

問題

常見問題

我要如何使用 WeChat MP Account Articles API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/wechat-mp/v2/account-articles。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

WeChat MP Account Articles API 的費用是多少?

每次 $0.01,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

WeChat MP Account Articles API 接受哪些參數?

必要:username (string)。 選填:item_show_type (any), offset (any), page_size (integer) 和 raw (boolean)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

WeChat MP Account Articles API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 WeChat MP 開發者帳號或 API 金鑰嗎?

不需要。WeChat MP Account Articles 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 WeChat MP API 存取權。