Reference
Public Content API
API for published posts, journal entries, pages, and lightweight counters. Use explicit endpoints:
.json for JSON and .md for markdown. The machine-readable OpenAPI
schema lives at /api/openapi.json.
Posts
Access published blog posts as structured JSON or raw markdown.
Returns all published posts sorted by publication date descending.
Parameters
This endpoint does not accept parameters.
Returns
A list object with compact post metadata (no full content body).
Returns one post including full markdown content.
Parameters
-
slugstring required - The post slug (for example: the-startup-minded-engineers).
Returns
A post object with metadata and full markdown body.
Returns the raw markdown document including frontmatter.
Parameters
-
slugstring required - The post slug.
Returns
A text/markdown response with frontmatter + markdown body.
Journal
Access weekly journal entries in JSON or markdown format.
Returns all published journal entries sorted by publication date descending.
Parameters
This endpoint does not accept parameters.
Returns
A list object with journal metadata.
Returns one journal entry with full markdown content.
Parameters
-
slugstring required - The journal slug (for example: 2025-11-16).
Returns
A journal_entry object with metadata and full content.
Returns journal entry markdown including frontmatter.
Parameters
-
slugstring required - The journal slug.
Returns
A text/markdown response with frontmatter + markdown body.
Pages
Access static pages such as About in JSON or markdown format.
Returns all public static pages.
Parameters
This endpoint does not accept parameters.
Returns
A list object with page metadata.
Returns one static page with full markdown content.
Parameters
-
slugstring required - The page slug (for example: about).
Returns
A page object with metadata and full content.
Returns raw page markdown including frontmatter.
Parameters
-
slugstring required - The page slug.
Returns
A text/markdown response with frontmatter + markdown body.
Counters
Simple D1-backed counters (used for retro mode visitor counts).
Returns a key-based counter. By default it increments on each request; use increment=0 for read-only mode.
Parameters
-
keystring - Counter key. Defaults to retro9500:visitors.
-
increment0 | 1 - Set to 0 to read without incrementing.
Returns
A counter object with numeric count and zero-padded formatted value.
Errors
Unknown API paths return a format-aware 404 response based on what was requested.
Current behavior
- Known prebuilt endpoints return
200. -
Unknown
.jsonendpoints return a JSON error object. -
Unknown
.mdendpoints return a markdown 404 response. -
Unknown browser routes (for example
/api/does-not-exist) return an API-specific HTML404page.
Error types
JSON endpoints use a consistent error shape:
not_found: resource is missing (404)invalid_request: malformed input (400), for typed API handlersinternal_error: unexpected server error (500), for typed API handlers