API 调用说明
查看文章查询接口、参数和身份验证方法。
基础地址
https://weixin.imaseo.com
调用身份验证
/api/articles 和 /api/articles/count 的每次请求都必须携带以下两个参数:
| 参数 | 说明 | 是否必填 |
|---|---|---|
username | 调用账号,请咨询管理员 | 必填 |
password | 调用密码,请咨询管理员 | 必填 |
账号或密码缺失、填写错误时,接口返回 HTTP 401 Unauthorized:
{
"ok": false,
"message": "未授权"
}
正确调用示例:
curl "https://weixin.imaseo.com/api/articles?username=你的账号&password=你的密码&category=AI&limit=20"
错误调用示例:
curl "https://weixin.imaseo.com/api/articles?username=错误账号&password=错误密码"
# 返回 HTTP 401
{"ok": false, "message": "未授权"}
获取文章数据
GET /api/articles
| 参数 | 说明 |
|---|---|
username | 调用账号,必填,请咨询管理员 |
password | 调用密码,必填,请咨询管理员 |
category | 按分类精确筛选,例如 AI、新闻 |
account | 按公众号名称精确筛选,例如 新智元 |
from | 开始时间,例如 2026-06-01 |
to | 结束时间,例如 2026-06-15 |
limit | 返回条数,默认 20,最大 500 |
offset | 跳过条数,用于分页,默认 0 |
order | 排序,desc 或 asc,默认 desc |
fetch_content | 默认补抓缺失正文;传 0 时只返回数据库已有内容,不补抓 |
示例
curl "https://weixin.imaseo.com/api/articles?username=你的账号&password=你的密码&category=AI&limit=20" curl "https://weixin.imaseo.com/api/articles?username=你的账号&password=你的密码&account=新智元&from=2026-06-01&to=2026-06-15&limit=30"
返回字段
{
"total": 128,
"limit": 20,
"offset": 0,
"order": "desc",
"items": [
{
"id": 1,
"category": "AI",
"account": "新智元",
"title": "文章标题",
"url": "https://mp.weixin.qq.com/...",
"published_at": "2026-06-15T08:00:00+00:00",
"first_seen_at": "2026-06-15T09:00:00+00:00",
"content": "正文内容",
"content_fetched_at": "2026-06-15T10:00:00+00:00"
}
]
}
获取条数
GET /api/articles/count
同样必须提供正确的 username 和 password。支持筛选参数:
category、account、from、to。
curl "https://weixin.imaseo.com/api/articles/count?username=你的账号&password=你的密码&category=新闻"
{
"count": 42
}