Skip to main content
All errors return JSON with a consistent structure:
  • errorCode — machine-readable
  • message — human-readable explanation

Status codes

CodeMeaningWhat to do
400Bad requestFix the request (invalid or missing parameters)
401UnauthenticatedSend a valid API key in X-API-Key (not Authorization: Bearer)
402Out of creditsStop — wait for reset or upgrade
403ForbiddenEndpoint not included in your plan
404Not foundCheck the ID or resource
422Validation errorFix request based on message
429Rate limitedWait and retry
5xxServer errorRetry with backoff

Retry rules

  • Retry only: 429 and 5xx
  • Do not retry: 400, 401, 403, 404, 422
  • Stop on: 402 (credits exhausted)

Backoff strategy

  • On 429 → wait for X-RateLimit-Reset
  • On 5xx → retry with exponential backoff (start ~1s, max 3–5 attempts)

Notes

  • 404 = resource doesn’t exist
  • Empty results (200 + []) = valid, but no data
  • 400 and 5xx are not charged
  • Per-result endpoints only charge for data returned