Skip to content
Documentation

Errors

The format of errors, all codes and what to do about them.

Every error has the same format and a matching HTTP status:

{
  "error": {
    "code": "no_tokens",
    "message": "You have no tokens left today. They renew at midnight UTC."
  }
}

In your program check code. It does not change, and message may.

Access

StatusCodeMeaning
401unauthorizedThe API key is missing, wrong or revoked
403forbiddenYour role in the team does not allow this

Request

StatusCodeMeaning
422invalid_requestA field or parameter is missing or wrong, message says which one
422invalid_filterA filter has a wrong field, operator or value
422invalid_selectorThe CSS selector is not valid
404not_foundThere is no such result in your team
409crawl_not_readyThe crawl has no results yet
409retry_in_progressPages of this crawl are already being retried

Limits

StatusCodeWhat to do
429rate_limitedWait the number of seconds from Retry-After
429no_tokensWait until midnight UTC, Retry-After says how many seconds
429too_many_crawlsWait for one of 3 crawls to end, or stop it

Page could not be fetched

A token is returned in all these cases.

StatusCodeMeaning
422invalid_urlThis is not a valid http or https address
422url_not_allowedA private or local address, or a port other than 80 and 443
422dns_errorThe domain was not found
422too_many_redirectsThe page redirects more than 10 times
422unsupported_contentThe page uses an unsupported content encoding
502fetch_failedThe server refused or dropped the connection
504timeoutThe page did not respond in 20 seconds

In a crawl the same codes are in the error field of a page. A crawl that failed has a code in its own error field, where two more are possible: robots_blocked, when robots.txt does not allow the start page, and sitemap_not_found.

On our side

Repeat the request after a moment.

StatusCodeMeaning
503busyThe service is at capacity
503scraper_unavailableThe scraper does not respond
503unavailableThe service is temporarily unavailable
500internal_errorAn unexpected error