每日简报

开发者 API

开发者 API

JSON · UTF-8 · CORS

每次生成简报都会同步输出静态 JSON 接口,托管在 Cloudflare Pages,无需鉴权,支持跨域(Access-Control-Allow-Origin: *)。

接口

板块 id

x_trending 子板块:general 综合热门 / zh_ai 中文 AI 热点 / en_ai 英文 AI 热点; cn_social 子板块:weibo / xiaohongshu / zhihu / douyin / bilibili / general(全网或跨平台,只输出当天有内容的平台)。

数据结构

{
  "date": "2026-11-01", "issue": 1, "title": "每日简报 · 2026年11月1日",
  "generated_at": "2026-11-01T08:00:00+08:00", "highlight": "今日要点…",
  "url": "…/archive/2026-11-01.html", "json_url": "…/api/briefs/2026-11-01.json",
  "item_count": 33,
  "sections": [
    { "id": "tech_ai", "name": "科技与 AI", "item_count": 5,
      "items": [ { "title": "…", "summary": "…",
                   "id": "2026-11-01-tech_ai-1", "url": "…/archive/2026-11-01.html#2026-11-01-tech_ai-1",
                   "sources": [{"name": "CNBC", "url": "https://…"}], "link": "https://…",
                   "tags": [], "mentions": ["DonghaoHm"], "rank": 1 } ] },
    { "id": "x_trending", "name": "X 热点",
      "subsections": [ { "id": "zh_ai", "name": "中文圈 AI", "items": [ … ] } ] }
  ]
}

link 为条目的主链接(第一个来源的网址,网页上点标题即打开它),没有来源时为 null。rank 只出现在榜单类板块(hacker_news、cn_social);tags、mentions(条目里提到的 X 账号,不带 @)可能为空数组。 每个条目的 id 形如 日期-板块-序号,同时是网页里的锚点,可直接链接到该条。

搜索索引(按月分片)

api/search/index.json:{"version": 1, "updated_at", "count", "sections": {"tech_ai": "科技与 AI", …}, "subsections": {"x_trending/zh_ai": "中文圈 AI", …}, "months": [{"month": "2026-11", "count": 33, "file": "2026-11.json", "first": "2026-11-01", "last": "2026-11-30", "bytes": 12345}]},months 新→旧。

api/search/YYYY-MM.json:{"month", "count", "items": [{"id", "date", "section", "subsection?", "title", "snippet", "url"}]}。snippet 为摘要前 120 字,url 为站内绝对路径(如 /archive/2026-11-01#2026-11-01-tech_ai-1)。客户端建议先取目录,再从最新月份往前按需加载。

api/search.json 已弃用:为了避免文件随时间无限增长,现在只包含最近一个月的条目(字段不变:id, date, section, section_name, subsection?, subsection_name?, title, summary, sources, mentions, url),请迁移到分片接口。网页搜索:/search?q=关键词。

示例

curl -s https://news.waif.space/api/latest.json | jq '.sections[].name'

fetch("https://news.waif.space/api/latest.json").then(r => r.json()).then(d => console.log(d.highlight))