Articles on: API

What to do if my request fails?

Please find below the most commons ways to fix your API call.

Check that your URL is correctly encoded.



Most of the errors you will encounter will be because you haven't correctly encoded your URL.

To do this quickly you can go on this website, and click on the encode button.

If you need to do this programmatically, learn here how to do it.

Disable block_resources.



To speed up your request, we block the downloading of images and css by default. Sometimes this break some websites. You can disable this behaviour by using block_resources=False

This can only change something when using render_js=True.

Wait for the JavaScript to render



Some websites use a lot of JavaScript, for those websites, you will have to use the wait parameter with the number of milliseconds you want to wait. (documentation)

Example: wait=2000 if you want to wait 2 seconds or 2000 milliseconds

Use premium proxy



For very difficult websites, you should use the premium_proxy=True parameter. Every call using premium proxies will cost 25 API credits if you use JavaScript rendering, 5 API credits if you don't. (documentation)

Use stealth proxy



For some websites, even premium proxy won't be enough. For those, we have a special pool of proxies that are a bit slower and expensive but good enough to bypass them. To enable this pool, use stealth_proxy=True. API call using this parameter will cost 75 credits and only works with JS rendering enabled. (documentation)

If you still have some problems, do not hesitate to reach out to us in the chat.

Updated on: 03/06/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!