FeedMCP

技术指南

用 Python 自动采集微信公众号历史文章、阅读点赞数与留言

适合品牌运营和行业研究团队:通过 FeedMCP 的 4 个微信接口,用一份定时 Python 脚本就能自动同步竞品公众号新推文、阅读点赞数据和读者留言。

涉及的接口与价格

接口 路径 单价
微信账号搜索 GET /v1/wechat/accounts/search $0.02
公众号历史文章 GET /v1/wechat_mp/accounts/articles/list $0.02
公众号文章全文 GET /v1/wechat_mp/articles/get $0.02
公众号文章阅读数和互动 GET /v1/wechat_mp/articles/stats $0.02
公众号文章留言 GET /v1/wechat_mp/articles/comments/list $0.02

实现步骤

1. 按名称搜索目标公众号

调用 GET /v1/wechat/accounts/search($0.02)拿到公众号 ID。

2. 拉取最近发布的历史文章列表

调用 GET /v1/wechat_mp/accounts/articles/list($0.02/页)获取最新文章 URL 和发布时间。

3. 对新文章按需抓正文和阅读点赞

只对尚未入库的新文章 URL 调用 wechat_mp.articles.get($0.02)和 wechat_mp.articles.stats($0.02)。

完整代码示例

import os, requests

API = "https://api.feedmcp.com"
HEADERS = {"Authorization": f"Bearer {os.environ['FEEDMCP_API_KEY']}", "X-Max-Price": "0.02"}

article_url = "https://mp.weixin.qq.com/s/EXAMPLE_ARTICLE"
article = requests.get(f"{API}/v1/wechat_mp/articles/get", params={"url": article_url}, headers=HEADERS, timeout=30).json()
stats = requests.get(f"{API}/v1/wechat_mp/articles/stats", params={"url": article_url}, headers=HEADERS, timeout=30).json()

print("Title:", article["data"]["item"].get("title"))
print("Stats:", stats["data"]["item"])

费用估算

单篇公众号文章拉全文 + 阅读点赞统计共 $0.04;如果文章已删除返回 not_found,系统不扣费。

常见问题

跑完这份教程大概要花多少钱?

单篇公众号文章拉全文 + 阅读点赞统计共 $0.04;如果文章已删除返回 not_found,系统不扣费。

没有代码基础,能在 AI 里直接完成同样的事吗?

可以。把 FeedMCP 的 MCP 服务装进 Claude、Cursor 或 Cherry Studio 后,用自然语言即可完成同样的查询与汇总。

更多指南