GET/api/v1/stories
返回当前榜单吃瓜列表,口径与网站一致:默认 24 小时热榜;board=48h 对应前台「全部(48小时)」;board=all 返回当前 stories.json 全部条目。
| 参数 | 默认 | 说明 |
board | 24h | 24h、48h 或 all |
topic | — | 可选:黑天鹅、交易所、人事、市场 |
factStatus | — | 可选,按事实状态精确过滤,如 官方确认、多方转述 |
q | — | 按标题、摘要、详情、分类、来源账号等关键词过滤 |
limit | 20 | 每页条数,最大 100 |
offset | 0 | 偏移量,用于翻页 |
includeSources | 1 | 0 时去掉 sources 数组以减小体积 |
curl -sS "https://web3gua.com/api/v1/stories?board=24h&limit=5"
const res = await fetch("https://web3gua.com/api/v1/stories?limit=5");
const data = await res.json();
if (data.ok) console.log(data.items);
GET/api/v1/stories/:id
按事件 id 返回单条完整数据(含来源与绝对链接)。先查当前榜,找不到再查历史归档。响应为 { ok, updatedAt, item },其中 item.url 为事件页地址,如 https://web3gua.com/event/fincen-breach/;来源头像为 https://web3gua.com/avatars/...。
curl -sS "https://web3gua.com/api/v1/stories/fincen-breach"
const res = await fetch("https://web3gua.com/api/v1/stories/fincen-breach");
const { ok, item } = await res.json();
GET/api/v1/history
返回「历史大瓜」榜单,口径与网站相同:已离开 48 小时窗口、热度达标、且不在当前榜上的事件。支持 topic、q、factStatus、limit(默认 20,最大 100)、offset、includeSources。
curl -sS "https://web3gua.com/api/v1/history?limit=5"
const res = await fetch("https://web3gua.com/api/v1/history?limit=5");
const data = await res.json();