端点
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
- 微信公众号
- 凌的科技圈
- 接口异常
- 邮件里带上时间、路径和返回内容