# 微信公众号 公众号历史文章 API (wechat_oa.account_articles)

- Canonical page: [https://everyinfra.com/wechat-oa-api/account_articles](https://everyinfra.com/wechat-oa-api/account_articles?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "wechat_oa", "action": "account_articles", "params": {...}}
- Price: $0.008 per call ($8 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 8, max 160 per call
- Mode: sync; add "mode": "async" for slow tasks

公众号历史文章按 `account` 列出一个公众号过去发布的文章，每篇带标题、链接、封面图、发布时间、排位、是否原创和是否已删除。它回答「这个号一直在写什么、更新频率如何」，适合做账号评估、竞品内容复盘和行业文章库建设。

`account` 可以填微信号、gh_ 开头的原始 ID，或能定位到该公众号的账号链接、文章链接，不能填个人微信号。`position` 是文章在当次推送里的排位，数字小的是头条；`is_deleted` 标出已删除的文章，`is_original` 标出声明了原创的文章；`account_ghid` 是公众号在微信体系内的唯一标识，适合用来去重。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=wechat_oa&action=account_articles

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| account | not declared | yes | not declared | 公众号标识，可用微信号、gh_ 开头的原始 ID，或可解析公众号的账号/文章 URL；不是个人微信号。account_principal 取主体资料，account_articles 取历史文章列表，account_today_articles 取当日文章。 |
| limit | integer (1–160) | no | 8 | 这次调用最多返回的条数，整数，1–160；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| url | 该记录在原平台上的可访问链接。 |
| cover_image_url | 封面图。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| position | 这篇文章在同一次推送（群发）里的排位，数字越小越靠前，最小的是头条；不是阅读量或热度排名。 |
| is_original | 是否为原创声明文章。 |
| is_deleted | 内容是否已被删除。 |
| account_name | 公众号名称。 |
| account_id | 公众号 ID。 |
| account_ghid | 公众号的 gh_ 开头原始 ID，微信体系内的唯一标识。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "wechat_oa",
  "action": "account_articles",
  "params": {
    "account": "36氪"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "wechat_oa",
        "action": "account_articles",
        "params": {
            "account": "36氪",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-10-24T18:28:34Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 36. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "wechat_oa",
  "action": "account_articles",
  "results": [
    {
      "id": 2248907014,
      "title": "新天坑专业来了！",
      "url": "http://mp.weixin.qq.com/s?__biz=MzI2NDk5NzA0Mw==&mid=2248907014&idx=1&sn=53f65801e362eac1102cfd9ac0958ddd&chksm=e83826ef9b9138c6ac8c1e4b88daa14c0941bd82c199db5406890e2ccf5d02f76f320b805553&scene=126&sessionid=0#rd",
      "cover_image_url": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/o02wSnKAPeGiaFn4ZHxq44OgF3EvsV427DibBQJ3Wm0d1Jp1al1aMxXGGT4DJibn5KRr8oiajiadOaNA1tK2Mic69MEHcZnAuwPKfyNCXM7zb2icT0/640?wxtype=jpeg&wxfrom=25",
      "posted_at": "2026-10-24T13:30:00+00:00",
      "position": 1,
      "account_ghid": "gh_240fbf8b33e4",
      "platform": "wechat_oa"
    },
    {
      "id": 2248907014,
      "title": "全脂中产疯抢「蛋白糕」：噎得干瞪眼也不能掉肌肉",
      "url": "http://mp.weixin.qq.com/s?__biz=MzI2NDk5NzA0Mw==&mid=2248907014&idx=2&sn=7742abe42aa2ecc2da11d0020e7d968f&chksm=e8a0eeb36a2ae07e805bb65471cd6c5726d303af90b895df7b9624215dacb7bb72ea8b1fb776&scene=126&sessionid=0#rd",
      "cover_image_url": "https://mmbiz.qpic.cn/mmbiz_jpg/o02wSnKAPeGOU4Kj24AlXJ6tReJdcGBRu5HkBKicfQDxmkUPUgw1U2l3icNibSe0k2nbKqXmWmIe4ibatjOm0sxFahFotcDNia495enyZrOVbicVQ/300?wxtype=jpeg&wxfrom=25",
      "posted_at": "2026-10-24T13:30:00+00:00",
      "position": 2,
      "account_ghid": "gh_240fbf8b33e4",
      "platform": "wechat_oa"
    }
  ],
  "count": 36,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### `account` 能填哪些标识？

微信号、gh_ 开头的原始 ID，或者能解析出这个公众号的账号链接、文章链接都可以；个人微信号不行。只知道公众号名称时，可以先用公众号搜索找到它的标识。

### 怎么判断文章是不是原创、有没有被删？

`is_original` 为真表示文章声明了原创；`is_deleted` 为真表示内容已被删除，这类文章的链接可能打不开，统计时可以单独处理。

### 同一个公众号怎么去重？

用 `account_ghid`，它是公众号 gh_ 开头的原始 ID，在微信体系内唯一；公众号名称可能会改，不适合做存储时的主键。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=wechat_oa
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
