API Errors

Introduction

If you want to port those definitions into your application, you can checkout the Exportable Definition section to retrieve the JSON describing errors.

Generic API Error

Example of API error response :

{
    status: "error",
    http_code: 401,
    reason: "Unauthorized",
    error_id: "301e2d9e-b4f5-4289-85ea-e452143338df",
    message: "Invalid API key"
}

HTTP 400

Bad Request: Parameters sent to the API are incorrect. Check out the related documentation to figure out the error.

HTTP 404

Not Found: API URL might have a typo or be incorrect. Check out the related documentation to figure out the error.

HTTP 422

Unprocessable Entity: Your request was correct, but for some reason, we cannot handle it. Most of the time, the entity which you want to update/delete has already been processed.

HTTP 429

Too Many Request: API endpoint, which should be called with a high frequency, are throttled internally to prevent service disruption. If this happened too many times, your account would be suspended.

HTTP 500

Internal Server Error: Scrapfly is in trouble, and we have been alerted of the issue.

HTTP 502

Web service that exposes Scrapfly to the internet is in trouble, and we have been alerted of the issue.

HTTP 503

Service Temporary Unavailable: Scrapfly might run in degraded mode, or maintenance was scheduled to upgrade our service.

HTTP 504

Scrapfly is not reachable or takes too much time to respond.

Screenshot API Errors

Scrapfly provides API errors in two locations - in the response body and the response headers:

The error details are also present in the response x-scrapfly-reject-* headers.

Error Definitions

Only content type text/html is supported for screenshot


For some reason we were unable to take the screenshot


Exportable Definition

If you want to handle errors from your application without copy-pasting the whole error definition into your application to match errors, here is a portable JSON of error definition:

Summary