Errors
Every error code the Deep Search API returns, with its HTTP status and what to fix before you retry, from a missing key to a spent allowance.
How errors look
A failed call comes back with an HTTP status that fits the problem and this JSON body: { "error": { "code", "message" } }. Branch on code, which stays fixed; message is a readable explanation.
Codes and statuses
| Status | Code | Meaning |
|---|---|---|
400 | invalid_json | The body could not be parsed as JSON. |
400 | invalid_request | The JSON parsed, but a field is missing or has the wrong form. |
401 | missing_api_key | The request arrived without an Authorization: Bearer <key> header. The response body links to where you can get a key. |
401 | invalid_api_key | The API does not recognise this key: it is malformed, unknown or revoked. |
401 | expired_api_key | This key's expiry date has passed. |
402 | not_subscribed | No active plan on this account. The response body links to a subscription page. |
402 | usage_exhausted | Both included usage and extra credits are spent. The response body links to where you can add credits. |
402 | no_coins | Older v1 name for running out of extra credits, kept for compatibility. |
403 | missing_scope | The key works but does not carry the scope this endpoint requires. |
409 | idempotency_conflict | This Idempotency-Key was already used with a different body. |
413 | request_too_large | Over the API's size limit for a JSON body. |
404 | developer_api_disabled | This deployment has the developer API switched off. |
429 | rate_limited | This key or IP address sent too many requests. Wait for the reset, then retry. |
503 | spend_cap_reached | A temporary limit on total service spending was reached. Try again later. |