tinyx402

Browser session

A remote browser session you drive yourself over the Chrome DevTools Protocol, with Playwright, Puppeteer or raw CDP.

POST/api/v1/browser30000 base units · 0.03 USDT

Body (all optional)

FieldType
urlstringNavigate here on startup.
timeout_secondsintegerInactivity timeout, 5–3600.
proxy_configobject{ country_code: "DE" } for another exit country, { type: "custom", url, username, password } for your own proxy, or { enabled: false } for direct egress. The default is a US residential proxy.

Session creation takes 10–30 seconds, so give your HTTP client a timeout of at least 60 seconds.

Response

json
{
  "session_id": "br-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "cdp_url": "wss://example.tinyfish.io/cdp",
  "base_url": "https://example.tinyfish.io",
  "end_url": "/api/v1/browser/br-a1b2c3d4-…"
}

Connect

ts
import { chromium } from "playwright";

const s = await (await paidFetch("https://your-domain.com/api/v1/browser", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ url: "https://www.tinyfish.ai" }),
})).json();

const browser = await chromium.connectOverCDP(s.cdp_url); // use cdp_url, not base_url
const page = browser.contexts()[0].pages()[0];
await page.waitForLoadState("domcontentloaded");
console.log(await page.title());

await fetch(`https://your-domain.com${s.end_url}`, { method: "DELETE" }); // free; otherwise it ends on idle

Sessions are isolated and don't keep cookies or storage between sessions.