Skip to main content

Introduction

Controlling browser parameters allows you to simulate various user environments and conditions. This page outlines how to control different browser parameters such as locale code, window dimensions, dark mode, device type (desktop/mobile), and options for blocking ads and images.

Locale code

Locale code refers to the language settings of the browser. To control the locale code you need to set locale_code:
"locale_code": "en-us"
Combined with proxies from a specific country (set by proxy_type and proxy_country) defining a locale_code optimises the appearance of the browser in the “website eyes” and makes it look like a real user. Check proxies documentation.

Device type

Some websites are easier to scrape if a device type is mobile instead of desktop. Besides, you might need to get a source code or a screenshot of a mobile layout. To switch between desktop and mobile you need to set device:
"device": "desktop"  //  default
------
"device": "mobile

Window Size

Controlling the window dimensions is possible using window_width and window_height :
"window_width": 1920,
"window_height": 1080
FieldMin valueMax valueDefault
window_width10051201920
window_height10028801080

Dark mode

You can enable the dark mode of the browser by setting dark_mode = true . Default is false. This affects the websites that have light/dark themes.

Blocking ads

The browser will install an ad blocking extension and will try to block ads from loading if you set block_ads = true. Default is false.

Blocking images

If you don’t need to load the images, you can set block_images = true . Default is false . Disabling images from loading generally speeds up the response from ScrapexLabs API, as the browsers are always waiting for a page to fully load.