Skip to main content
POST
browser.session.create-advanced

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string
required

Required: this capability has an external effect.

Maximum string length: 255
Pramaan-Max-Price-Micro
string

Optional. The most this request may be priced at, in micro-USD (a whole number above 0). It replaces the capability's own price ceiling for this request, lower or higher. Sources that could cost more are left out; when none is left the answer is 400 with the lowest limit that would work.

Pattern: ^[1-9]\d{0,14}$

Body

application/json
ttlSeconds
integer
default:300

How long the session stays alive, 60 to 21600 seconds. The whole time is billed at create, rounded up to the minute. Above 900 needs long sessions to be enabled for the account. Default 300.

Required range: 60 <= x <= 21600
region
enum<string>

Where the browser runs. Default: the nearest.

Available options:
us-west,
us-east,
eu-central,
asia-southeast
viewport
object

Window size. Not available with verified.

proxy
object

Browse through a proxy in this place. Needs proxies to be enabled for the account.

customProxy
object

Browse through your own proxy instead. No proxy data is billed.

verified
boolean
default:false

Use a verified browser that sites trust more. Adds a fixed fee. Needs verified browsers to be enabled for the account.

os
enum<string>

Operating system the browser presents. Only with verified.

Available options:
windows,
mac,
linux,
mobile,
tablet
solveCaptchas
boolean
default:false

Solve captchas automatically. Needs captcha solving to be enabled.

captchaImageSelector
string

CSS selector of a custom captcha image. Send with captchaInputSelector.

Required string length: 1 - 256
captchaInputSelector
string

CSS selector of the custom captcha's input. Send with captchaImageSelector.

Required string length: 1 - 256
recordSession
boolean
default:false

Record the session so browser.recording.export can export it.

logSession
boolean
default:false

Keep the session's logs.

blockAds
boolean
default:false

Block ads in the browser.

allowedDomains
string[]

Only allow top-level navigation to these domains and their subdomains, e.g. example.com. Up to 100.

Required array length: 1 - 100 elements
Required string length: 1 - 255
ignoreCertificateErrors
boolean
default:false

Ignore TLS certificate errors (expired or self-signed certificates).

Response

The result

status
string
required

The session is running (it may still be starting up).

Allowed value: "running"
ttlSeconds
integer
required

How long the session lives from now, in seconds.

Required range: -9007199254740991 <= x <= 9007199254740991
expiresAt
string

When the session ends by itself, ISO 8601.

ref
string

Reference to what this call created. Pass it as ref to browser.session.close, browser.sessions.list, browser.page.navigate, browser.page.read, browser.page.read-markdown, browser.page.screenshot, browser.page.click, browser.page.type, browser.page.key, browser.page.wait, browser.page.upload, browser.downloads.list, browser.recording.export or browser.script.run.