Articles

Read-only public endpoints for published articles with MCP-style API key auth.

Authentication

Pass the same API key used for MCP either as:

  • Query param: ?key=YOUR_API_KEY
  • Header: Authorization: Bearer YOUR_API_KEY

List articles

GET /api/articles

Query parameters

  • page (default 1)
  • limit (default 10, max 100)
  • offset (optional, defaults to (page - 1) * limit)
  • order = asc|desc (default desc)
  • orderBy / orderby = publishedAt|createdAt|updatedAt|title (default publishedAt)
  • search / q = full-text contains filter across title, excerpt, and content
  • slug = exact slug filter
  • title = case-insensitive contains filter on title
  • publishedAfter = ISO date filter (inclusive)
  • publishedBefore = ISO date filter (inclusive)
  • include = comma-separated markdown and/or html

Visibility rules

Only articles where:

  • isPublished = true
  • publishedAt <= now()

Response

Returns:

  • articles: array of article objects
  • pagination: total/count/limit/offset/page/totalPages/hasNext/hasPrevious
  • filters: normalized filter values
  • sort: normalized ordering values

Get article by slug

GET /api/articles/:slug

Optional query params:

  • include=markdown
  • include=html
  • include=markdown,html

Applies the same visibility rules as the list endpoint.

Cookies

We use essential cookies to run the app. With your consent, we’ll also use analytics to improve Nanoblog.

Cookie policy