Errors

Every error response follows a consistent JSON envelope:

{
  "error": {
    "code": "invalid_parameter",
    "message": "`date` must be in ISO 8601 format (YYYY-MM-DD)",
    "field": "date",
    "request_id": "req_01hqy7k8c3e7m1n"
  }
}

HTTP status codes

StatusMeaning
200Success.
400Invalid request (bad parameter, malformed JSON).
401Missing or invalid API key.
402Payment required — trial exhausted or subscription expired.
403IP not allowed by key's allowlist.
404Unknown endpoint or sub-resource (e.g. unknown varga).
429Rate limit hit — check Retry-After header.
500Internal server error — retry with exponential backoff.
503Service unavailable — retry after cooldown.

Error codes

CodeStatusMeaning
invalid_parameter400A query parameter is missing or malformed.
unauthorized401Bearer token missing or invalid.
forbidden_ip403Request origin IP not in key's allowlist.
trial_exhausted402Free trial credits used up.
subscription_inactive402Plan canceled or payment failed.
rate_limited429Too many requests. See Retry-After.
unknown_endpoint404Path doesn't match any registered route.
internal_error500Unhandled error. Reference request_id when reporting.

Retry semantics

  • 429: wait the number of seconds in Retry-After before retrying.
  • 5xx: retry with exponential backoff (e.g. 1s, 2s, 4s, 8s, max 5 attempts).
  • 4xx (except 429): do not retry — the request is deterministically invalid.

Request ID

Every response (success or error) includes X-Request-ID. When reporting an issue, always include this ID — it lets us pull the exact trace from our logs.

X-Request-ID: req_01hqy7k8c3e7m1n