POST
/
sessions
/
create
curl --request POST \
  --url https://api.flyingraccoon.tech/sessions/create \
  --header 'Content-Type: application/json' \
  --header 'raccoon-secret-key: <api-key>' \
  --data '{
  "raccoon_passcode": "<end-user-raccoon-passcode>",
  "url": "https://www.google.com",
  "browser_type": "chromium",
  "settings": {
    "locales": [
      "en-US",
      "fr-FR"
    ],
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
    "viewport": {
      "height": 720,
      "width": 1280
    }
  },
  "advanced": {
    "block_ads": true,
    "proxy": {
      "city": "sanfrancisco",
      "country": "us",
      "state": "ca",
      "zip": 94102
    },
    "solve_captchas": true
  },
  "headless": true,
  "session_timeout": 600
}'
{
  "session_id": "session_12345",
  "websocket_url": "wss://connect.flyingraccoon.tech/ws/6000?sessionId=session_12345",
  "livestream_url": "https://api.flyingraccoon.tech/sessions/session_12345/stream?enable_actions=true&theme=dark",
  "status": "running"
}

The following features are currently experimental:

  • Proxies
  • CAPTCHA Solving

If you run into any issues, please report back to us through mail or use support center on the bottom right.

Use the websocket_url field of the response from this endpoint to connect to the browser session using frameworks like playwright.

Connect to browser using websocket url
from playwright.async_api import async_playwright

async with async_playwright() as playwright:
    browser = await playwright.chromium.connect_over_cdp(websocket_url)

Authorizations

raccoon-secret-key
string
header
required

Body

application/json
raccoon_passcode
string | null

The raccoon passcode associated with the end user on behalf of which the call is being made if any.

Example:

"<end-user-raccoon-passcode>"

url
string | null
default:https://www.google.com

The entrypoint url for the session.

Example:

"https://www.google.com"

browser_type
enum<string> | null
default:chromium

The type of browser to use. Supported values include 'chromium', 'firefox', and 'webkit'.

Available options:
chromium,
firefox,
webkit
Example:

"chromium"

settings
object | null

Configuration settings for the browser, such as viewport size and User-Agent string.

Example:
{
  "locales": ["en-US", "fr-FR"],
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
  "viewport": { "height": 720, "width": 1280 }
}
advanced
object | null

Advanced configuration options for the session, such as ad-blocking and CAPTCHA solving.

Example:
{
  "block_ads": true,
  "proxy": {
    "city": "sanfrancisco",
    "country": "us",
    "state": "ca",
    "zip": 94102
  },
  "solve_captchas": true
}
headless
boolean | null
default:false

Whether to run the browser in headless mode.

Example:

true

session_timeout
integer | null
default:300

The timeout for the browser session in seconds.

Example:

600

Response

200
application/json
Successful Response
session_id
string
required

A unique identifier for the created session.

Example:

"session_12345"

websocket_url
string
required

The WebSocket URL for interacting with the session.

Example:

"wss://connect.flyingraccoon.tech/ws/6000?sessionId=session_12345"

livestream_url
string
required

The Livestream URL

Example:

"https://api.flyingraccoon.tech/sessions/session_12345/stream?enable_actions=true&theme=dark"

status
enum<string>
required

The current status of the session.

Available options:
starting,
running,
terminated,
completed,
unknown,
success,
failure
Example:

"running"