# WeChat MP Account Articles API

> 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.

Source: https://www.sandbase.ai/apis/wechat-mp/v2/account-articles
API reference: https://www.sandbase.ai/apis/wechat-mp/v2/account-articles/docs

## Facts

- Provider: WeChat MP
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/wechat-mp/v2/account-articles`
- Price: $0.01 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, wechat mp
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/wechat-mp/v2/account-articles` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `username` | string | yes |  |
| `item_show_type` | any | no |  |
| `offset` | any | no |  |
| `page_size` | integer | no |  |
| `raw` | boolean | no |  |

## FAQ

### How do I use the WeChat MP Account Articles API?

Send a POST request to https://api.sandbase.ai/v1/api/wechat-mp/v2/account-articles with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the WeChat MP Account Articles API cost?

$0.01 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the WeChat MP Account Articles API accept?

Required: username (string). Optional: item_show_type (any), offset (any), page_size (integer) and raw (boolean). The Parameters table and the Playground on this page list every field.

### What does the WeChat MP Account Articles API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a WeChat MP developer account or API key?

No. WeChat MP Account Articles runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for WeChat MP API access separately.

## README

### WeChat Official Account Articles API

Pass an official account `gh_…` username and get a page of its historical posts with title, URL, cover and publish time. Paginate with `next_offset`.

#### Use cases

- Monitor new articles from competitor or media accounts.
- Back-fill an account's archive for analysis or search.
- Feed article URLs into the Article Detail API for full text.

#### Request

```bash
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}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `username` | string | Yes | Official account `gh_username` (`gh_…`). |
| `raw` | boolean | No | Optional, default True. |
| `offset` | string | No | Optional pagination cursor (base64), leave empty for the first page; for the next page pass `next_offset` from the prev… |
| `page_size` | integer | No | Optional, default 20, range 10-20. |
| `item_show_type` | string | No | Optional content tab (matches the "Articles / Videos / Audios" tabs on the account homepage). |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "count": 10,
  "is_end": 0,
  "next_offset": "<next_offset>",
  "articles": [
    {
      "app_msg_id": 2667038019,
      "title": "谁家的龙，一直坐着啊？",
      "create_time": 1791276963,
      "item_show_type": 0,
      "is_paid": 0,
      "url": "http://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=266703…",
      "cover": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXtjiaLui…"
    }
  ]
}
```

#### Notes

- `is_end` truthy means the last page.
- `item_show_type`: empty or 0 = articles, 5 = videos, 7 = audio.

#### Related APIs

- [WeChat MP Article Detail](/model/wechat-mp/v2/article-detail): Get a WeChat official account (MP) article from its URL: title, author, account, publish time, cover, full text and HTML content, and album info.
- [Get WeChat MP Account Profile](/model/wechat-mp/v2/account-profile): Pass a `gh_username` to get the official account profile: name / avatar / description / verification entity type, etc..
- [Get WeChat MP Article Ads](/model/wechat-mp/v2/article-ad): Pass an article URL to get the embedded ad slot info of the article..
