让你的 agent 读取 AI·NEWS
AI·NEWS — agent skill
AI·NEWS 是一个完全由 AI 驱动的中文 AI 新闻站:大模型前沿、AI 行业、模型发布、热门 AI 项目、机器人。
- 网站:https://axiig.com
- API:
https://axiig.com/api(JSON,UTF-8,时间为 UTC 的YYYY-MM-DD HH:MM:SS) - RSS:https://axiig.com/rss.xml
1. 读取与下载新闻(不需要 key)
只有新闻开放下载。 博客、AI视频和图库只在网站上浏览,不要批量抓取或转载。
| 请求 | 说明 |
|---|---|
GET /api/news | 新闻列表,最新在前 |
GET /api/news/<id> | 一条新闻的全文 |
GET /api/meta | 分类列表(kind 为 news 的是新闻分类)和总数 |
GET /api/news 的参数(都可选):
| 参数 | 含义 |
|---|---|
limit | 每页条数,默认 8,最大 200 |
offset | 跳过多少条,用来翻页 |
sort | time(最新,默认)或 heat(最热) |
category | 分类:ai-frontier 前沿 · ai-industry 业界 · ai-models 模型发布 · ai-projects 项目 · robots 机器人 |
from / to | 发布日期范围,YYYY-MM-DD |
q | 在标题、导语、正文里搜索 |
tag | 按标签筛选 |
返回 { items, total, limit, offset }。每条新闻的主要字段:id、title、summary(导语)、content(正文,段落之间空一行)、category、source(原始媒体)、url(原文链接)、imageUrl、images、links(相关链接)、tags、publishedAt、score(热度)。网页地址是 https://axiig.com/news/<id>。
最新 20 条:
curl -s "https://axiig.com/api/news?limit=20" | jq '.items[] | {id, title, summary, category, publishedAt, url}'
把一段时间内的全部新闻下载成 JSON Lines:
off=0
while :; do
page=$(curl -s "https://axiig.com/api/news?from=2026-10-01&to=2026-10-31&limit=200&offset=$off")
echo "$page" | jq -c '.items[]' >> ainews.jsonl
n=$(echo "$page" | jq '.items | length'); off=$((off + n))
if [ "$n" -eq 0 ] || [ "$off" -ge "$(echo "$page" | jq .total)" ]; then break; fi
sleep 1
done
使用规则:
- 一秒最多一个请求,尽量用
limit=200翻页;同一批数据缓存起来,不要重复下载。 - 引用或转述时注明出处:
AI·NEWS https://axiig.com/news/<id>,原始报道附上url。 - 只读数据时不要发 POST / PUT / DELETE。
2. 发布与更新内容(需要管理员 API key)
只有站长持有 API key。用户把 key 交给你时(例如放在环境变量 AINEWS_API_KEY),每个写请求都带上:
Authorization: Bearer $AINEWS_API_KEY
不要把 key 打印出来,不要写进文件、提交记录或回复。没有 key 时写请求一律返回 401,不用尝试。先确认 key 可用:
curl -s -H "Authorization: Bearer $AINEWS_API_KEY" "https://axiig.com/api/auth" # {"ok":true}
| 内容 | 新建 | 修改 | 删除 |
|---|---|---|---|
| 新闻 | POST /api/news | PUT /api/news/<id> | DELETE /api/news/<id> |
| 博客 | POST /api/blog | PUT /api/blog/<id> | DELETE /api/blog/<id> |
| AI视频 | POST /api/videos | PUT /api/videos/<id> | DELETE /api/videos/<id> |
| 图库图片 / 视频 | POST /api/media | PUT /api/media/<id> | DELETE /api/media/<id> |
| 上传文件 | POST /api/upload(multipart,字段名 file) |
PUT 只改你传的字段,其余保持不变。博客和视频的读取接口是 GET /api/blog、GET /api/videos(参数 limit、offset、q、tag)。
新闻
必填 title、category(上面五个分类之一)。常用字段:summary(一句话导语)、content(300 字以上中文正文,段落之间用 `
)、source、url(原文)、imageUrl 或 images(数组,第一张是封面)、links([{"label":"GitHub","url":"https://…"}])、tags、heat(0–100,90 以上上首页焦点)、featured、publishedAt`。
curl -s -X POST "https://axiig.com/api/news" \
-H "Authorization: Bearer $AINEWS_API_KEY" -H "Content-Type: application/json" \
-d '{"title":"某模型开源发布","category":"ai-models","summary":"一句话导语","content":"第一段。
第二段。","source":"TechCrunch","url":"https://techcrunch.com/…","imageUrl":"https://…/cover.jpg","tags":["开源","LLM"],"heat":80}'
博客(站长的原创文章)
必填 title。content 是 Markdown(支持标题、加粗、列表、引用、代码块、表格、链接和图片)。其他字段:summary、cover(封面图 URL)、tags、author、publishedAt。
jq -n --arg t "文章标题" --arg s "一句话摘要" --rawfile c post.md \
'{title:$t, summary:$s, content:$c, tags:["观点"]}' |
curl -s -X POST "https://axiig.com/api/blog" \
-H "Authorization: Bearer $AINEWS_API_KEY" -H "Content-Type: application/json" -d @-
AI视频
必填 title、url。url 可以是视频文件(mp4 / webm),也可以是 YouTube、Bilibili、Vimeo 的视频页(网站会自动嵌入播放器)。其他字段:cover(封面图)、summary、content(Markdown 说明)、tool(生成工具,如 Veo 4、Sora 2、可灵)、prompt(提示词)、duration(00:12)、tags。
curl -s -X POST "https://axiig.com/api/videos" \
-H "Authorization: Bearer $AINEWS_API_KEY" -H "Content-Type: application/json" \
-d '{"title":"雨夜霓虹街道","url":"https://www.youtube.com/watch?v=XXXXXXXXXXX","tool":"Veo 4","prompt":"rainy neon street at night…","duration":"00:08"}'
图库
必填 title、category、type(image 或 video),以及 url 或 images(数组,多张图组成一个系列)。图库用自己的分类:chuangyi 创意 · sheji 设计 · guoman 国漫 · rimang 日漫 · chunqin 清纯 · xinggan 性感。可选 caption、source(来源页面)、thumb、duration。
上传图片或视频
本地文件先上传,拿到 URL 再写进上面任何一个字段:
curl -s -X POST "https://axiig.com/api/upload" -H "Authorization: Bearer $AINEWS_API_KEY" -F "[email protected]"
# {"url":"https://…/uploads/…jpg","type":"image","bytes":123456}
只接受 jpg、png、webp、gif、svg、mp4、webm、mov。部署在 Vercel 上时请求体上限约 4.5MB,大视频请先放到视频平台或 CDN,再把链接填进 url。
写入规则
- 网站是中文站:标题、导语、正文用中文;外文报道要翻译和整理,不要只贴原文。
- 图片用真实、相关的图(新闻原图、og:image),不要用占位图。
- 写完用
GET读回来确认,再把网页地址(https://axiig.com/news/<id>、/blog/<id>、/videos/<id>)告诉用户。 - 删除不可恢复,只在用户明确要求时执行。
错误
| 状态码 | 含义 |
|---|---|
| 400 | 缺少必填字段或格式不对,看返回的 error |
| 401 | 没有 key 或 key 不对 |
| 404 | id 不存在 |
| 429 | 点赞过于频繁 |
| 503 | 服务器没有配置 API key,暂时不能写入 |