WebScrapingAPI Docs
Browser APIGetting started

API Parameters

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

Parameters are being used to customize each request to the API. Understanding how to use these parameters will allow you to reach the full potential of the Browser API and better interact with the targeted URL.

Because Browser API offers high-level customization it will no longer have complete control over the scraping performance, so using this feature means charging 100% of the requests (both successful and failed).

Below is a list of all the parameters available in our API:

Required Parameters

ParameterRequiredTypeDescriptionMore
api_keystringUsed for authentication
urlstring

Specify the URL of the web page you would like to scrape.


IMPORTANT: Please make sure you URL encode the value of this parameter!

Optional Parameters

ParameterRequiredTypeDescriptionMore
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.
countrystringSpecify the 2-letter code of the country you would like to use as a proxy geolocation for your scraping API request. Please refer to the Geolocation section for details.
timeoutint

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 1000.

This will abort the request after 1000ms and throw an error. The maximum (and default) value for this parameter is 120000.

devicestringSet desktop (default), mobile or tablet, depending on whether the device type you want to your for your scraping request.
wait_untilstringSpecify the option you would like to use as conditional for your scraping API request. Possible values are domcontentloaded (default), load, networkidle0 and networkidle2.
wait_forint

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. Possible values for this parameter are in the range [100, 60000].

wait_for_cssstringSpecify a CSS selector and the API will wait timeout seconds until the selector appears. The default value of the timeout is 120000.
window_widthintAdjust the width of the web browser's Viewport.
window_heightintAdjust the height of the web browser's Viewport.
screenshotbooleanSet to 1 to get the scraped website as a screenshot.
screenshot_optionsobject

Of type object , this parameter is used to set the screenshot to return custom window sizing, full page or single CSS selector.


*Can only be used when the parameter screenshot=1 is activated

extract_rulesobjectGet the scraped website based on various extraction rules.
json_responsebooleanHave the API return an 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.
js_instructionsobjectPerform JavaScript instructions before obtaining the scraped website.
block_resourcesstringBlock web browser's resources (i.e. block_resources=media,js)
auto_solvebooleanEnables the automatic Captcha solving.

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