Browser API quickstart

Create a managed browser session and connect with an automation client.

Create a managed browser session

Read the available session and proxy options first:

curl --fail-with-body --silent --show-error \
  'https://api.raspbytes.com/api/v1/browser/session-options/' \
  -H "X-API-Key: $RASPBYTES_API_KEY"

Create a Chromium session:

curl --fail-with-body --silent --show-error \
  -X POST 'https://api.raspbytes.com/api/v1/browser/sessions/' \
  -H "X-API-Key: $RASPBYTES_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "browser": "chromium",
    "browser_version": "stable",
    "proxy": {
      "type": "residential",
      "country": "GB",
      "sticky": true
    }
  }'

The accepted timeout, environment, proxy type, and country are constrained by
the current session and proxy options. Poll the session detail endpoint until
the response contains a usable connection.url.

Terminate the session when work completes instead of waiting for its lease to
expire.


Did this page help you?