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.
Remote CDP Browser
Create a cloud Chromium session and connect your CDP client. Keep browser provisioning, protocol access and cleanup in one explicit lifecycle.
01 / OVERVIEW
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
Create the browser using the REST API, then use CDP for page operations. Session ids and connection URLs serve different purposes.
Use Playwright, Puppeteer or a compatible CDP client. Verify protocol and client-version compatibility for the operations you need.
Configure supported idle and maximum session timeouts, track active sessions and delete completed jobs to release concurrency.
03 / QUICKSTART
Requires Node.js and Playwright (npm install playwright). Set the ADSCRAWL_API_KEY environment variable on your server first.
Full request and response reference →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());
}Keep API keys on the server. For HTTP 402 check your balance; for 429 reduce concurrency and retry with backoff.
05 / FAQ
No. The API key authenticates REST session management. Use the returned token-bearing address for protocol access.
Use the client your application supports. Playwright and Puppeteer offer higher-level page APIs; raw CDP requires handling protocol commands and events.
Use Cloud Browser API for saved profiles. Do not assume a temporary Remote CDP session persists after deletion or expiry.