AGENT 接入
把 SecNews.Today 接进你的 Agent
MCP、RSS、API 三种方式读的是同一份数据:精选、热点、日报、周报和月报,按你用的工具选一种就行。全部匿名只读,不用注册,也不用 API Key。
服务正常版本0.1.0匿名只读 · 无需 Key
REST API · 0.1.0
匿名 GET,读取已发布内容
接口不需要密钥;返回文章保留发布时的语言。页面的 lang 参数只切换界面。
- 1
查询最近资讯
bashcurl 'https://secnews.today/api/v1/items?mode=selected&window=24h&limit=20'mode 支持 selected/all,window 支持 24h/7d。q 搜索标题和摘要;domain 选择方向。分页沿用同一组筛选,将 page.nextCursor 传入 cursor。
- 2
查看接口定义
打开 OpenAPI 3.1https://secnews.today/openapi-v1.json - 3
读取日报、周报和月报
https://secnews.today/api/v1/dailies/latesthttps://secnews.today/api/v1/weeklies/latesthttps://secnews.today/api/v1/monthlies/latest先请求不带 /latest 的索引取得 key,再按 key 读取历史期数。没有已发布期数时 latest 返回 404。
同步与错误处理
bash
curl 'https://secnews.today/api/v1/selected/snapshot?fields=default'
# Use the returned cursor with /api/v1/selected/changes?cursor=...按 nextPage 完成快照分页,再沿 cursor 拉取 changes;处理 upsert 和 remove。409 表示必须重新开始快照,不能忽略撤回。400 表示参数错误,503 表示暂不可用。200 且 items 为空表示当前没有匹配的公开内容,不等于采集失败。