Skip to main content
POST
/
browser
Create a browser session
curl --request POST \
  --url https://api.firecrawl.dev/v2/browser \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ttl": 300,
  "activityTtl": 1805,
  "streamWebView": true
}
'
{
  "success": true,
  "id": "<string>",
  "cdpUrl": "<string>",
  "liveViewUrl": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Headers

HeaderValue
AuthorizationBearer <API_KEY>
Content-Typeapplication/json

Request Body

ParameterTypeRequiredDefaultDescription
ttlnumberNo300Total session lifetime in seconds (30-3600)
activityTtlnumberNo60Seconds of inactivity before session is destroyed (10-3600)

Response

FieldTypeDescription
successbooleanWhether the session was created
idstringUnique session identifier
cdpUrlstringWebSocket URL for CDP connections
liveViewUrlstringURL to watch the session in real time
expiresAtstringWhen the session will expire based on TTL

Example Request

curl -X POST "https://api.firecrawl.dev/v2/browser" \
  -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ttl": 120
  }'

Example Response

{
  "success": true,
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "cdpUrl": "wss://cdp-proxy.firecrawl.dev/cdp/550e8400-e29b-41d4-a716-446655440000",
  "liveViewUrl": "https://liveview.firecrawl.dev/550e8400-e29b-41d4-a716-446655440000"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
ttl
integer
default:300

Total time-to-live in seconds for the browser session

Required range: 30 <= x <= 3600
activityTtl
integer

Time in seconds before the session is destroyed due to inactivity

Required range: 10 <= x <= 3600
streamWebView
boolean
default:true

Whether to stream a live view of the browser

Response

Browser session created successfully

success
boolean
id
string

The unique session identifier

cdpUrl
string

WebSocket URL for Chrome DevTools Protocol access

liveViewUrl
string

URL to view the browser session in real time

expiresAt
string<date-time>

When the session will expire based on TTL