WeChat Get Account Articles
### Purpose Retrieve one page of historical posts from a WeChat official account. Articles are selected by default; video, audio, and image-text tabs are also supported. Each call returns a single page and does not automatically retrieve the account's full history. ### Inputs Provide a required `request_body` object containing: - `username` (required): the account identifier, such as `gh_363b924965e9`. Supported forms include `gh_…`, `gh_…@app` for mini-program-linked accounts, and custom WeChat IDs such as `nikejdi`. - `offset` (optional): a base64 pagination cursor. Omit it or use an empty string for the first page. For the next page, pass the previous response's `data.next_offset` unchanged. - `page_size` (optional): integer from 1 to 100, default 20. WeChat currently ignores this value; the actual number of returned items is determined by the account. Use the cursor to paginate. - `item_show_type` (optional): omitted or `0` for articles, `5` for videos, `7` for audio, or `8` for image-text posts. - `raw` (optional): defaults to `true` for raw nested batch entries. Set `false` for simplified article records, recommended for list display. ### Results and pagination The response's `data` contains `biz_username` (account identifier), `articles` (this page's records), `count` (number returned on this page), `is_end` (0/1 end-of-list flag), and `next_offset` (cursor for the next request; null on the last page). Stop paging when `is_end` is `1`. With `raw=false`, records in `data.articles[]` use snake_case fields including `app_msg_id`, `title`, `digest`, `url`, `cover`, `covers`, `create_time`, and `update_time`, along with position, type, image-count, and paid-content indicators. With `raw=true`, records are full raw batch entries containing `appMsg` and `baseInfo`; article content is under `data.articles[N].appMsg.detailInfo`, and one batch can contain multiple articles. Both formats use the same top-level pagination fields. Responses can be slow; a 30-second client request timeout is recommended. Timeout is a client setting, not an input parameter.
Pricing
| Condition | Charge |
|---|---|
| Each call | 20.65 credits/call |
20.65 credits/call Charges are per query. A successful query is billed even if it returns no results.
Each call retrieves one page of historical posts. Each additional page requires a separate call and is charged separately. The charge does not vary with the number of records returned, the selected content tab, or the raw or simplified response format.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | 获取指定微信公众号历史发文单页列表的请求体对象。包含必填的 username(公众号账号标识),以及可选的 offset(翻页游标)、page_size(每页数量,微信当前忽略此值)、item_show_type(内容栏目)和 raw(原始或精简返回格式);翻页时将上一页响应的 next_offset 作为 offset 传入。/Request body object for retrieving one page of a WeChat official account's historical posts. Contains the required username (account identifier) and optional offset (pagination cursor), page_size (page size, currently ignored by WeChat), item_show_type (content tab), and raw (raw or simplified response format). For the next page, pass the previous response's next_offset as offset. | — |
request_body.raw | boolean | No | True=原始响应;False=精简解析结构/True=raw response; False=simplified parsed structure | true |
request_body.offset | string | null | No | 翻页游标(base64),首页留空;翻页传上一页响应的 next_offset/Pagination cursor (base64), leave empty for first page; for the next page pass next_offset from the previous response | "" |
request_body.username | string | Yes | 公众号 username。三种形态都支持:`gh_…`、`gh_…@app`(关联小程序的账号)、以及自定义微信号(如 `nikejdi`)。取自文章详情接口响应的 `$.data.content.user_name`/Official account username. Three forms are supported: `gh_…`, `gh_…@app` (mini-program-linked accounts) and custom WeChat IDs (e.g. `nikejdi`). Taken from `$.data.content.user_name` of the article detail endpoints | — |
request_body.page_size | integer | No | 每页数量(默认 20)。⚠️ 微信当前**忽略**该参数:返回条数由公众号自身决定,实测取 1 与取 40 结果完全相同;翻页请用 offset / next_offset/Articles per page (default 20). NOTE: WeChat currently ignores this parameter — the count is decided by the account itself; paginate with offset / next_offset | 20 |
request_body.item_show_type | integer | null | No | 内容栏目:留空/0=文章(默认)、5=视频、7=音频、8=贴图/Content tab: empty/0=articles (default), 5=videos, 7=audios, 8=image-text posts | — |
Invocation example
Copy the request and explore its response example.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_wechat_get_account_articles' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"raw": false,
"username": "caclpexpo"
}
}
}'{
"code": 200,
"data": {
"articles": [],
"biz_username": "",
"count": 0,
"debug_id": "bc1a4441",
"debug_info": "[REDACTED]",
"is_end": null
},
"docs": "https://api.tikhub.io/#/WeChat-Media-Platform-V2-API/fetch_account_articles_api_v1_wechat_mp_v2_fetch_account_articles_post",
"message": "Request successful. This request will incur a charge.",
"message_zh": "请求成功,本次请求将被计费。",
"params": {
"item_show_type": null,
"offset": "",
"page_size": 20,
"raw": false,
"username": "caclpexpo"
}
}This example shows part of the response. Copied content is valid JSON.


