The API will return a specific status code after every request depending on whether the request was successful, failed or some other error occurred.
To avoid timing out your request remember to set your timeout to 300 seconds.
In cases where a request fails after 300 seconds, you will not be charged for the unsuccessful request. You are only charged for successful requests. We are considering successful requests that have 200 status code & status: "ok" in the response JSON.
A successful request means we reached the target site and got a definitive answer from it. An empty answer is still an answer: a search that matches nothing comes back as a 200 with an empty result set. When the target reports that the requested item does not exist, such as an account, a listing or a page nobody has, the response is also a 200 with status: "ok". Its body then carries requestMetadata and an error message describing the reason, and no data object. Treat an error together with a missing data object as “this item does not exist” and do not retry. Both kinds of request are charged, because the scrape itself succeeded.
Status Codes
Handling Occasional Errors
In rare cases (1–2% of requests), especially on harder-to-scrape websites, a request might fail due to temporary issues on the target site.
- Automatic Retry: Set up your code to retry failed requests. Most of the time, a retry will succeed.
- Consistent Failures: If a request keeps failing, double-check your parameters and request structure.
- Persistent Failures: If requests to a particular target keep failing, open a support ticket and we’ll investigate.
These situations are uncommon, but it’s a good idea to handle errors gracefully to ensure smooth data collection.