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 60 seconds to try and get a successful response from the target URL before responding with a
500
error indicating a failed request.Note: To avoid timing out your request before the API has had a chance to complete all retries, remember to set your timeout to 60 seconds.
In cases where a request fails after 60 seconds of retrying, you will not be charged for the unsuccessful request (you are only charged for successful requests,
200
and 404
status codes).Errors will inevitably occur so on your end make sure you catch these errors. You can configure your code to immediately retry the request and in most cases, it will be successful. If a request is consistently failing then check your request to make sure that it is configured correctly. Or, if you are consistently getting bans messages from an anti-bot, then create a ticket with our support team and we will try to bypass this anti-bot for you.
If you receive a successful
200
status code response from the API but the response contains a CAPTCHA, please contact our support team 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 automatically retry the request.Below are the possible status codes you will receive:
Status Code | Details |
---|---|
200 | Successful response |
404 | Page requested does not exist. |
410 | Page requested is no longer available. |
500 | After retrying for 60 seconds, the API was unable to receive a successful response. |
429 | You are sending requests too fast, and exceeding your concurrency limit. |
403 | You have used up all your API credits. |
Last modified 1d ago