Skip to main content
Cloud Browsers are headless Chrome instances running on BCTRL infrastructure. Perfect for web scraping, testing, and automation that needs to scale.

Quick Start

import { playwright } from '@bctrl/sdk';

const session = await playwright.connect({
  apiKey: process.env.BCTRL_API_KEY
});

const page = session.page;
await page.goto('https://example.com');

// Your automation code here
await page.locator('button').click();
const title = await page.title();

await session.close();

Features

Every browser session comes with a unique, realistic browser fingerprint. Avoid detection and blocking with:
  • Unique canvas, WebGL, and audio fingerprints
  • Realistic browser headers and navigator properties
  • Human-like mouse movements and typing patterns
const session = await playwright.connect({
  apiKey: process.env.BCTRL_API_KEY,
  sessionOptions: {
    useStealth: true,      // Enable stealth mode
    humanize: true         // Human-like interactions
  }
});
Run browsers from different geographic locations using built-in proxy support:
const session = await playwright.connect({
  apiKey: process.env.BCTRL_API_KEY,
  sessionOptions: {
    useProxy: true,
    proxyCountry: 'US'  // 'US', 'UK', 'DE', 'JP', etc.
  }
});
Save and restore browser state (cookies, localStorage, fingerprint) across sessions:
// First session - save profile
const session1 = await playwright.connect({
  apiKey: process.env.BCTRL_API_KEY
});
await session1.page.goto('https://example.com');
// ... login and interact ...
const profileId = await session1.saveProfile();
await session1.close();

// Later - restore profile
const session2 = await playwright.connect({
  apiKey: process.env.BCTRL_API_KEY,
  sessionOptions: {
    profile: { id: profileId }
  }
});
// Cookies, localStorage, and fingerprint are restored

Learn more about Profiles

Complete guide to browser profiles and session persistence
Use natural language to control browsers with Stagehand and Browser-use:
const session = await playwright.connect({
  apiKey: process.env.BCTRL_API_KEY
});

// Stagehand - natural language actions
await session.stagehand.act('Click the login button');
await session.stagehand.act('Fill the email with [email protected]');

// Extract structured data
import { z } from 'zod';
const products = await session.stagehand.extract(
  'Get all product names and prices',
  z.array(z.object({
    name: z.string(),
    price: z.number()
  }))
);

// Autonomous agent for multi-step tasks
const agent = session.stagehand.agent({ maxSteps: 10 });
await agent.execute('Search for laptops and add the cheapest one to cart');

Learn more about AI Agents

Complete guide to Stagehand and Browser-use agents

Configuration Options

const session = await playwright.connect({
  apiKey: process.env.BCTRL_API_KEY,
  sessionOptions: {
    // Display
    screen: { width: 1920, height: 1080 },

    // Anti-detection
    useStealth: true,
    humanize: true,
    humanizePersonaId: 42,  // Specific movement persona (0-124)

    // Proxy
    useProxy: true,
    proxyCountry: 'US',

    // Session
    timeoutMinutes: 60,     // Default: 30

    // Profile
    profile: { id: 'profile-uuid' }
  }
});

When to Use Cloud Browsers

Web scraping at scale

Extract data from thousands of pages without managing infrastructure or getting blocked

Automated testing

Run your test suites in clean, isolated browser environments

Browser automation

Automate repetitive web tasks reliably across different sites

AI-powered workflows

Let AI agents handle complex, dynamic web interactions

Full Example

import { playwright } from '@bctrl/sdk';
import { z } from 'zod';

async function scrapeProducts() {
  const session = await playwright.connect({
    apiKey: process.env.BCTRL_API_KEY,
    sessionOptions: {
      useStealth: true,
      humanize: true,
      proxyCountry: 'US'
    }
  });

  try {
    const page = session.page;
    await page.goto('https://shop.example.com');

    // Use AI to handle dynamic content
    await session.stagehand.act('Accept cookie banner if present');
    await session.stagehand.act('Search for wireless headphones');

    // Extract structured data
    const products = await session.stagehand.extract(
      'Get the first 10 products with name, price, and rating',
      z.array(z.object({
        name: z.string(),
        price: z.number(),
        rating: z.number().optional()
      }))
    );

    console.log('Found products:', products);

    // Take a screenshot for debugging
    await page.screenshot({ path: 'products.png' });

    return products;
  } finally {
    await session.close();
  }
}

scrapeProducts();