Health
GET /api/health
服务、版本、时间、翻译模型和启用状态。
HN QIAOMU API
所有响应都是 JSON;翻译只在服务端调用 DeepSeek,客户端不接触密钥。
GET /api/health
服务、版本、时间、翻译模型和启用状态。
GET /api/topics
内置主题列表,含 feed、搜索 query 和 UI accent。
GET /api/stories?topic=ai&limit=20&translate=1
读取单主题条目,可加关键词、points、评论数和翻译。
POST /api/stories/merge
请求体传 {"topics":["ai","show"],"translate":true},返回去重后的订阅流。
POST /api/translate
传入 story 数组,返回以 story id 为 key 的中文标题、看点和标签。
GET /api/openapi.json
机器可读契约,iOS 客户端可以按这个生成请求层。
let url = URL(string: "https://hn.qiaomu.ai/api/stories?topic=frontpage&translate=1")!
let (data, _) = try await URLSession.shared.data(from: url)
let feed = try JSONDecoder().decode(HNFeedResponse.self, from: data)