API Status Codes

The API will return a specific status code after every request depending on whether the request was successful, failed or some other error occurred. ScraperAPI will retry failed requests for up to 70 seconds to try and get a successful response from the target URL before responding with a 500 error indicating a failed request.

triangle-exclamation

If a request fails after 70 seconds of retrying, you will not be charged for it (you are only charged for successful requests, 200 and 404 status codes).

Errors can occasionally occur, so it's important to ensure your code handles them appropriately. Configuring your system to retry failed requests often leads to success. If you find that a request is persistently failing, double-check your request configuration to ensure it’s correct. If you’re repeatedly encountering anti-bot bans, please contact our support teamarrow-up-right and they will try to find a solution to bypass the restrictions.

If you receive a successful 200 status code response from the API but the response contains a CAPTCHA, please contact our support teamarrow-up-right and they will add it to our CAPTCHA detection database. Once included in our CAPTCHA database, the API will treat it as a ban in the future and will automatically retry the request.

Below are some of the possible status codes you are likely to encounter:

circle-check

Last updated