# WeChat Official Account articles API in Python: history and reads (third-party, 2026)

WeChat's own Official Account API works only on your own account, and from July 2025 individual and unverified accounts lose even the list of published articles; there is no endpoint for reading another account. To read any account's articles and reads, use a third-party data API. Below it is done with DataXAPI's Python SDK; the free trial covers up to 333 calls. 3 endpoints do it: WeChat Official Account live search → WeChat Official Account articles → WeChat Official Account article stats. The worked example below is 34 calls and costs $0.68 in all; a failed call is not charged.

Updated 2026-11-06

Find an account by name, take its last 3 pages of articles, then each article's reads, likes and shares, into one CSV.

## Step by step

### Step 1: WeChat Official Account live search

Find the account by name in WeChat Search, closest first; `id` is its gh_ original ID. ([WeChat Official Account live search](https://dataxapi.com/apis/wechat/accounts/search/), $0.0200 / a call)

cURL

```bash
curl -G "https://api.dataxapi.com/v1/wechat/accounts/search" \
  --data-urlencode "query=36氪" \
  -H "Authorization: Bearer $DATAXAPI_API_KEY"
```

Python

```python
# pip install dataxapi
from dataxapi import DataXAPI

dx = DataXAPI()  # reads DATAXAPI_API_KEY
result = dx.wechat.accounts.search(query="36氪")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @dataxapi/sdk
import { DataXAPI } from "@dataxapi/sdk";

const dx = new DataXAPI(); // reads DATAXAPI_API_KEY
const result = await dx.wechat.accounts.search({ query: "36氪" });
console.log(result.data.items);
```

CLI

```bash
dataxapi call wechat.accounts.search 'query=36氪'
```

Recorded response: From a response recorded 2026-11-02 11:25 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

```jsonc
{
  "code": "ok",
  "request_id": "86788fb5-4235-48ac-b9c6-23292e637c65",
  "data": {
    "items": [
      {
        "id": "1047168840907789",
        "username": "nanfeng_0721",
        "name": "南边的风",
        "bio": "在上海，周末都在山里",
        "avatar_url": "https://wx.qlogo.cn/mmhead/xjoBFsBvyPoDjvS4DO1qBnMkqIePSAETki44ma9I/132",
        "verified": true
      },
      // … 10 more
    ]
  },
  "page": {
    "next_cursor": "c1.Ew51uWdKdB0gdItoicfGl1FUa3rXNGNkJvKajjh3",
    "cursor_expires_at": "2026-11-02T12:25:07.000Z",
    "has_more": true,
    "returned": 11
  },
  "warnings": [],
  "meta": {
    "capability": "wechat.accounts.search",
    "result_status": "complete",
    "fetched_at": "2026-11-02T11:25:07.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "url": "platform",
      "created_at": "capability",
      "metrics": "capability"
    },
    "billing": {
      "amount": "0.02",
      "currency": "USD",
      "balance_after": "9.98"
    }
  }
}
```

### Step 2: WeChat Official Account articles

Put the original ID into `id` for a page of articles, newest first; the next page comes from `page.next_cursor`. Each item's `url` is the article's link. ([WeChat Official Account articles](https://dataxapi.com/apis/wechat_mp/accounts/articles/list/), $0.0200 / a call)

cURL

```bash
curl -G "https://api.dataxapi.com/v1/wechat_mp/accounts/articles/list" \
  --data-urlencode "id=gh_13c97ab93ce8" \
  -H "Authorization: Bearer $DATAXAPI_API_KEY"
```

Python

```python
# pip install dataxapi
from dataxapi import DataXAPI

dx = DataXAPI()  # reads DATAXAPI_API_KEY
result = dx.wechat_mp.accounts.articles.list(id="gh_13c97ab93ce8")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @dataxapi/sdk
import { DataXAPI } from "@dataxapi/sdk";

const dx = new DataXAPI(); // reads DATAXAPI_API_KEY
const result = await dx.wechat_mp.accounts.articles.list({ id: "gh_13c97ab93ce8" });
console.log(result.data.items);
```

CLI

```bash
dataxapi call wechat_mp.accounts.articles.list id=gh_13c97ab93ce8
```

Recorded response: From a response recorded 2026-10-12 19:02 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

```jsonc
{
  "code": "ok",
  "request_id": "882b7d3d-9a50-48d1-ba28-513bec440e40",
  "data": {
    "items": [
      {
        "id": "2651350693_1",
        "url": "https://mp.weixin.qq.com/s/yEmemDFnwYkjLklz1HGeGz",
        "type": "article",
        "title": "实测一个月周末露营，结论有点意外",
        "text": null,
        "published_at": "2026-10-12T13:35:48.000Z",
        "author": { "id": "gh_baa95f56a86c" }
      },
      // … 9 more
    ]
  },
  "page": {
    "next_cursor": "c1.c3D9oI16A0J5E0SMD5JU_mAesJzXbexIUP2nOHbv",
    "cursor_expires_at": "2026-10-12T20:02:58.000Z",
    "has_more": true,
    "returned": 10
  },
  "warnings": [],
  "meta": {
    "capability": "wechat_mp.accounts.articles.list",
    "result_status": "complete",
    "fetched_at": "2026-10-12T19:02:58.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "lang": "capability",
      "author.username": "capability",
      "author.name": "capability",
      "author.avatar_url": "capability",
      "author.verified": "capability",
      "author.followers": "capability",
      "metrics": "capability",
      "images": "capability",
      "hashtags": "platform",
      "mentions": "platform",
      "is_pinned": "capability",
      "post_id": "platform",
      "parent_id": "platform",
      "root_id": "platform"
    },
    "billing": {
      "amount": "0.02",
      "currency": "USD",
      "balance_after": "9.98"
    }
  }
}
```

### Step 3: WeChat Official Account article stats

Put the article's link into `url` for its reads, likes, recommendations, shares, saves and comments right now. It needs the long link. ([WeChat Official Account article stats](https://dataxapi.com/apis/wechat_mp/articles/metrics/), $0.0200 / a call)

cURL

```bash
curl -G "https://api.dataxapi.com/v1/wechat_mp/articles/metrics" \
  --data-urlencode "url=https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc" \
  -H "Authorization: Bearer $DATAXAPI_API_KEY"
```

Python

```python
# pip install dataxapi
from dataxapi import DataXAPI

dx = DataXAPI()  # reads DATAXAPI_API_KEY
result = dx.wechat_mp.articles.metrics(url="https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc")
print(result["data"]["item"])
```

TypeScript

```typescript
// npm i @dataxapi/sdk
import { DataXAPI } from "@dataxapi/sdk";

const dx = new DataXAPI(); // reads DATAXAPI_API_KEY
const result = await dx.wechat_mp.articles.metrics({ url: "https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc" });
console.log(result.data.item);
```

CLI

```bash
dataxapi call wechat_mp.articles.metrics 'url=https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc'
```

Recorded response: From a response recorded 2026-10-29 09:44 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

```jsonc
{
  "code": "ok",
  "request_id": "789c698d-e1c1-4558-9aa5-408482ee5894",
  "data": {
    "item": {
      "id": "2622051355_1",
      "metrics": {
        "likes": 2235,
        "comments": 6,
        "shares": 9041,
        "favorites": 97,
        "views": 100001
      },
      "approximate": [
        { "field": "metrics.views", "kind": "lower_bound" }
      ]
    }
  },
  "warnings": [],
  "meta": {
    "capability": "wechat_mp.articles.metrics",
    "result_status": "complete",
    "fetched_at": "2026-10-29T09:44:39.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "url": "capability",
      "type": "capability",
      "title": "capability",
      "text": "capability",
      "lang": "capability",
      "published_at": "capability",
      "author": "capability",
      "metrics.reposts": "platform",
      "images": "capability",
      "hashtags": "capability",
      "mentions": "capability",
      "is_pinned": "capability",
      "post_id": "platform",
      "parent_id": "platform",
      "root_id": "platform"
    },
    "billing": {
      "amount": "0.02",
      "currency": "USD",
      "balance_after": "9.98"
    }
  }
}
```

## What the example costs

One account search, 3 pages of articles, then the counts of 30 articles

| Endpoint | Calls | Price | Subtotal |
| --- | --- | --- | --- |
| [WeChat Official Account live search](https://dataxapi.com/apis/wechat/accounts/search/) | 1 | $0.0200 | $0.0200 |
| [WeChat Official Account articles](https://dataxapi.com/apis/wechat_mp/accounts/articles/list/) | 3 | $0.0200 | $0.0600 |
| [WeChat Official Account article stats](https://dataxapi.com/apis/wechat_mp/articles/metrics/) | 30 | $0.0200 | $0.60 |
| Total | 34 |  | $0.68 |

Prices are the prices in force when this page was built. A failed call costs nothing.

## In your AI (MCP)

Connect DataXAPI to your AI client once. Then say what you want; the agent finds these endpoints, checks the price and calls them on your balance.

Say: Find the 人民日报 Official Account and list its last 30 articles with title, date, reads and likes, as one table.

What the agent sends to the call tool: 

```json
{
  "capability": "wechat.accounts.search",
  "query": "36氪",
  "idempotency_key": "<a new UUID>"
}
```

[About the MCP server](https://dataxapi.com/mcp/)

## Why DataXAPI

- Steady: endpoints were available 99.9% of the last 30 days, on a public status page you can check.
- Fast: a paid call took 3.5 seconds at the median over the last 7 days (counted 2026-11-06).
- Fewer tokens: across 8 endpoints on WeChat Official Accounts, one recorded real response each, the platform's own JSON comes to 21k tokens and what an AI reads through DataXAPI's MCP server to 4,494, 79% fewer; the JSON of a direct API call is 70% fewer too (counted 2026-11-06). Every platform answers in one shape: the author in `author`, counts in `metrics`, the next page in `page.next_cursor`, so another platform needs no new parser.
- See before you pay: every endpoint's page shows a recorded real response, field by field.
- Spending you control: a failed call is not charged; each key can have a limit, `X-Max-Price` caps one call, and the same `Idempotency-Key` within 24 hours is never charged twice.
- Ready for AI: a remote MCP server listed in the official MCP registry as `com.dataxapi/mcp`, usable from Claude, Cursor and ChatGPT.
- Free trial of up to 333 calls, no card.

## Good to know

- No WeChat account, no QR login and no verified account of yours.
- The whole text comes from `wechat_mp.articles.get` and featured comments from `wechat_mp.articles.comments.list`, both by the article's link.
- Without code: connect DataXAPI to Claude or ChatGPT and say the sentence under “In your AI”.

## The whole script

The task above as one script that runs as it is: Python, the SDK, your key from DATAXAPI_API_KEY. It writes a CSV file and ends by printing what it called, fetched and was charged.

```python
# pip install dataxapi
# export DATAXAPI_API_KEY=dx_...   (your key)
import csv
from decimal import Decimal
from dataxapi import DataXAPI

dx = DataXAPI()
calls, fetched, charged = 0, 0, Decimal("0")

def run(capability, params):
    """One call; counts it and what it was charged."""
    global calls, charged
    result = dx.call(capability, params)
    calls += 1
    charged += Decimal(str(result["meta"]["billing"]["amount"]))
    return result

NAME = "人民日报"
PAGES = 3

# 1. The account's original ID (gh_...), the closest match first.
account = run("wechat.accounts.search", {"query": NAME})["data"]["items"][0]["id"]

# 2. Its articles, newest first, page after page.
articles, cursor = [], None
for _ in range(PAGES):
    page = run("wechat_mp.accounts.articles.list", {"id": account, **({"cursor": cursor} if cursor else {})})
    articles += page["data"]["items"]
    cursor = page["page"]["next_cursor"]
    if not page["page"]["has_more"]:
        break

# 3. Each article's reads, likes and shares right now.
rows = []
for article in articles:
    counts = run("wechat_mp.articles.metrics", {"url": article["url"]})["data"]["item"]["metrics"]
    rows.append([article.get("published_at"), article.get("title"), counts.get("views"), counts.get("likes"), counts.get("shares"), article.get("url")])

fetched = len(rows)
with open("wechat-articles-reads.csv", "w", newline="", encoding="utf-8") as file:
    csv.writer(file).writerows([["published_at", "title", "reads", "likes", "shares", "url"], *rows])

print(f"calls: {calls}, items: {fetched}, charged: ${charged}")
```

## Endpoints

- [WeChat Official Account live search](https://dataxapi.com/apis/wechat/accounts/search/)
- [WeChat Official Account articles](https://dataxapi.com/apis/wechat_mp/accounts/articles/list/)
- [WeChat Official Account article stats](https://dataxapi.com/apis/wechat_mp/articles/metrics/)

## More about WeChat Official Accounts

- [WeChat Search API](https://dataxapi.com/apis/wechat/)
- [WeChat Official Accounts API](https://dataxapi.com/apis/wechat_mp/)
- [How to list a WeChat Official Account's past articles](https://dataxapi.com/guides/wechat-official-account-articles/)
- [How to get WeChat Official Account article reads and likes](https://dataxapi.com/guides/wechat-article-reads-and-likes/)
- [How to get WeChat Channels video comments](https://dataxapi.com/guides/wechat-channels-video-comments/)
- [How to list a WeChat Channels account's videos](https://dataxapi.com/guides/wechat-channels-user-videos/)
- [How to get WeChat Search results by keyword](https://dataxapi.com/guides/wechat-search-posts/)
- [WeChat Channels API in Python: account videos and comments (2026)](https://dataxapi.com/guides/wechat-channels-api-python/)
- [Is there an API for WeChat Official Account articles?](https://dataxapi.com/answers/is-there-an-api-for-wechat-official-account-articles/)
- [How do I get WeChat Channels data?](https://dataxapi.com/answers/how-to-get-wechat-channels-data/)
- [What is __biz in a WeChat article link?](https://dataxapi.com/answers/wechat-official-account-biz/)
- [What do mid, idx and sn mean in a WeChat article link?](https://dataxapi.com/answers/wechat-article-link-mid-idx-sn/)
- [What is a WeChat Official Account's original ID (gh_)?](https://dataxapi.com/answers/wechat-official-account-original-id/)
- [What is a WeChat Channels account ID (…@finder), and what is an export ID?](https://dataxapi.com/answers/wechat-channels-finder-id/)
- [WeChat returns ret=200013 freq control when listing an account's articles: what now? (2026)](https://dataxapi.com/answers/wechat-ret-200013-freq-control/)
- [wechat-article-exporter has stopped: what else exports WeChat articles in bulk? (2026)](https://dataxapi.com/answers/wechat-article-exporter-alternative/)
- [wewe-rss has stopped working: what now? (2026)](https://dataxapi.com/answers/wewe-rss-not-working/)

---

Catalog revision 9d3b7fa5a896745d. [HTML version](https://dataxapi.com/guides/wechat-official-account-api-python/)
