API 文档

NewClaw API

通过 API 获取 AI 新闻、Twitter 动态和热点数据

基础 URL

https://newclaw.com/api

API 端点

GET
/api/news

获取 AI 新闻列表

参数

名称类型必需描述
limitnumber
返回数量,默认 20
categorystring
分类筛选
isHotboolean
仅热门,默认 false

响应示例

{
  "success": true,
  "data": [
    {
      "id": "1",
      "title": "...",
      "chineseTitle": "...",
      "category": "AI/ML",
      "source": "OpenAI Blog",
      "publishedAt": "2026-02-16T05:24:37.010Z",
      "isHot": true,
      "aiScores": {
        "relevance": 10,
        "quality": 9,
        "timeliness": 10,
        "overall": 9.7
      }
    }
  ]
}
GET
/api/twitter

获取 Twitter AI 动态

响应示例

{
  "success": true,
  "tweets": [
    {
      "id": "tw_1",
      "content": "...",
      "author": {
        "name": "Andrej Karpathy",
        "username": "karpathy",
        "verified": true
      },
      "likes": 15420,
      "publishedAt": "2026-02-16T05:24:37.011Z",
      "aiAnalysis": {
        "chineseSummary": "...",
        "importance": "high"
      }
    }
  ]
}
GET
/api/sources

获取 RSS 源统计信息

{
  "success": true,
  "stats": {
    "total": 116,
    "english": 79,
    "chinese": 37,
    "highPriority": 21,
    "mediumPriority": 64,
    "lowPriority": 31
  }
}

使用示例

cURL

curl -X GET "https://newclaw.com/api/news?limit=10"

JavaScript

const response = await fetch('https://newclaw.com/api/news?limit=10');
const data = await response.json();
console.log(data.data);

开源项目

NewClaw 是开源项目,欢迎 Star 和贡献代码