Skip to content

Errors & Rate Limits

Every status code the API can return, and how the rate limit works.

Error responses

  • 401{"error":"Missing x-api-key header"} — no x-api-key header was sent.
  • 401{"error":"Invalid API key"} — the key doesn't match any site.
  • 404{"error":"Article not found"} — returned by /articles/:slug when the slug doesn't match an article on your site.
  • 429{"error":"Rate limit exceeded. Try again later."} — you exceeded the rate limit below.

Rate limiting

The API allows 100 requests per minute per API key. Exceeding this returns a 429 response with the following headers. These headers are only sent on the 429 response — they are not included on successful responses.

  • X-RateLimit-Limit — maximum requests per minute
  • X-RateLimit-Remaining — remaining requests (always 0 on a 429)
  • X-RateLimit-Reset — Unix timestamp in milliseconds when the limit resets
  • Retry-After — seconds until the limit resets
http
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1743331200000
Retry-After: 42

{"error":"Rate limit exceeded. Try again later."}

Tip: cache responses (e.g. next: { revalidate: 3600 } in Next.js) to minimize API calls and stay well under the limit.