Dashboard

Browser Sessions API

Create and manage cloud browser sessions for automation.

Create Session

POST /api/v1/browser
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "sessionName": "my-session",
  "sessionTTL": 300,
  "sessionRecording": false,
  "proxyCountry": "US",
  "proxyState": "california",
  "proxyCity": "los-angeles",
  "profileId": "profile-id",
  "profilePersist": true,
  "extensionIds": "ext1,ext2"
}

Parameters

FieldTypeDefaultDescription
sessionNamestringautoCustom session name
sessionTTLnumber300Time-to-live in seconds
sessionRecordingbooleanfalseEnable recording
proxyCountrystring-2-letter country code
proxyStatestring-State or region
proxyCitystring-City
proxyURLstring-Custom proxy URL (BYOP)
proxyPoolIdstring-Proxy pool ID
profileIdstring-Browser profile to load
profilePersistbooleanfalseSave profile on close
extensionIdsstring-Comma-separated extension IDs
fingerprintobject-Custom fingerprint config

Response

{
  "success": true,
  "data": {
    "browserWSEndpoint": "wss://browser.scrayle.com/session/abc123",
    "sessionId": "abc123"
  }
}

Create Async Session

POST /api/v1/browser/async
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "sessionTTL": 600,
  "proxyCountry": "US"
}

Create Selenium Session

POST /api/v1/browser/selenium
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "sessionTTL": 300,
  "proxyCountry": "US"
}

Response includes a Selenium Remote WebDriver URL instead of a WebSocket endpoint.


Connecting to Sessions

Use the returned browserWSEndpoint with your preferred library:

# Playwright
const browser = await chromium.connectOverCDP(browserWSEndpoint);

# Puppeteer
const browser = await puppeteer.connect({ browserWSEndpoint });

Credits

Browser sessions cost 5 credits. Selenium sessions also cost 5 credits.