# How to list a WeChat Official Account's past articles

2 endpoints do it: WeChat Official Account article detail → WeChat Official Account articles. The worked example below is 4 calls and costs $0.0800 in all; a failed call is not charged.

You end up with the articles a WeChat Official Account (公众号) has published, newest first: title, digest, link and time, page after page. All you need to start is the link of one of its articles.

## Step by step

### Step 1: WeChat Official Account article detail

Open one article of the account by its link. Besides the title and full text, the answer names the account: `author.id` is its original ID, starting with `gh_`, and the next step takes it. Already have the `gh_` ID? Skip this step. ([WeChat Official Account article detail](https://onefeedapi.com/apis/wechat_mp/articles/get/), $0.0200 / a call)

cURL

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

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

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

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

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

CLI

```bash
onefeedapi call wechat_mp.articles.get '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:45 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": "ea6d90ba-c743-4de0-b6ee-bf22a76e2d0f",
  "data": {
    "item": {
      "id": "2667741100_1",
      "url": "https://mp.weixin.qq.com/s/FeLlyCmjO-KbG27_xPHWlw",
      "type": "article",
      "title": "周末露营入门指南：一篇讲清楚",
      "text": "周末露营这件事，越简单越好",
      "published_at": "2026-10-10T09:13:21.000Z",
      "author": {
        "id": "gh_fd3bca9a4315",
        "username": "aya_living",
        "name": "认真生活的阿雅",
        "avatar_url": "https://wx.qlogo.cn/mmhead/TP60gpehOQj0c0q4rzcuTqqksajtafmfdf2AzWc3/132"
      }
    }
  },
  "warnings": [],
  "meta": {
    "capability": "wechat_mp.articles.get",
    "result_status": "complete",
    "fetched_at": "2026-10-29T09:45:30.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "lang": "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 2: WeChat Official Account articles

List the account's articles by that `gh_` ID, newest first. To go further back, send `page.next_cursor` from one answer as `cursor` in the next call, until `page.has_more` is false. ([WeChat Official Account articles](https://onefeedapi.com/apis/wechat_mp/accounts/articles/list/), $0.0200 / a call)

cURL

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

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

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

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

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

CLI

```bash
onefeedapi 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"
    }
  }
}
```

## What the example costs

one article's detail to find the account, then three pages of its article list

| Endpoint | Calls | Price | Subtotal |
| --- | --- | --- | --- |
| [WeChat Official Account article detail](https://onefeedapi.com/apis/wechat_mp/articles/get/) | 1 | $0.0200 | $0.0200 |
| [WeChat Official Account articles](https://onefeedapi.com/apis/wechat_mp/accounts/articles/list/) | 3 | $0.0200 | $0.0600 |
| Total | 4 |  | $0.0800 |

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

## In your AI (MCP)

Connect OneFeedAPI 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: Here is a WeChat article link. Use OneFeedAPI to find the Official Account that published it and list its 30 latest articles: title, date and link.

What the agent sends to the call tool: 

```json
{
  "capability": "wechat_mp.articles.get",
  "url": "https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc",
  "idempotency_key": "<a new UUID>"
}
```

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

## With a Skill

The Competitor account monitoring Skill does this job as a ready-made task, under a spending cap. “What did competitors post this week, and which post took off?” Its example run: 2 calls, at most $0.0040. [Competitor account monitoring](https://onefeedapi.com/skills/competitors/)

## Good to know

- Only need one article's full text? Give its link to the article endpoint (step 1 above): one call returns the title, the whole text and the account, with no list needed.
- A page holds about 10 articles, 20 at most. A cursor works for an hour; after that, start again from the first page.
- Some pages hold more: a page is every article of a few pushes, and one has held 63.
- The list gives each article's digest in `text`, not its whole text, and no counts. Get the full text from the article detail and the reads and likes from the article stats, both by the article's `url`.
- An article's `id` is made of the `__biz`, `mid` and `idx` in its long link. The endpoints that read one article take its `url`, not this `id`.
- A `gh_` ID no account has is answered `not_found` and is not charged.

## The whole script

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

```python
# pip install onefeedapi
# export ONEFEED_API_KEY=dx_...   (your key)
import csv
from decimal import Decimal
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()
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

ARTICLE_URL = "https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc"
PAGES = 3

# 1. One article of the account: its author.id is the account's original ID (gh_...).
article = run("wechat_mp.articles.get", {"url": ARTICLE_URL})["data"]["item"]
account = article["author"]["id"]

# 2. The account's articles, newest first, page after page.
rows, cursor = [], None
for _ in range(PAGES):
    page = run("wechat_mp.accounts.articles.list", {"id": account, **({"cursor": cursor} if cursor else {})})
    for item in page["data"]["items"]:
        rows.append([item.get("published_at"), item.get("title"), item.get("url")])
    cursor = page["page"]["next_cursor"]
    if not page["page"]["has_more"]:
        break

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

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

Run for real on 2026-10-29: 4 calls, 30 rows written, $0.0800 charged. A failed call is not charged.

## Endpoints

- [WeChat Official Account article detail](https://onefeedapi.com/apis/wechat_mp/articles/get/)
- [WeChat Official Account articles](https://onefeedapi.com/apis/wechat_mp/accounts/articles/list/)

## More about WeChat Official Accounts

- [WeChat Official Accounts API](https://onefeedapi.com/apis/wechat_mp/)
- [How to get WeChat Official Account article reads and likes](https://onefeedapi.com/guides/wechat-article-reads-and-likes/)
- [How to get WeChat Channels video comments](https://onefeedapi.com/guides/wechat-channels-video-comments/)
- [How to list a WeChat Channels account's videos](https://onefeedapi.com/guides/wechat-channels-user-videos/)
- [How to get WeChat Search results by keyword](https://onefeedapi.com/guides/wechat-search-posts/)
- [Is there an API for WeChat Official Account articles?](https://onefeedapi.com/answers/is-there-an-api-for-wechat-official-account-articles/)
- [How do I get WeChat Channels data?](https://onefeedapi.com/answers/how-to-get-wechat-channels-data/)
- [What is __biz in a WeChat article link?](https://onefeedapi.com/answers/wechat-official-account-biz/)
- [What do mid, idx and sn mean in a WeChat article link?](https://onefeedapi.com/answers/wechat-article-link-mid-idx-sn/)
- [What is a WeChat Official Account's original ID (gh_)?](https://onefeedapi.com/answers/wechat-official-account-original-id/)
- [What is a WeChat Channels account ID (…@finder), and what is an export ID?](https://onefeedapi.com/answers/wechat-channels-finder-id/)

---

Catalog revision dc959672dd18e2d0. [HTML version](https://onefeedapi.com/guides/wechat-official-account-articles/)
