新闻在线
面向 AI agents 的 Hacker News API
通过官方 API 免费获取 Hacker News 条目、用户和故事动态,另有全文搜索、评论树、用户活动与 Who is hiring 招聘帖。
用 ChatGPT、Claude Code 或其他客户端? 查看接入步骤
Agent 工作流
把 Hacker News 记录当作证据,而非粘合代码。
UnifAPI 让公开的 Hacker News 接口可通过 MCP 发现、可通过 HTTP 调用。Agent 可以查看 schema,只获取任务所需的记录,并在返回结果时保留完整的请求、分页与计费元数据。
当 Agent 需要来源证据而非泛泛的网页文本时,获取公开的 Hacker News 记录。
同一套操作契约,探索性 Skills 通过 MCP 使用,生产集成通过 HTTP 使用。
将此平台与 UnifAPI 目录的其余部分组合使用,无需更改响应封装或计费逻辑。
运行它
使用 Hacker News API 的 Agents 与 Skills
你很少会手动调用 API。这些预置的 Agents 与 Skills 已经能在 Claude 或 Codex 中读取 Hacker News 记录——从其中之一开始,或自行调用下方的端点。
端点
13 个开箱即用的端点
端点名称与路径以英文显示:它们是 OpenAPI 契约中的操作名称,与你在代码中调用时完全一致。
GET/hacker-news/items/{id}Free
Get Hacker News item by ID
GET/hacker-news/items/{id}/comments$min $0.009
List the comment tree of a Hacker News story
GET/hacker-news/items/{id}/context$min $0.006
Get a Hacker News comment with its thread
GET/hacker-news/jobs/who-is-hiring$min $0.003
List jobs from Who is Hiring
GET/hacker-news/max-itemFree
Get largest Hacker News item ID
GET/hacker-news/search$min $0.003
Search Hacker News stories and comments
GET/hacker-news/stories/{feed}Free
List Hacker News story IDs
GET/hacker-news/stories/{feed}/itemsFree
List Hacker News story items
GET/hacker-news/updatesFree
Get changed Hacker News items and profiles
GET/hacker-news/users/{id}Free
Get Hacker News user by ID
GET/hacker-news/users/{id}/comments$min $0.003
List a Hacker News user's comments
GET/hacker-news/users/{id}/favorites$min $0.003
List a Hacker News user's favorites
GET/hacker-news/users/{id}/submissions$min $0.003
List a Hacker News user's submissions
相关 API