Browser Automation API

Browser Automation API for Scraping, Testing & AI Agents

Replace the manual clicks in your workflows. Persistent sessions, retry logic and bot-detection bypass — handled.

  • Persistent ?session= tokens carry cookies and storage across calls.
  • Built-in retries with exponential backoff and dead-letter logging.
  • Live debugger streams the browser to your dashboard for sanity checks.
  • Stagehand-compatible mode — natural-language steps in 2 lines.
automation.tsTypeScript
import { chromium } from 'playwright'

const browser = await chromium.connectOverCDP(
  'wss://cloud.browserforhire.com?token=' + process.env.BFH_API_KEY +
  '&session=daily-uptime&stealth=true'
)
const page = await (await browser.newContext()).newPage()

await page.goto('https://app.example.com/login')
await page.fill('input[name=email]', process.env.LOGIN_EMAIL)
await page.fill('input[name=password]', process.env.LOGIN_PASSWORD)
await page.click('button[type=submit]')
await page.waitForURL('**/dashboard')
await page.screenshot({ path: 'dashboard.png', fullPage: true })

What you get

Multi-step flows

Login, navigate, fill forms, click through paginated lists, export to JSON. All in one persistent session.

Human-like behaviour

Mouse jitter, randomized scroll velocity, viewport-aware clicks. Built in, off by default.

Self-healing retries

On 403/captcha/timeout, we re-fingerprint and retry transparently. You only see the final result.

FAQ

How do I keep state between runs?+
Pass ?session=<your-id> on the connect URL. We persist cookies and localStorage for the duration of the session window (configurable up to 90 days on Scale and Enterprise tiers).
Can I record what the agent did?+
Yes. Pass ?record=true and we save a video + DOM snapshot for every session. Available in the dashboard for your retention window.

Ship Chrome to production today.

Free 1,000 credits, no credit card. Drop-in replacement for Browserless.