零度/数据接口

只读接口 · 无需 Token

博客数据,直接拿 JSON

文章列表、元信息、单篇详情都可以通过这个域名取到。全部是 GET 请求, 不需要鉴权,返回标准 JSON,跨域已放开,前端可以直接 fetch。 每篇还能直接下载 .md 或 .docx 全文。

端点

Base URL:https://api.blog.lnboself.cn
方法路径说明
GET/api/health.json健康检查
GET/api/index.json接口目录,程序可自动发现
GET/api/site.json站点元信息
GET/api/posts.json文章列表,含导出地址
GET/api/posts/{id}.json单篇详情(章节结构 + 导出地址)
导出

每篇文章可下载 .md 与 .docx,地址在接口的 export 字段里; 全部文章合集在 /files/all.md 与 /files/all.docx。

在线试用

点按钮直接请求真实接口
GET /api/posts.json

文章列表。total 是总数,posts 是数组。

curl -s https://api.blog.lnboself.cn/api/posts.json | head -40
GET /api/site.json

站点元信息。

curl -s https://api.blog.lnboself.cn/api/site.json
GET /api/posts/cloudflare-free-tier.json

给一台小服务器套上 Cloudflare:免费版的边界在哪

curl -s https://api.blog.lnboself.cn/api/posts/cloudflare-free-tier.json
GET /api/posts/rsync-images.json

一条 rsync 管好全站图片

curl -s https://api.blog.lnboself.cn/api/posts/rsync-images.json
GET /api/posts/realip-behind-cdn.json

日志里全是机房 IP:realip 到底怎么还原

curl -s https://api.blog.lnboself.cn/api/posts/realip-behind-cdn.json
GET /api/health.json

健康检查,不缓存,适合监控轮询。

curl -s -i https://api.blog.lnboself.cn/api/health.json

使用说明

跨域

响应带 Access-Control-Allow-Origin: *,浏览器可直接 fetch,预检返回 204。

频率

单 IP 限速 5 次/秒,突发 40 次。不建议秒级轮询,数据一天最多更新几次。

缓存

除 /api/health.json 外都带 Cache-Control: max-age=60。

授权

内容可自由转载,注明出处即可。接口不收费、不需要申请。

联系

邮箱
2725854295@qq.com
微信公众号
凌的科技圈
接口异常
邮件里带上时间、路径和返回内容