# How to get a WeChat Official Account's articles and full text

> Find a WeChat Official Account by name, page through its article history newest first, then fetch the full text of the articles you need. No QR login; parameters, cost and code.

Canonical page: https://okdata.online/guides/wechat-official-account-articles/

Four endpoints in order: Official Account search to turn a name into its original ID (gh_…), Official Account article history to list its articles 10 per call, Official Account article stats for each article's reads and likes, which the list usually leaves out, and Official Account article detail for the full text. The worked example below is 59 calls and costs $1.74, with the search counted at a full page; a failed call is not charged.

Updated 2026-11-12

The job: you follow a competitor, a trade publication or a regulator on WeChat, and you want its recent articles in a form you can work with: titles, dates and reads in a table, and the complete text of the pieces that matter. Inside WeChat that means scrolling the account's history on a phone. Here it is four endpoints in a row: find the account, list its articles, look up each article's numbers, fetch the ones you want in full. You end with a CSV of the article list with reads and likes, and a text file per article.

No WeChat account, QR scan or cookie is involved. Each call is an HTTPS request with your key.

## Step by step

### Step 1: find the account

[Official Account search](https://okdata.online/apis/wechat_mp/accounts/search/) takes `query`, the account's name or a keyword. Each result has `id`, the original ID (`gh_` plus 12 characters), `username` (the WeChat ID, when the account has one), `name`, `avatar_url` and `followers`. With `view=full`, `ext` adds `biz` (the `__biz` value in the account's links), `last_published_at` and `articles_per_week`, which help you tell the real account from a lookalike.

```bash
curl -G "https://api.okdata.online/v1/wechat_mp/accounts/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=极客公园' \
  --data-urlencode 'view=full' \
  --data-urlencode 'fields=id,name,username,ext.last_published_at'
```

This is the one endpoint priced per item: $0.058 for each account returned, so at most $0.58 for a full page of 10. An exact account name usually returns one or a few matches and costs a fraction of that; a broad word fills the page. While the search runs, the full-page amount is held from your balance and the unused part is released right after. On a balance below a full page, the first page shrinks to the accounts your balance covers.

Check `name` before you keep an `id`; the right account is not always first. If you already know the gh_ ID or the WeChat ID, skip this step entirely. [Finding an account's gh_ ID](https://okdata.online/answers/find-wechat-official-account-id/) shows the free manual way too.

### Step 2: list its articles

[Official Account article history](https://okdata.online/apis/wechat_mp/accounts/articles/list/) takes `id`, the gh_ ID from step 1 or the WeChat ID, and returns 10 articles per call, newest first, for $0.02. Each has `title`, `url` (the mp.weixin.qq.com link), `published_at`, the summary in `text` and the cover in `images`. With `view=full`, `ext.position` tells you where the article sat in that day's push: 1 is the headline. Reads and likes are usually not included in the list: `metrics.views` and `metrics.likes` come back null, and step 3 fills them in.

```bash
curl -G "https://api.okdata.online/v1/wechat_mp/accounts/articles/list" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=gh_7c2a9e41b05d'
```

For older articles, send `page.next_cursor` back as `cursor`, unchanged, until `page.has_more` is `false`. Five pages cover about the last 50 articles.

### Step 3: get reads and likes

[Official Account article stats](https://okdata.online/apis/wechat_mp/articles/metrics/) takes one article link as `url` and returns its numbers at that moment for $0.02: `metrics.views` (reads), `metrics.likes`, `metrics.shares`, `metrics.favorites` (saves) and `metrics.comments`. With `view=full`, `ext.recommends` is the 在看 count. It returns only numbers; the title and link you already have from the list.

```bash
curl -G "https://api.okdata.online/v1/wechat_mp/articles/metrics" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'url=https://mp.weixin.qq.com/s/Qm3xK7pVd2LrT9wYfZc1aB'
```

This is one call per article, so it is most of the bill. To rank the last 50 articles you need all 50. If headlines are all you compare, list with `view=full` and call stats only where `ext.position` is 1.

### Step 4: fetch the full text

[Official Account article detail](https://okdata.online/apis/wechat_mp/articles/get/) takes the article link as `url` and returns the body for $0.02. `text` is the article as plain text, paragraphs and headings on their own lines, inline images dropped; the cover stays in `images`. You also get `title`, `published_at` and `author` (the account's gh_ ID and name). With `view=full`, `ext.author_byline` is the writer named under the title, and `ext.copyright` and `ext.source_url` help you spot reposts.

```bash
curl -G "https://api.okdata.online/v1/wechat_mp/articles/get" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'url=https://mp.weixin.qq.com/s/Qm3xK7pVd2LrT9wYfZc1aB'
```

Reads and likes are null on the detail too; they come from article stats.

### Step 5: put it together in Python

The script finds the account by exact name, lists five pages, looks up each article's reads and likes, saves the list to CSV and fetches the three most-read articles as text files.

```python
import csv
import os
import re
import requests

API = "https://api.okdata.online"
HEADERS = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}
NAME = "极客公园"
HISTORY_PAGES = 5  # 10 articles per page, one call each
FULL_TEXT = 3      # articles to fetch in full


def get(path, **params):
    body = requests.get(API + path, headers=HEADERS, params=params, timeout=90).json()
    if body["code"] != "ok":
        raise RuntimeError(f"{body['code']}: {body['message']} (charged: {body['charged']})")
    return body


accounts = get("/v1/wechat_mp/accounts/search", query=NAME)["data"]["items"]
account = next((a for a in accounts if a["name"] == NAME), None)
if account is None:
    raise SystemExit(f"no exact match; got {[a['name'] for a in accounts]}")

articles, cursor = [], None
for _ in range(HISTORY_PAGES):
    body = get("/v1/wechat_mp/accounts/articles/list", id=account["id"], **({"cursor": cursor} if cursor else {}))
    articles += body["data"]["items"]
    if not body["page"]["has_more"]:
        break
    cursor = body["page"]["next_cursor"]

# The list leaves reads and likes out: one stats call per article fills them in.
stats = {a["url"]: get("/v1/wechat_mp/articles/metrics", url=a["url"])["data"]["item"]["metrics"] for a in articles}

with open("articles.csv", "w", newline="", encoding="utf-8-sig") as f:
    out = csv.writer(f)
    out.writerow(["published_at", "title", "reads", "likes", "url"])
    for a in articles:
        out.writerow([a["published_at"], a["title"], stats[a["url"]]["views"], stats[a["url"]]["likes"], a["url"]])

for a in sorted(articles, key=lambda a: stats[a["url"]]["views"] or 0, reverse=True)[:FULL_TEXT]:
    full = get("/v1/wechat_mp/articles/get", url=a["url"])["data"]["item"]
    with open(re.sub(r"[^\w-]", "_", full["id"]) + ".txt", "w", encoding="utf-8") as f:
        f.write(f"{full['title']}\n{full['published_at']}\n{full['url']}\n\n{full['text']}\n")
```

The 50 stats calls are $1.00 of the total. Without them you can still sort by date and take the newest, for $0.16 after the search. A whole 500-article history with reads, likes and full text would be $21.00 after the search.

## Good to know

- **Reads and likes come from article stats.** The history list usually returns `metrics.views` and `metrics.likes` as null and names them in `meta.unavailable`. Treat that as unknown, not zero. Stats are snapshots: reads keep growing for days, so compare articles of a similar age.
- **Follower counts are estimates.** `followers` in search comes from a third-party database, not from WeChat, and `ext.followers_note` says so.
- **Deleted is free.** An article taken down after it was listed returns `not_found` and costs nothing.
- **Retries without paying twice.** Send an `Idempotency-Key` header with each call. The same request with the same key within 24 hours returns the stored answer with `meta.replayed: true` and no new charge.
- **Trial credit.** A new key's $0.10 covers only part of a search page, so the first search may return fewer accounts than a full page. Start from a known WeChat ID, or top up first.
- **Rights.** The articles belong to their authors. Use them for research and monitoring, and keep the source link when you quote.

To export a whole account rather than recent articles, see [how to export all articles of an Official Account](https://okdata.online/answers/export-wechat-official-account-articles/). For a running watch on several accounts, see [monitoring competitor Official Accounts](https://okdata.online/answers/monitor-competitor-wechat-official-accounts/).

## What the example costs

One name search for 极客公园 (GeekPark), five pages of its article history (about 50 articles), reads and likes of each of the 50, then the full text of the 3 most-read

| Endpoint | Calls | Price | Subtotal |
|---|---|---|---|
| [Official Account search](https://okdata.online/apis/wechat_mp/accounts/search/) | 1 | $0.058 | $0.58 |
| [Official Account article history](https://okdata.online/apis/wechat_mp/accounts/articles/list/) | 5 | $0.02 | $0.10 |
| [Official Account article stats](https://okdata.online/apis/wechat_mp/articles/metrics/) | 50 | $0.02 | $1.00 |
| [Official Account article detail](https://okdata.online/apis/wechat_mp/articles/get/) | 3 | $0.02 | $0.06 |
| Total | 59 |  | $1.74 |

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

## In your AI (MCP)

Connect the MCP server once, then say what you want. The agent finds these endpoints, reads their prices and calls them on your balance.

Say: Find the WeChat Official Account 极客公园, list its last 50 articles with title, date and reads, and give me the full text of the three most-read ones.

```json
{
  "endpoint": "wechat_mp.accounts.search",
  "params": {
    "query": "36氪"
  },
  "idempotency_key": "<a new UUID>"
}
```

MCP: `https://api.okdata.online/mcp`

## Endpoints in this guide

- [Official Account search](https://okdata.online/apis/wechat_mp/accounts/search/) `wechat_mp.accounts.search`: $0.058 per account · at most $0.58 per call
- [Official Account article history](https://okdata.online/apis/wechat_mp/accounts/articles/list/) `wechat_mp.accounts.articles.list`: $0.02 per call · about 10 articles per page
- [Official Account article stats](https://okdata.online/apis/wechat_mp/articles/metrics/) `wechat_mp.articles.metrics`: $0.02 per call
- [Official Account article detail](https://okdata.online/apis/wechat_mp/articles/get/) `wechat_mp.articles.get`: $0.02 per call

## More about WeChat Official Accounts

- [WeChat Official Accounts API](https://okdata.online/apis/wechat_mp/)
- [WeChat Official Account API in Python for RAG (2026)](https://okdata.online/guides/wechat-official-account-api-python/)
- [How do I export all articles of a WeChat Official Account without logging in?](https://okdata.online/answers/export-wechat-official-account-articles/)
- [How do I monitor competitors' WeChat Official Accounts for new articles?](https://okdata.online/answers/monitor-competitor-wechat-official-accounts/)
- [How much does a WeChat Official Account article API cost?](https://okdata.online/answers/wechat-official-account-api-price/)
- [Is there an MCP server for WeChat Official Account articles?](https://okdata.online/answers/wechat-official-account-mcp-server/)
- [Why can't ChatGPT or Claude read a WeChat article link, and how do I fix it?](https://okdata.online/answers/ai-read-wechat-article-link/)
- [How do I find WeChat Official Accounts in a niche to advertise with?](https://okdata.online/answers/find-wechat-official-accounts-by-topic/)
- [Official platform APIs vs third-party data APIs (2026)](https://okdata.online/compare/official-apis-vs-data-apis/)
- [MCP servers for social media data: self-hosted vs hosted](https://okdata.online/compare/social-media-data-mcp-servers/)
- [WeChat article APIs: official vs third-party vs open-source (2026)](https://okdata.online/compare/wechat-article-data-apis/)
- [Ways to get WeChat Official Account data: the official API, RSS bridges and data APIs](https://okdata.online/compare/wechat-official-account-data-apis/)
- [Xiaohongshu, Douyin and WeChat MCP servers: self-hosted vs hosted](https://okdata.online/compare/xiaohongshu-douyin-wechat-mcp-servers/)
- [Account posts API](https://okdata.online/roles/accounts-posts-list/)
