Skip to main content
When a request fails, the API returns an error response with an HTTP status code and a JSON body describing the problem.

Error response format

All API errors return both an error field and a message field:
Every error body also carries a code field, a stable machine-readable identifier such as invalid_key or rate_limited. The codes are listed under each status below.

Status codes

The fetch endpoint can also return 422 (page-level fetch failure: not_found, site_gone, blocked, unsupported, or unextractable) and 503 (temporarily unavailable — retry). See content retrieval error handling.
Causes: Missing q parameter, invalid parameter values, malformed JSON array in q.Example messages:
  • Missing required parameter: q
  • Invalid value for 'searchMode'
  • Invalid value for 'effort'. Must be one of: low, medium, high, max.
  • Request body is not valid JSON (POST requests)
Fix: Check your query string parameters against the parameter reference.
Causes: A POST body larger than 256 kB (413), or a body that isn’t UTF-8 JSON (415).Fix: Send UTF-8 JSON under 256 kB. For large multi-query requests, split them into separate calls.
Causes: No API key sent, or an invalid or revoked API key.Example messages:
  • Missing API key: send it as the x-api-key header (or Authorization: Bearer <key>)
  • Invalid API key
Codes: missing_key, invalid_keyFix: Verify your API key in the API Console. Send it in the x-api-key header or as Authorization: Bearer <key>, not as a query parameter. Don’t retry a 401 with the same key.
Cause: Your account has no remaining credits.Code: insufficient_creditsMessage: Your account has insufficient credits. Please add credits to continue.If your email is not verified yet, the message asks you to verify it first. Adding credit needs a verified email. Verifying and adding a payment method also gets you the free credit described in pricing.Fix: Add credits to your account. If the message asks you to verify your email, open the link in the verification email, then add a payment method or credits. You can send a new verification email from the API Console.
Codes:
  • verification_required: verify your email to continue.
  • email_undeliverable: the account’s email can’t receive mail. Sign up with a valid email.
Fix: Verify your email in the API Console, or sign up with a valid email. Do not retry.
Cause: Too many requests in the current time window.Codes:
  • rate_limited: too many requests per second.
  • unverified_rate_limited: lower limits apply until you verify your email.
  • repeat_query: the same request was sent too many times in a short period.
  • cooling_off: the key is paused briefly after many refused requests.
Fix: Wait for the period specified in the Retry-After header, then retry. See rate limits for monitoring usage.
Cause: A temporary problem on our side, for example while checking your API key. Your key is still valid.Fix: Retry after the number of seconds in the Retry-After header, with backoff.
Cause: An unexpected error on our side.Fix: Retry with exponential backoff. If it persists, contact support.

Handling errors in code

Check the HTTP status code before parsing the response body:

Retry with exponential backoff

For transient errors (429, 500, 503), retry with increasing delays:
Do not retry 400, 401, or 402 errors — these indicate problems that won’t resolve by retrying. Fix the request or account issue first.

Troubleshooting

Next steps

Rate limits

Rate limit headers and monitoring.

Authentication

API key management and security.