Errors

The error format, the HTTP status codes and all error codes of the API.

Error format

Every error has a JSON body with a code and a detail:

{ "code": "INVALID_API_KEY", "detail": "Invalid API key" }
  • code is a stable value in upper case. Use it in your code to select an action.
  • detail is a text for people. It can change. Do not parse it.

Some errors add more fields:

CodeMore fields
INSUFFICIENT_FUNDScurrency, missing_topup: the top-up that permits the approval.
MONTHLY_LIMIT_REACHEDcurrency, monthly_limit: the monthly spend limit of the customer.
ESTIMATE_CHANGEDestimate: the new quote of the job.

Validation errors

If the request has a wrong field type, or a required field is missing, the API answers 422 with the code VALIDATION_ERROR. Then detail is a list, with one item for each error:

{
  "code": "VALIDATION_ERROR",
  "detail": [
    {
      "type": "missing",
      "loc": ["query", "project_id"],
      "msg": "Field required",
      "input": null
    }
  ]
}

loc shows where the error is: the part of the request (body, query or path), then the field.

If the body is not valid JSON, the error has the type json_invalid. If the API cannot read the body at all, for example because it is not UTF-8, the API answers 400 with the code INVALID_BODY.

HTTP status codes

StatusMeaning
200 OKThe request is complete. A create request also answers 200 when it returns an existing job instead of a new one.
201 CreatedThe API created a new resource.
204 No ContentThe API removed the resource. There is no body.
302 FoundA redirect to a download URL.
400 Bad RequestThe values in the request are not correct.
401 UnauthorizedThe API key is missing, unknown or revoked.
402 Payment RequiredThe credit is too low.
403 ForbiddenYour role does not permit the action, or a limit stops it.
404 Not FoundThe resource does not exist, or you cannot access it.
409 ConflictThe current state of a job or a website does not permit the action.
422 Unprocessable ContentThe request does not agree with the schema.
502 Bad GatewayThe payment or the invoicing provider has a problem. Try again later.
503 Service UnavailableBilling or file downloads are temporarily not available. Try again later.

Error codes

Authentication and access

StatusCodeCauseWhat to do
401NOT_AUTHENTICATEDThe request has no API key.Send the key in the Authorization header.
401INVALID_API_KEYThe key is unknown or revoked.Use a valid key.
401USER_NOT_FOUNDThe user of the key does not exist any more.Create a new key.
403INSUFFICIENT_SCOPEA key for one project (PROJECT scope) is used on an account, customer or billing endpoint.Use a key with the USER scope. See Key scopes.
403INSUFFICIENT_ROLEYour role in the customer or in the project does not permit the action.Ask an administrator for a role. See Roles.
403PROJECT_ACCESS_DENIEDYou have no role in the project.Ask an administrator of the project.
403PROJECT_DISABLEDThe project of a PROJECT key is stopped.Contact DeepScout.
403MANAGED_CUSTOMERDeepScout manages this customer, so self-service actions are not available.Contact your account manager.
403EXPORTS_NOT_ENABLEDThe project has no exports.Contact DeepScout.

Not found

StatusCodeCause
404PROJECT_NOT_FOUNDThe project does not exist, or you cannot access it.
404WEBSITE_NOT_FOUNDThe website is not in the project. For a matching: the website has no completed scrape in the project.
404JOB_NOT_FOUNDThe job does not exist, or it is in a project that you cannot access.
404CUSTOMER_NOT_FOUNDThe customer does not exist. For most customer endpoints, an unknown customer gets 403 INSUFFICIENT_ROLE instead.
404API_KEY_NOT_FOUNDThe key does not exist, or it is not your key.
404INVOICE_NOT_FOUNDThe invoice does not exist.
404TOPUP_NOT_FOUNDThe top-up session does not exist.
404DATASET_NOT_FOUNDThe project has no such dataset, or the dataset has no files for one website.
404EXPORT_FILE_NOT_FOUNDThe export file is not written yet.
404SAMPLE_NOT_FOUNDThe sample of the website is not ready yet.
404URL_RESULTS_NOT_FOUNDThe URL scrape has no URL results yet. They are available after the settlement of the job. See Scrape a URL list.
404NOT_FOUNDThe URL does not exist.

