API Parameters
Discover the full power of WebScrapingAPI by passing advanced parameters to your requests.
Parameters are being used to customise each request to the API. Understanding how to use these parameters will allow you to reach the full potential of the WebScrapingAPI and better interact with the targeted URL.
Below is a list of all the parameters available in our API:
#1: Required Parameters
Parameter | Type | Description | More |
---|---|---|---|
|
| authenticate | |
|
| Specify the URL of the web page you would like to scrape. IMPORTANT: Please make sure you URL encode the value of this parameter! |
#2: Optional Parameters
Parameter | Type | Description | More | Default Value |
---|---|---|---|---|
|
| Set to | The default value for render_js will be decided based on your plan. If your plan supports javascript rendering then the default value will be true. Otherwise the default value will be false. | |
|
| Set to Please note that a single | The default value for proxy_type will be decided based on your plan. If your plan supports residential proxies then the default value will be residential. Otherwise the default value will be datacenter. | |
|
| Set to | ||
|
| Specify the 2-letter code of the country you would like to use as a proxy geolocation for your scraping API request. Supported countries differ by proxy type, please refer to the Proxy Locations section for details. | ||
|
| Specify the maximum timeout in milliseconds you would like to use for your scraping API request. In order to force a timeout, you can specify a number such as This will abort the request after 1000ms and return whatever HTML response was obtained until this point in time. The maximum value for this parameter is | ||
|
| Set | ||
|
| Specify the option you would like to use as conditional for your scraping API request. *Can only be used when the parameter | ||
|
| Some websites may use javascript frameworks that may require a few extra seconds to load their content. This parameters specifies the time in milliseconds to wait for the website. Recommended values are in the interval *Can only be used when the parameter | ||
|
| Specify a CSS selector and the API will wait 10 seconds (the default value of the *Can only be used when the parameter | ||
|
| Adjust the width of the web browser's Viewport.
*Can only be used when the parameter | ||
|
| Adjust the height of the web browser's Viewport.
*Can only be used when the parameter | ||
|
| Set to *Can only be used when the parameter | ||
|
| Of type
*Can only be used when the parameter | ||
|
| Get the scraped website based on various extraction rules. | ||
|
| Have the API return an JSON object instead of the plain HTML scraped from the URL. | ||
|
| Get the scraped website in JSON format. It can be set to | ||
|
| Perform JavaScript instructions before obtaining the scraped website. | ||
|
| Disable the stealth plugin which is enabled by webscrapingapi by default. It can be set to *Can only be used when the parameter | ||
|
| Block web browser's resources (i.e. | ||
|
| Block ads in headless mode. By default WebScrapingAPI renders and returns ads inside the response.
It can be set to | ||
|
| Block trackers in headless mode. By default WebScrapingAPI does not block trackers.
It can be set to | ||
|
| Set depending on whether or not to use the same proxy address to your request. | ||
|
| Specify whether or not to keep the original request headers in order to pass through custom headers. In order to only use the headers that are specified, set the parameter | ||
|
| Reetrieve the unaltered HTML from the server, before JavaScript rendering.
*Can only be used when the parameter | ||
|
| Add custom cookies to your request.
*It only works when the parameter |
Last updated