String Web Access API
Browser (CDP)

Connect with Puppeteer

Drive the remote browser with puppeteer-core.

Connect puppeteer-core to the remote browser by pointing browserWSEndpoint at the /wss endpoint and passing your API key as an Authorization header.

import puppeteer from "puppeteer-core";

const browser = await puppeteer.connect({
  browserWSEndpoint: "wss://request.usestring.ai/v1/wss",
  headers: {
    Authorization: "Bearer YOUR_API_KEY"
  }
});

const page = await browser.newPage();
await page.goto("https://example.com/");
const html = await page.content();
await page.screenshot({ path: "screenshot.png" });

await browser.disconnect();

Billing

The session is metered by bandwidth and duration and billed when it ends. Close or disconnect the browser as soon as you're done. See Browser pricing.