Skip to main content

Error envelope

Errors use the same envelope as successful responses. success is false, error is a message for people, and two fields are for your code:
Branch on error_code, not on the wording of error, which can change. retryable tells you whether the same request can succeed later.
  • error_code says what went wrong. Codes are stable: once published, a code keeps its meaning.
  • retryable is true for capacity limits, timeouts and transient failures. It’s false when the problem is the request or the target itself: a bad parameter, a domain that doesn’t exist, a page that returns 404.
Authentication and rate-limit errors are answered before the request is processed. They carry error, error_code and retryable, but no success or meta:

Handling errors

Error codes

Your request

Your account

The target URL

This service

You’re never charged for a failed request.

Errors on crawled pages

A crawl or batch doesn’t fail when one page does. Each page in GET /crawl/{id}, and in crawl.page webhooks, carries ok. A failed page carries an error_code from the same list:
Use it to decide what to try again. TARGET_SERVER_ERROR and TARGET_TIMEOUT often succeed later. DNS_RESOLUTION_FAILED never will.

Blocked URLs

Some URLs are refused before any request is made:
  • Private and reserved addresses, such as 10.x.x.x, 192.168.x.x, 127.x.x.x and 169.254.x.x. This includes domains that resolve to them and redirects that lead to them (URL_NOT_PERMITTED).
  • Bare IP addresses and reserved TLDs, such as .local, .internal and .localhost (INVALID_REQUEST).
  • Your key’s blocklist (URL_BLOCKED).
Still stuck? See Troubleshooting.