Getting Started

Quickstart

Go from zero to cloud browser automation in under 2 minutes.

1. Get your API key

Sign up at browsefleet.com/dashboard. Your API key starts with bf_. For self-hosted instances, set the API_KEYS environment variable.

export BROWSEFLEET_API_KEY=bf_your_api_key

2. Install the SDK

Install the BrowseFleet client library for your language, or use curl directly.

npm install browsefleet puppeteer-core

3. Create a session

Launch a cloud browser and get a CDP WebSocket URL to connect your automation tools.

curl -X POST https://api.browsefleet.com/v1/sessions \
  -H "Content-Type: application/json" \
  -H "x-api-key: bf_your_api_key" \
  -d '{
    "stealth": "full",
    "viewport": { "width": 1920, "height": 1080 }
  }'

# Response:
# {
#   "id": "sess_abc123",
#   "status": "active",
#   "websocketUrl": "ws://api.browsefleet.com/cdp/sess_abc123",
#   "viewerUrl": "https://api.browsefleet.com/v1/sessions/sess_abc123/live",
#   "createdAt": "2026-04-02T12:00:00.000Z",
#   "expiresAt": "2026-04-02T12:30:00.000Z",
#   "timeout": 1800000,
#   "stealth": "full",
#   "viewport": { "width": 1920, "height": 1080 }
# }

4. Connect Puppeteer

Use the CDP WebSocket URL to connect Puppeteer, Playwright, or any CDP-compatible tool.

import puppeteer from 'puppeteer-core';

const browser = await puppeteer.connect({
  browserWSEndpoint: session.websocketUrl,
});

const page = await browser.newPage();
await page.goto('https://example.com');
const title = await page.title();
console.log(title); // "Example Domain"

await browser.disconnect();
await bf.sessions.release(session.id);

5. Scrape a page

Or skip sessions entirely and use the quick scrape endpoint for one-off tasks.

curl -X POST https://api.browsefleet.com/v1/scrape \
  -H "Content-Type: application/json" \
  -H "x-api-key: bf_your_api_key" \
  -d '{ "url": "https://example.com" }'

# Returns: { url, statusCode, title, html, cleanedHtml, markdown, readability, links, metadata }

6. Take a screenshot

Capture a full-page screenshot with a single call.

curl -X POST https://api.browsefleet.com/v1/screenshot \
  -H "Content-Type: application/json" \
  -H "x-api-key: bf_your_api_key" \
  -d '{ "url": "https://example.com", "fullPage": true }' \
  --output screenshot.png

Next steps

Explore the full API reference for sessions, computer API, agents, and more.