Request values

StatusCodeCause
400INVALID_WEBSITE_URLThe website URL is not valid.
400INVALID_LOCALEThe country is not a two-letter country code, or the currency is not an ISO 4217 code.
400INVALID_URL_LISTThe API accepted no URL of the list, or the list is too large. Split a large list into more jobs.
400INVALID_MATCHING_SCOPEThe matching websites are not correct, for example the reference website is also a competitor.
400INVALID_TOPUP_AMOUNTThe top-up amount is not from 5 to 5,000 EUR.
400PROJECT_ID_REQUIREDThe export download needs project_id with a USER key.
400PROJECT_LIMIT_REACHEDThe customer has 50 projects.
400JOB_NOT_APPROVABLEThe job cannot be approved, for example it has no quote.
422VALIDATION_ERRORThe request does not agree with the schema.
400INVALID_BODYThe API cannot read the body, for example because it is not UTF-8. Send JSON in UTF-8.
405METHOD_NOT_ALLOWEDThe endpoint does not accept this HTTP method.

Credit and limits

StatusCodeCauseWhat to do
402INSUFFICIENT_FUNDSThe spendable credit is less than the cap of the job, or less than the price of a paid website analysis.Top up at least missing_topup (and at least 5 EUR), then send the request again.
403MONTHLY_LIMIT_REACHEDThe job does not fit in the monthly spend limit.Wait until running jobs settle or the next month starts, or contact DeepScout. A top-up does not help.

Job and website state

StatusCodeCauseWhat to do
409ESTIMATE_CHANGEDThe price went up since the quote.Read the new estimate. If you accept it, approve again.
409CATALOG_EXPIREDThe full catalog of the website is older than 31 days.Run a full scrape, or create the URL scrape with urls_only. See Scrape a URL list.
409CATALOG_DELIVEREDYour project already got the newest full scrape of the website, and that scrape ended less than 18 hours ago.Use the current data.
409JOB_NOT_AWAITING_APPROVALThe job is not a quote any more. For a full scrape: another full or URLS_ONLY scrape of the website runs in the project.Read the job. Wait for the other scrape to end.
409JOB_NOT_CANCELLABLEThe job is approved, settling or finished, or it is a free matching sample.None. An approved job runs to its end.
409JOB_RUNNINGThe setup job runs, so you cannot remove it.Wait for it to end, or cancel it.
409SETUP_JOB_HAS_WEBSITEThe setup job found its website.Remove the website instead.
409WEBSITE_BUSYA job of the website runs, so you cannot remove the website.Wait for the job to end.
409MATCHING_BUSYAnother matching of the project is not finished. This includes a quote that waits for approval.Wait, or cancel the quote.
409MATCHING_SAMPLE_USEDThe project already used its free matching sample.Run a paid matching.
409CONTACT_REASON_MISMATCHThe job did not fail, or the reason is not its contact_reason.Send the contact_reason of the failed job.

Server and providers

StatusCodeCause
502STRIPE_ERRORThe payment provider has a problem.
502ACCOUNTING_ERRORThe invoicing system has a problem.
503BILLING_UNAVAILABLEBilling is temporarily not available.
503MAINTENANCEFile downloads are temporarily not available.
500INTERNAL_ERRORAn unexpected error.

If you get a 5xx status, try again after some time. Increase the wait after each try.

Other errors

StatusCodeCause
AnyHTTP_ERRORAn error that has no code of its own. Read the status and the detail.

Codes of the console sign-in

The ErrorCode list in the OpenAPI specification also has codes of the console sign-in, for example SESSION_EXPIRED. The API endpoints in these docs do not return them.

On this page