Session Parameters

Session Parameters are shared between the:

  • New Session

  • Scrape

  • Crawl

  • Extract

  • Agent Tasks

This is a comprehensive list and description of all parameters available when setting up a session.

Proxy Usage and CAPTCHA solving require being on a PAID plan.

Enabling Stealth Mode with useStealth

  • Type: boolean

  • Description: When set to true, the session will be launched in stealth mode, which employs various techniques to make the browser harder to detect as an automated tool.

  • Default: false

Using a Proxy with useProxy

  • Type: boolean

  • Description: When set to true, the session will be launched with a proxy server.

  • Default: false

Specifying a Custom Proxy Server with proxyServer

  • Type: string

  • Description: The hostname or IP address of the proxy server to use for the session. This option is only used when useProxy is set to true.

  • Default: undefined

Providing Proxy Server Authentication with proxyServerUsername and proxyServerPassword

  • Type: string

  • Description: The username and password to use for authenticating with the proxy server, if required. These options are only used when useProxy is set to true and the proxy server requires authentication.

  • Default: undefined

Selecting a Proxy Location Country with proxyCountry

  • Type: string

  • Enum: ["US", "GB", "CA", ...]

  • Description: The country where the proxy server should be located.

  • Default: "US"

Specifying Operating Systems with operatingSystems

  • Type: array

  • Items: string

  • Enum: ["windows", "android", "macos", "linux", "ios"]

  • Description: An array of operating systems to use for fingerprinting.

  • Default: undefined

Choosing Device Types with device

  • Type: array

  • Items: string

  • Enum: ["desktop", "mobile"]

  • Description: An array of device types to use for fingerprinting.

  • Default: undefined

Selecting Browser Platforms with platform

  • Type: array

  • Items: string

  • Enum: ["chrome", "firefox", "safari", "edge"]

  • Description: An array of browser platforms to use for fingerprinting.

  • Default: undefined

Setting Browser Locales with locales

  • Type: array

  • Items: string

  • Enum: ["en", "es", "fr", ...]

  • Description: An array of browser locales to specify the language for the browser.

  • Default: ["en"]

Customizing Screen Resolution with screen

  • Type: object

  • Properties:

    • width (number, default 1280): The screen width in pixels.

    • height (number, default 720): The screen height in pixels.

  • Description: An object specifying the screen resolution to emulate in the session.

Solving CAPTCHAs Automatically with solveCaptchas

  • Type: boolean

  • Description: When set to true, the session will attempt to automatically solve any CAPTCHAs encountered during the session.

  • Default: false

Blocking Ads with adblock

  • Type: boolean

  • Description: When set to true, the session will attempt to block ads and other unwanted content during the session.

  • Default: false

Blocking Trackers with trackers

  • Type: boolean

  • Description: When set to true, the session will attempt to block web trackers and other privacy-invasive technologies during the session.

  • Default: false

Blocking Annoyances with annoyances

  • Type: boolean

  • Description: When set to true, the session will attempt to block common annoyances like pop-ups, overlays, and other disruptive elements during the session.

  • Default: false

Automatically accepting cookies with acceptCookies

  • Type: boolean

  • Description: When set to true, the session will attempt to accept all cookies on sites that are visited.

  • Default: false

Enabling web recording with enableWebRecording

  • Type: boolean

  • Description: When set to true, the session will be recorded using rrweb.

  • Default: true

Reuse browser state(cookies, local storage, etc.) across sessions with profile

  • Type: object

  • Properties:

    • id

      • Type: string

      • Description: ID of the profile to use for the browser session.

    • persistChanges

      • Type: boolean

      • Description: When set to true, changes will be persisted to this profile on session close.

  • Description: An object specifying the profile configuration.

Last updated