# 如何获取公众号文章阅读数和点赞数

用 2 个接口：微信公众号文章列表 → 微信公众号文章互动数据。下面的示例一共 11 次调用，合计 $0.22；失败的调用不收费。

更新于 2026-11-15

拿到一个公众号最近每篇文章此刻的阅读、点赞、推荐、分享、收藏和评论数。

## 一步一步做

### 第 1 步：微信公众号文章列表

按公众号原始编号（`gh_` 开头）取最近一页文章。每条的 `url` 是文章的长链接，下一步就传它。（[微信公众号文章列表](https://onefeedapi.com/zh/apis/wechat_mp/accounts/articles/list/)，$0.0200 / 一次）

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);
```

命令行

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

录制的返回：取自 2026-10-12 19:02 UTC 录下的真实返回。名字、正文和编号是示例，链接也是，都不是录到的原文（页面不展示任何人的个人信息）；数字是原样。长列表做了截断。请求号、游标和余额是示意。

```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 条
    ]
  },
  "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"
    }
  }
}
```

### 第 2 步：微信公众号文章互动数据

每篇文章调一次互动数据接口，`url` 传它的长链接。`metrics.views` 是阅读数，`metrics.likes` 是点赞数，`ext.recommends` 是推荐数（以前叫“在看”）；`metrics.shares`、`metrics.favorites`、`metrics.comments` 分别是分享、收藏和评论数。（[微信公众号文章互动数据](https://onefeedapi.com/zh/apis/wechat_mp/articles/metrics/)，$0.0200 / 一次）

cURL

```bash
curl -G "https://onefeedapi.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 $ONEFEED_API_KEY"
```

Python

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

dx = OneFeedAPI()  # reads ONEFEED_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 @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_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);
```

命令行

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

录制的返回：取自 2026-10-29 09:44 UTC 录下的真实返回。名字、正文和编号是示例，链接也是，都不是录到的原文（页面不展示任何人的个人信息）；数字是原样。长列表做了截断。请求号、游标和余额是示意。

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

## 示例花多少钱

取一页文章列表，再逐篇取这 10 篇文章的互动数据

| 接口 | 调用次数 | 单价 | 小计 |
| --- | --- | --- | --- |
| [微信公众号文章列表](https://onefeedapi.com/zh/apis/wechat_mp/accounts/articles/list/) | 1 | $0.0200 | $0.0200 |
| [微信公众号文章互动数据](https://onefeedapi.com/zh/apis/wechat_mp/articles/metrics/) | 10 | $0.0200 | $0.20 |
| 合计 | 11 |  | $0.22 |

价格是生成本页时的现行价格。失败的调用不收费。

## 在 AI 里做（MCP）

把 OneFeedAPI 接进你的 AI 客户端，只要接一次。之后直接说要什么，代理自己找到这些接口、看好价格，用你的余额调用。

这样说：用 OneFeedAPI 取公众号 gh_13c97ab93ce8 最近 10 篇文章的阅读数和点赞数，按阅读数从高到低排。

代理发给 call 工具的参数：

```json
{
  "capability": "wechat_mp.accounts.articles.list",
  "id": "gh_13c97ab93ce8",
  "idempotency_key": "<a new UUID>"
}
```

[了解 MCP 服务](https://onefeedapi.com/zh/mcp/)

## 为什么用 OneFeedAPI

- 稳定：近 30 天接口可用 99.9%，状态页公开，可以自己核对。
- 快：近 7 天付费调用的中位耗时 3.5 秒（2026-11-06 统计）。
- 省 token：微信公众号的 8 个接口各取一份录制的真实返回，平台原始 JSON 合计 2.1 万 token，AI 通过 OneFeedAPI 的 MCP 读到的只有 4,494 token，少 79%；直接调接口拿到的 JSON 也少 70%（2026-11-06 统计）。所有平台同一种格式：作者在 `author`，互动数在 `metrics`，翻页用 `page.next_cursor`，换平台不用重写解析。
- 先看再用：每个接口的页面上都有一份录制的真实返回，字段一目了然。
- 花钱可控：失败不收费；每把 Key 能设金额上限，`X-Max-Price` 限定一次最多花多少，同一个 `Idempotency-Key` 24 小时内不重复扣费。
- 接 AI 方便：远程 MCP 服务已在 MCP 官方登记处登记（`com.onefeedapi/mcp`），Claude、Cursor、ChatGPT 都能直接用。
- 免费试用，最多 333 次，不用绑卡。

## 要知道的

- 互动数据接口只认带 `__biz`、`mid`、`idx`、`sn` 的长链接。文章列表给的就是这种链接；`/s/` 开头的短链接这里不收。
- 阅读数过了 10 万，微信只显示“10万+”。这时返回 100001，并在 `approximate` 里把 `metrics.views` 标成下限。
- 互动数据只有这些数，标题、发布时间、作者要从文章列表或文章详情里拿。每次调用取的是当时的数，想看变化就隔一段时间再调。

## 用到的接口

- [微信公众号文章列表](https://onefeedapi.com/zh/apis/wechat_mp/accounts/articles/list/)
- [微信公众号文章互动数据](https://onefeedapi.com/zh/apis/wechat_mp/articles/metrics/)

## 微信公众号的更多内容

- [微信公众号 API](https://onefeedapi.com/zh/apis/wechat_mp/)
- [如何获取公众号历史文章列表](https://onefeedapi.com/zh/guides/wechat-official-account-articles/)
- [如何获取视频号视频评论](https://onefeedapi.com/zh/guides/wechat-channels-video-comments/)
- [如何获取视频号账号的全部作品](https://onefeedapi.com/zh/guides/wechat-channels-user-videos/)
- [如何用接口查微信搜一搜的结果](https://onefeedapi.com/zh/guides/wechat-search-posts/)
- [公众号文章有 API 吗？用 Python 批量取历史文章和阅读数（2026）](https://onefeedapi.com/zh/guides/wechat-official-account-api-python/)
- [视频号有 API 吗？用 Python 取账号作品和评论（2026）](https://onefeedapi.com/zh/guides/wechat-channels-api-python/)
- [公众号文章能用 API 读取吗？](https://onefeedapi.com/zh/answers/is-there-an-api-for-wechat-official-account-articles/)
- [视频号数据怎么获取？](https://onefeedapi.com/zh/answers/how-to-get-wechat-channels-data/)
- [公众号文章链接里的 __biz 是什么？](https://onefeedapi.com/zh/answers/wechat-official-account-biz/)
- [公众号文章链接里的 mid、idx、sn 是什么意思？](https://onefeedapi.com/zh/answers/wechat-article-link-mid-idx-sn/)
- [公众号原始 ID（gh_ 开头）是什么？](https://onefeedapi.com/zh/answers/wechat-official-account-original-id/)
- [视频号的 …@finder 账号编号和 export 编号是什么？](https://onefeedapi.com/zh/answers/wechat-channels-finder-id/)
- [公众号接口报 ret=200013 freq control 怎么办（2026 年 7 月之后）](https://onefeedapi.com/zh/answers/wechat-ret-200013-freq-control/)
- [wechat-article-exporter 停了，还能用什么批量导出公众号文章（2026）](https://onefeedapi.com/zh/answers/wechat-article-exporter-alternative/)
- [wewe-rss 失效了怎么办（2026）](https://onefeedapi.com/zh/answers/wewe-rss-not-working/)

---

目录修订号 dc959672dd18e2d0。 [网页版](https://onefeedapi.com/zh/guides/wechat-article-reads-and-likes/)
