Skip to main content

Remote CDP Browser

Remote CDP browser. A session your tools can control.

Create a cloud Chromium session and connect your CDP client. Keep browser provisioning, protocol access and cleanup in one explicit lifecycle.

01 / OVERVIEW

What is Remote CDP Browser?

AdsCrawl Remote CDP Browser exposes a temporary cloud Chromium session through the Chrome DevTools Protocol. The CDP browser API creates and deletes sessions; the returned connection address lets a compatible client control the live browser.

02 / USE CASES

Where it fits

01

Separate provisioning from automation

Create the browser using the REST API, then use CDP for page operations. Session ids and connection URLs serve different purposes.

02

Connect existing tooling

Use Playwright, Puppeteer or a compatible CDP client. Verify protocol and client-version compatibility for the operations you need.

03

Control session lifetime

Configure supported idle and maximum session timeouts, track active sessions and delete completed jobs to release concurrency.

03 / QUICKSTART

Start with one complete workflow

  1. Create an API key and check your CDP concurrency allowance.
  2. POST /cdp/sessions with the supported timeout and browser settings.
  3. Connect using the returned address; the Playwright example below reads a page title.
  4. DELETE /cdp/sessions/:sessionId in cleanup and check the response.

Requires Node.js and Playwright (npm install playwright). Set the ADSCRAWL_API_KEY environment variable on your server first.

Full request and response reference →
Playwright
import { chromium } from "playwright";

const base = "https://api.adscrawl.net";
const headers = {
  "x-api-key": process.env.ADSCRAWL_API_KEY,
  "content-type": "application/json",
};
const res = await fetch(base + "/cdp/sessions", {
  method: "POST", headers,
  body: JSON.stringify({ idleTimeoutMs: 600000 }),
});
if (!res.ok) throw new Error(await res.text());
const session = await res.json();
try {
  const browser = await chromium.connectOverCDP(
    session.cdpBaseUrl
  );
  const page = await browser.contexts()[0].newPage();
  await page.goto("https://www.adscrawl.net");
  console.log(await page.title());
} finally {
  const stopped = await fetch(
    base + "/cdp/sessions/" + session.sessionId,
    { method: "DELETE", headers }
  );
  if (!stopped.ok) throw new Error(await stopped.text());
}

04 / LIMITS & BILLING

Know the boundaries

Compare plans and allowances →
  • CDP controls Chromium; it is not the Playwright native protocol or a Selenium WebDriver endpoint.
  • The session expires according to its lifetime settings and is not a persistent saved profile.
  • Connection URLs carry tokens; do not publish or cache them as permanent endpoints.
  • Ending a client connection is not a substitute for deleting the session. Account limits and usage billing apply.

Keep API keys on the server. For HTTP 402 check your balance; for 429 reduce concurrency and retry with backoff.

05 / FAQ

Common questions

Is the API key the CDP connection token?

No. The API key authenticates REST session management. Use the returned token-bearing address for protocol access.

Which client should I choose?

Use the client your application supports. Playwright and Puppeteer offer higher-level page APIs; raw CDP requires handling protocol commands and events.

How do I keep a browser profile between jobs?

Use Cloud Browser API for saved profiles. Do not assume a temporary Remote CDP session persists after deletion or expiry.