Skip to main content

Remote CDP Browser

Remote CDP Browser for Temporary Chromium Sessions

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.

SEE THE RESULT

Open a page. Click Next. Read the new state.

A recorded Playwright run against an AdsCrawl Remote CDP session: open the JavaScript page, follow its Next link, read page two, then delete the session.

Captured on

items on page one
10
items on page two
10
DELETE HTTP
200
After clicking NextVisit source
Second page of Quotes to Scrape captured after a Playwright click in an AdsCrawl Remote CDP session
Scroll to inspect the full captureOriginal PNG
JSON
{
  "targetUrl": "https://quotes.toscrape.com/js/",
  "startedAt": "2026-11-04T05:58:10.916Z",
  "client": "Playwright",
  "createStatus": 201,
  "steps": [
    {
      "action": "Open JavaScript page",
      "url": "https://quotes.toscrape.com/js/",
      "title": "Quotes to Scrape",
      "quoteCount": 10,
      "firstAuthor": "Albert Einstein"
    },
    {
      "action": "Click Next",
      "url": "https://quotes.toscrape.com/js/page/2/",
      "title": "Quotes to Scrape",
      "quoteCount": 10,
      "firstAuthor": "Marilyn Monroe"
    }
  ],
  "cleanup": {
    "method": "DELETE",
    "status": 200,
    "confirmed": true
  },
  "completedAt": "2026-11-04T05:58:23.692Z"
}

What to check

The URL changes to /js/page/2/ and the first author changes from Albert Einstein to Marilyn Monroe. The run ends with a successful session DELETE response.

Try your own page →

A recorded public-page example. Results reflect the page at capture time and can change with the target website, loading conditions and request settings.

VALIDATE ONE COMPLETE TASK

Test a headless browser API with a two-page task

01

Create and connect

Create a temporary session through REST, then connect Playwright chromium.connectOverCDP to the returned address. Reuse the returned browser context and open the JavaScript version of Quotes to Scrape in it.

02

Verify content after pagination

Wait for .quote elements and read 10 items. Click Next, wait for page-two .quote elements and check that its first author is Marilyn Monroe. A changed URL alone does not prove content is ready.

03

Release in finally

Delete the temporary session and inspect the close result whether assertions pass or throw. Disconnecting the client does not establish that the server-side session has stopped.

The reference was captured on 2026-11-04 in one AdsCrawl run. It does not establish success rates, performance or cost across other sites. Download the request and result, then repeat the checks on your target page.

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("Create session failed: HTTP " + res.status);
const session = await res.json();
if (typeof session.sessionId !== "string" || !session.sessionId) {
  throw new Error("Create response is missing sessionId");
}
let browser;
try {
  if (typeof session.cdpBaseUrl !== "string" || !session.cdpBaseUrl) {
    throw new Error("Create response is missing cdpBaseUrl");
  }
  browser = await chromium.connectOverCDP(
    session.cdpBaseUrl
  );
  const page = await browser.contexts()[0].newPage();
  await page.goto("https://www.adscrawl.net");
  const title = await page.title();
  // Use title in your application; do not log page content or session URLs.
} finally {
  try {
    await browser?.close();
  } finally {
    const stopped = await fetch(
      base + "/cdp/sessions/" + encodeURIComponent(session.sessionId),
      { method: "DELETE", headers }
    );
    if (!stopped.ok) throw new Error("Session cleanup failed: HTTP " + stopped.status);
  }
}

04 / LIMITS & BILLING

Know the boundaries

Sign up with 500 one-time credits. Hobby is $9/month, Starter $49/month and Pro $199/month. Launching a persistent Cloud Browser requires a paid plan.

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.