Skip to main content

Browser for AI Agents

A browser for AI agents. Turn planned actions into page operations.

Connect your agent's tool layer to a real cloud browser. Your application chooses the model and action policy; AdsCrawl supplies the browser session.

01 / OVERVIEW

What is Browser for AI Agents?

AdsCrawl provides a browser for AI agents through Remote CDP sessions and browser task endpoints. An AI agent browser API integration can use these tools to observe web pages and execute browser operations, while planning, model inference and approval rules remain in the agent application.

02 / USE CASES

Where it fits

01

Observe the current page

Read page text or capture a screenshot using your browser client, then pass the required observation to your model. Keep the page URL with the result.

02

Execute bounded actions

Map model-selected actions to explicit browser tools such as navigation or a known field interaction. Validate inputs and inspect the page after each action.

03

Choose a lighter tool when possible

Use Markdown or structured extraction for read-only content tasks. Use a CDP session when a task needs multiple interactive steps.

03 / QUICKSTART

Start with one complete workflow

  1. Choose your agent framework and keep the AdsCrawl API key in its server-side tool layer.
  2. Create a Remote CDP session and connect Playwright; the example below demonstrates the browser connection, not an autonomous agent.
  3. Implement your observe, plan and execute loop with validated tools, step limits and approval rules for consequential actions.
  4. Save the needed results and delete the remote session in cleanup, including after model or tool failures.

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 →
  • AdsCrawl supplies browser execution, not a hosted LLM, agent planner or guaranteed task completion.
  • Web content is untrusted input. Keep page instructions separate from your agent's permissions and user intent.
  • Model tokens and browser usage have separate costs. Set action budgets and session timeouts in your application.
  • Framework integrations must support the chosen CDP or HTTP tools. This page does not imply a native integration with every agent framework.

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

05 / FAQ

Common questions

Does the API accept a goal and finish the task itself?

The APIs shown here perform browser operations. Your application must implement planning, tool execution and completion checks.

Do I always need a running browser session?

No. For readable content, use the Markdown output of POST /html. Choose Remote CDP for interactive multi-step workflows.

Can the agent reuse a session?

It can perform multiple operations within an active session's lifetime. Delete the session after the task; use saved profiles separately when persistence is needed.