API documentation · 9 of 9

Errors and limits

Every failed request answers with the same shape, so one piece of code can handle them all.

{
  "error": {
    "code": "project_not_found",
    "message": "No project with that id."
  }
}

Match on code. The message is for a person reading a log and may be reworded.

Error codes

StatusCodeMeaning
400invalid_bodyThe body is not JSON, has a field the endpoint does not take, or one of the wrong type.
400invalid_urlThe url is not an http or https address.
400invalid_user_agentThe user_agent is blank.
400credentials_requiredA basic_auth project was crawled without a username.
400invalid_project_id, invalid_page_idAn id in the path is not a number.
400invalid_tabThe tab is not one a page has.
400invalid_pageThe page asked for is past the last one.
401missing_credentialsNo bearer token was sent.
401invalid_credentialsThe key is unknown, malformed or revoked.
403insufficient_scopeThe key lacks the write scope.
404project_not_foundNo such project among yours.
404no_crawlThe project has no finished crawl with pages yet.
404page_not_foundNo page with that id in the latest crawl.
409project_existsYou already have a project for that URL. On create, Location points at it.
409crawl_in_progressThe project is already being crawled.
400invalid_ruleA custom rule is missing something or its pattern does not compile; the message says which.
400rule_limitThe project already has 25 custom rules of that kind.
404rule_not_foundNo custom rule with that id in the project.
413body_too_largeThe body is over 64 KB.
500project_not_saved, crawl_not_startedSomething failed on the server. Try again, then check the server log.

Rate limits

Requests are counted per address, not per key: up to 60 a second in general, and 5 crawl starts a minute. Over the limit you get 429 Too Many Requests with a Retry-After header saying how many seconds to wait.

Pagination

Lists that page take ?page=, counting from 1, and answer with a pager. A value that is not a positive number is read as 1; a page past the end answers 400 invalid_page.

"pager": { "page": 2, "total_pages": 9 }