Errors and retries

Every error code, what it means and whether a retry can help.

The error object

A failure is one JSON object with success: false and an error you can branch on.

0 credits
{
  "success": false,
  "request_id": "req_41e813f088955c316776",
  "error": {
    "code": "BLOCKED",
    "message": "The site's bot protection (Akamai) refused access.",
    "retryable": true,
    "doc_url": "https://docs.crawlapi.dev/errors#BLOCKED",
    "target_status": 403,
    "vendor": "akamai"
  }
}

A real answer, recorded 2026-11-11.

Field Meaning
code the reason code, one of the table below
message one to three sentences for a human or an agent; at most 220 characters
retryable the same request may succeed later; wait for Retry-After first when it is sent
doc_url this code’s row in the table below: what it means and what to do
target_status the HTTP status the site answered with, when it answered
vendor the bot protection that refused the page, when known

request_id is also in the x-request-id header: quote it in a support ticket.

Every code

Show codes

Error codes with their HTTP status, retry rule, meaning and what to do
CodeHTTPRetryableWhat it means, what to do
INVALID_REQUEST400no

The request could not be read: a missing or unknown field, a value out of range, a body over 64 KiB. A wrong route answers it with HTTP 404, a wrong method with 405.

Fix what the message names, then send it again: POST /v1/scrape with a JSON body of url, format and timeout.

UNSAFE_URL400no

Not a public http(s) address: a bad scheme, credentials in the URL, an unparsable URL, a private network's name (.local, .internal), a private or reserved address, or a port browsers refuse.

Send a public http or https URL on one of the ports 80, 443, 8080, 8443, with no user name or password in it.

UNAUTHORIZED401no

The API key is missing, unknown, revoked, or belongs to a suspended account, or the request sent two different keys.

Send a valid key as Authorization: Bearer or x-api-key; keys are at https://app.crawlapi.dev/keys.

INSUFFICIENT_CREDITS402no

The balance cannot cover the level this page needs.

Buy credits at https://app.crawlapi.dev/billing, then send the same request again.

RATE_LIMITED429yes

Too many requests at once or per minute, or no capacity to start this one before its deadline. Retry-After says when to retry.

Wait the seconds in Retry-After, then send it again; the RateLimit header says how many requests can start and run.

HOST_NOT_FOUND422no

The domain name does not resolve.

Check the domain for a typo; a retry of the same URL gets the same answer.

NOT_FOUND404no

The site says the page does not exist, including a "not found" page served with HTTP 200.

Check the URL; a retry gets the same answer, and the answer costs nothing.

GONE410no

The site says the page is gone.

Drop the URL: the site removed the page, and the answer costs nothing.

LOGIN_REQUIRED422no

The page needs a signed-in account and holds no text to return, or the document is password-protected.

Use a public page: the service never signs in. A sign-in wall with text of its own is a success with metadata.login_required, not this code.

UNSUPPORTED_CONTENT422no

The URL serves content the service cannot read: neither HTML nor a readable document (an image, an archive, or a broken or over-limit file).

Use another URL: only HTML and documents (PDF, Office, OpenDocument, EPUB, RTF, CSV, JSON and feeds) can be read.

SCANNED_PDF422no

Most pages of this PDF are scanned images; OCR is not offered.

Use a PDF with a text layer, or one you have run OCR on.

BLOCKED422yes

The site's bot protection refused access, or the site asks crawlers to pay for access.

Retry later, 2 or 3 times at most, while retryable is true; a site that asks crawlers to pay answers retryable false and stays blocked.

NO_CONTENT422yes

No usable content: a bot check left the page empty, the page held too little text, or format=json found no records.

With format=json, ask for format=markdown; otherwise retry later while retryable is true.

TARGET_ERROR422yes

The site failed on its side: a 5xx, a reset or TLS failure, a malformed reply, or a page too large to process.

Retry later while retryable is true, since the site may recover; a page nested too deeply, or with a tag holding too many attributes or a list too many options, answers retryable false.

TIMEOUT408yes

The request ran out of time.

Send a longer timeout, up to 60000 ms, or retry later.

ENGINE_FAILED500yes

A failure on our side: the browser, the extraction process, or a network this page needed.

Retry the same request: the failure was ours, and nothing was charged.

INTERNAL500yes

A bug or a database failure on our side. The message carries the request id; nothing was charged.

Retry, after Retry-After when it is sent; if it repeats, send the request_id to support.

How to retry

  • retryable: true: wait, then retry the same request, after Retry-After when sent, otherwise back off from 1 second and stop after 2 or 3 tries.
  • 429 RATE_LIMITED: Retry-After is the time until the account has room again, and the RateLimit headers say how much. Retrying sooner spends a request and learns nothing.
  • 500 INTERNAL: our side, and nothing was charged. Retry; if it repeats, send the request_id to support.
  • retryable: false: the request or the page cannot change. Read the flag on the answer, not the code’s column above: a site that asks crawlers to pay is BLOCKED with retryable: false, and so is a NO_CONTENT the page itself decided, a page or document with no structured data for format=json or a document under 15 words.

Not every 422 is the same

Branch on code, not on status

Seven codes share HTTP 422 because the request was valid and the page could not be turned into content: BLOCKED, NO_CONTENT, HOST_NOT_FOUND, LOGIN_REQUIRED, UNSUPPORTED_CONTENT, SCANNED_PDF and TARGET_ERROR. No page failure answers 403 or 415: those statuses are about the caller’s key and body, and a page’s sign-in wall or file type is neither.

Credits

A failure costs 0 credits and writes no charge, including a page that does not exist (NOT_FOUND, GONE), RATE_LIMITED, BLOCKED, TIMEOUT, INTERNAL and a page that could not be read. See Credits.

esc
↑↓navigate↵openescclose
Dashboard
Get API key