REST API
A JSON API for outside programs to read published posts and pages. It's off by default, and while off everything under /api/ returns 404. Turn it on under Settings → Public REST API.
Endpoints
GET /api/posts?limit=20&offset=0 # published posts (limit 1 to 100)
GET /api/posts/:slug # one post with approved comments
GET /api/pages/:slug # one page
POST /api/comments # submit a commentThere are no endpoints that change posts or settings. The only write is submitting a comment. Comments, including the form post to POST /post/:slug/comment, only work while this switch is on.
Example response
{
"posts": [
{
"id": 1,
"slug": "hello",
"title": "Hello",
"excerpt": "...",
"publishedAt": "2026-01-01T00:00:00.000Z",
"thumbnail": {
"mediaId": 12,
"url": "https://blog.example.com/media/12",
"mime": "image/png",
"width": 1280,
"height": 720
},
"terms": [{ "id": 3, "taxonomy": "category", "slug": "news", "name": "News" }]
}
]
}Rate limits
Comment submissions are limited per client IP: a burst of 5, then 1 every 10 seconds. Reads aren't limited; add nginx's limit_req or similar if you need it.
Separately from the API, /feed.xml (RSS) and /sitemap.xml are always public.