Errors
Native paths return errors in one shape, the error object of the model API plus a top-level request_id, so OpenAI SDK error handling keeps working.
{
"error": {
"code": "fetch_failed",
"message": "The page could not be read. (request id: 20261128120008123456789a1b2c3d4Kx7Qm2Ph)",
"type": "invalid_request_error",
"param": "url"
},
"request_id": "20261128120008123456789a1b2c3d4Kx7Qm2Ph"
}| Field | Meaning |
|---|---|
error.code | Stable machine-readable code. Branch on the HTTP status first, then on this code. |
error.message | For people. It is English, ends with the request ID, and can change. |
error.type | invalid_request_error (most 4xx), authentication_error (401), permission_error (403), rate_limit_error (429), server_error (5xx). |
error.param | The field, header or query parameter at fault, with its full path, when there is one. |
error.detail | Optional facts for the code, such as retry_after_seconds and limit of a rate limit. |
request_id | Same as the X-Request-Id header. |
Compatibility paths add message and statusCode at the top level. The MCP server returns tool errors as tool results with isError: true and the same code.
Codes
No error is charged. The table below is in English only.
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A field, header or query parameter is missing, malformed, out of range, or conflicts with another; a duplicate JSON key; an unknown field on a native path. param names it. |
| 400 | invalid_url | A URL is not http(s), is malformed, points to a private, loopback or reserved address, or to a non-standard port. |
| 400 | invalid_schema | A JSON Schema of extract breaks its rules. param is the JSON pointer. |
| 400 | invalid_image | lens could not load or decode the image, or it is too large. |
| 401 | invalid_token | The key is missing, unknown, disabled, expired or exhausted. Message Invalid token. |
| 402 | insufficient_user_quota | The balance does not cover the maximum price of the call, or the max_cost_usd of a job. |
| 403 | pre_consume_token_quota_failed | The spending limit of the key is used up. |
| 403 | access_denied | The key has an IP allowlist and the caller is not on it. |
| 403 | web_not_allowed | The key may not use the Web API (a key restriction set by the account). |
| 404 | not_found | Unknown or expired job, place_id or page_token. |
| 404 | invalid_endpoint | Unknown path under /v1/web. |
| 405 | method_not_allowed | Wrong method on a known path. |
| 409 | idempotency_conflict | Idempotency-Key reused with a different request. |
| 409 | request_in_progress | A create with this Idempotency-Key is still running. Has Retry-After. |
| 413 | read_request_body_failed | The request body is over the size limit; the message states the limit. |
| 415 | unsupported_content | The page or file is of a type that is not read: video, archive, executable or unknown binary. |
| 422 | fetch_failed | The page could not be read: DNS failure, connection refused, TLS failure, the site answered 4xx or 5xx, an empty body, or more than 10 redirects. |
| 422 | site_refused | The robots.txt of the site does not allow automated agents to read this URL, or the site declined the request. |
| 422 | page_too_large | The page or file is larger than the read limit and could not be read even in part. |
| 422 | extraction_failed | extract could not produce data that validates, or a required value is not in the pages. |
| 429 | rate_limited | The key or account is over its rate limit. Has Retry-After and the X-RateLimit-* headers. |
| 429 | concurrency_limited | Too many calls or jobs of this key at the same time. Has Retry-After: 1. |
| 429 | api_key_temporarily_frozen | The key is paused for a while after too many invalid requests. Has Retry-After. |
| 500 | internal_error | Something failed on our side. Retry; with Idempotency-Key a create retry is safe. |
| 501 | api_not_implemented | The endpoint, type, option or compatibility path has not shipped yet. |
| 503 | source_unavailable | No source could answer in time. Has Retry-After. |
| 503 | web_api_disabled | The Web API or this endpoint is switched off for the moment, or no price is set for it. |
| 503 | billing_busy | The charge could not be prepared for a moment. Has Retry-After: 1. |
| 503 | token_cache_busy | The key check is busy for a moment. Has Retry-After: 1. |
| 504 | timeout | Nothing complete before the deadline of the call (timeout_ms or the endpoint maximum). |
Warnings
Warnings are not errors. A 200 response can carry warnings, a list of objects with a code.
| Code | When |
|---|---|
no_results | The call ran and found nothing. Not charged. |
content_partial | Fewer content pages were read than asked. Only the pages delivered are charged. |
partial | Some parts of the call could not be delivered. Only the delivered parts are charged. |
all_failed | No part of the call could be delivered. Nothing is charged. |
reach_reduced | The call ran without the extra attempts for pages and searches that are hard to reach. |
reach_reduced appears when the recent calls of an account needed more work than they were charged for, for example after many pages that could not be read. Such a call is answered as usual, but pages and searches that are hard to reach are not retried the more costly way. Full reach comes back with each charged call and refills on its own over a day. GET /v1/web/status with your key shows the current state in key.reach.
Job failures (research, crawl, asynchronous batch) are reported in the error of the job with the same codes, plus budget_exhausted and job_expired. A job that ran out of budget ends succeeded with stop_reason: "budget".
When to retry
| Response | Retry |
|---|---|
429 | Yes, after Retry-After. |
500, 503, 504 | Yes, with exponential backoff and jitter, capped. For 504, a larger timeout_ms or fewer content.pages can help. |
409 request_in_progress | Yes, after Retry-After, with the same Idempotency-Key and body. |
422 fetch_failed | Maybe later. The site itself can be down for a while. |
422 site_refused | No. Repeating it returns the same result. |
Other 4xx | No. Fix the request first. |