> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.scrapingbee.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# What to do if my request fails?

## Check what error code you received.

Our API should always return the reason why your request failed. It will be one of these status [codes](https://www.scrapingbee.com/documentation/#status-code).
If you receive a status code 500, you can double-check the response body to see the exact error code returned by the target website:


![](https://storage.crisp.chat/users/helpdesk/website/-/6/6/a/2/66a2759f2b092c00/image_ag8yv0.png)

# Below are the most common 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](https://meyerweb.com/eric/tools/dencoder/), and click on the encode button.

If you need to do this programmatically, learn [here](/en/article/url-encoding-1w5vas8/?bust=1631717964437) 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)](https://www.scrapingbee.com/documentation#wait)

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, or 10 API credits if JavaScript rendering is disabled. You can read more about this parameter here: [(Premium Proxy - Documentation)](https://www.scrapingbee.com/documentation#premium_proxy)

## 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)](https://www.scrapingbee.com/documentation/#stealth_proxy)

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