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.01 每次调用JSON
WeChat MP$0.01 每次调用JSON
WeChat MP$0.01 每次调用JSON
WeChat MP$0.01 每次调用JSON
WeChat MP$0.01 每次调用JSON
WeChat MP$0.01 每次调用JSON

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

问题

常见问题

如何使用 WeChat MP Account Articles API?

向 https://api.sandbase.ai/v1/api/wechat-mp/v2/account-articles 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 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 key 吗?

不需要。WeChat MP Account Articles 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 WeChat MP API 访问权限。