Docs
Public API, embed script, and MCP connection details.
Public Read-only API
This endpoint is intended for external websites. It returns only published posts and sets CORS to allow any origin.
Method:
GETPath:
/api/projects/:apiKey/postsAuth:
:apiKey is the project API keyReturns: only posts where
isPublished === true and publishedAt <= now()curl "https://YOUR_DOMAIN/api/projects/YOUR_API_KEY/posts"Query params
page(default 1)per_page(default 10, max 50)order=asc|desc(defaultdesc)orderby=publishedAt|createdAt|updatedAt
curl "https://YOUR_DOMAIN/api/projects/YOUR_API_KEY/posts?page=1&per_page=10&orderby=publishedAt&order=desc"{
"page": 1,
"per_page": 10,
"order": "desc",
"orderby": "publishedAt",
"posts": [
{
"id": "ck...",
"title": "Hello World",
"slug": "hello-world",
"excerpt": "Short summary...",
"canonicalUrl": "https://example.com/hello-world",
"featuredImageUrl": "https://cdn.example.com/projects/...",
"publishedAt": "2026-03-17T12:34:56.000Z",
"contentMarkdown": "# Markdown\n",
"contentHtml": "<h1>Markdown</h1>\n",
"createdAt": "2026-03-17T12:34:56.000Z",
"updatedAt": "2026-03-17T12:34:56.000Z"
}
]
}Get a single post by slug
Returns a single published post (same visibility rules).
curl "https://YOUR_DOMAIN/api/projects/YOUR_API_KEY/posts/hello-world"Embed Script
Drop the script tag on any external website to render published posts.
<div id="nanoblog"></div>
<script
src="https://YOUR_DOMAIN/embed.js"
data-api-key="YOUR_API_KEY"
data-target="#nanoblog">
</script>MCP (AI Agents)
Connect an MCP-compatible AI client to a specific project using the API key.
https://YOUR_DOMAIN/mcp?key=YOUR_API_KEYTools exposed
list_postsread_postcreate_postupdate_postdelete_post
Scheduling semantics
- Draft:
isPublished=false - Scheduled:
isPublished=trueandpublishedAtis in the future - Published:
isPublished=trueandpublishedAt <= now()