API docs

Errors

Errors are JSON objects with error and message. Common statuses:

401 unauthorized

{
  "error": "unauthorized",
  "message": "Valid API key required. Use Authorization: Bearer cal_… or X-Api-Key."
}

429 rate_limit

{
  "error": "rate_limit",
  "message": "Monthly API request limit reached.",
  "usage": {
    "plan": "free",
    "used": 5,
    "limit": 5,
    "remaining": 0,
    "ym": "2026-07",
    "reset_at": "2026-08-01T00:00:00Z"
  }
}

422 validation

{
  "error": "validation",
  "message": "Query param country is required (ISO alpha-2 or slug)."
}

404 not_found

{
  "error": "not_found",
  "message": "Country not found."
}