WebScrapingAPI Docs
Web Scraping APIGetting started

API Parameters

Discover the full power of WebScrapingAPI by passing advanced parameters to your requests.

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

ParameterRequiredTypeDescriptionMore
api_key✅stringUsed for authentication
url✅stringSpecify 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

ParameterTypeDescriptionMore
methodstringHTTP method used for the target request. Accepted values are GET, POST, PUT, and PATCH.
bodystringRequest body sent to the target URL when using a method that supports a payload.
render_jsbooleanSet to 0 (off, default) or 1 (on) depending on whether or not to render JavaScript on the target web page. JavaScript rendering is done by using a browser.
countrystringSpecify the 2-letter code of the country you would like to use as a proxy geolocation for your scraping API request.
statestringSpecify a state code when targeting a city in us or au. The country parameter is required and must be set to us or au.
citystringSpecify the city you would like the request to originate from. The country is required in this case.
asnstringSet the ASN (Autonomous System Number) of the network you want your proxy to be from.
timeoutintSpecify 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 1000.
This will abort the request after 1000ms. The maximum value for this parameter is 120000. The default value for this parameter is also 120000.
extract_rulesobjectGet the scraped website based on various extraction rules.
json_responsebooleanHave the API return a JSON object instead of the plain HTML scraped from the URL.
json_dombooleanGet the scraped website in JSON format. It can be set to 0 (default) or 1.
asyncbooleanSet to true to queue the scrape and retrieve the finished result later.
snapshot_idstringRetrieve a previously queued async scrape. Use this instead of url.

For boolean parameters, you can provide values in multiple formats. If the parameter is set to '0' or 'false', it will be treated as false, meaning the feature will be disabled or set to off. If you send '1' or 'true', the parameter will be interpreted as true, enabling or turning on the feature. The system recognizes both numeric and string representations of boolean values for flexibility in different use cases.

On this page