For developers

The API

A REST API for building mobile and web clients on top of the Marginalia archive. All endpoints return JSON. Authenticate with an API key created in the admin console.

Authentication

Send your key in one of three ways:

# 1) Header (recommended)
X-API-Key: azq_YOUR_KEY

# 2) Bearer token
Authorization: Bearer azq_YOUR_KEY

# 3) Query string (for quick tests)
?api_key=azq_YOUR_KEY

Missing or invalid keys return 401 Unauthorized.

Endpoints

GET/api/public/v1/quote-of-the-day

Today's quote of the day.

curl -H "X-API-Key: azq_..." \
  https://your-domain/api/public/v1/quote-of-the-day
GET/api/public/v1/quotes

Paginated list of quotes. Optional filters: ?author=<slug>&topic=<slug>&limit=20&offset=0

curl -H "X-API-Key: azq_..." \
  "https://your-domain/api/public/v1/quotes?limit=20&topic=love"
GET/api/public/v1/quotes/:id

Retrieve a single quote by UUID.

curl -H "X-API-Key: azq_..." \
  https://your-domain/api/public/v1/quotes/<uuid>
GET/api/public/v1/authors

All authors, paginated.

curl -H "X-API-Key: azq_..." \
  "https://your-domain/api/public/v1/authors?limit=50"
GET/api/public/v1/authors/:slug

Author profile + their quotes.

curl -H "X-API-Key: azq_..." \
  https://your-domain/api/public/v1/authors/albert-einstein
GET/api/public/v1/topics

List of all topics.

curl -H "X-API-Key: azq_..." \
  https://your-domain/api/public/v1/topics
GET/api/public/v1/topics/:slug

Topic + associated quotes.

curl -H "X-API-Key: azq_..." \
  https://your-domain/api/public/v1/topics/love
GET/api/public/v1/search?q=<query>

Full-text search across quotes.

curl -H "X-API-Key: azq_..." \
  "https://your-domain/api/public/v1/search?q=courage"

Response format

{
  "data": [ ... ],
  "total": 128,
  "limit": 20,
  "offset": 0
}

CORS is enabled for all origins so your mobile app can call the API directly.