> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Anchor Browser is cloud browser infrastructure for AI agents and automation: browser sessions you control over CDP or REST, natural-language web tasks, versioned automation tasks, managed authentication into third-party web apps (identities with MFA), persistent volumes and profiles, recordings, live view, batch sessions, webhooks, and network options including residential proxies, extra stealth, and captcha solving for sites that block standard browsers. AI agents should start at https://docs.anchorbrowser.io/for-agents, then create an API key at https://app.anchorbrowser.io/api-keys. Read the for-agents page before authentication or API calls.

# Control a Browser Session

> Ways to drive a cloud browser session — natural language, your own code, REST endpoints, or OS-level primitives.

Once you have a [browser session](https://docs.anchorbrowser.io/quickstart/browser-sessions.md), you can control it in several ways. Pick the approach that matches how much logic you want Anchor to handle.

> [card] [Natural language](https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion.md)
>
> Send a plain-English instruction and let an AI agent navigate, click, and extract for you. Same capability via the SDK (`agent.task`) or the [Perform Web Task](https://docs.anchorbrowser.io/api-reference/ai-tools/perform-web-task.md) REST endpoint.

> [card] [Your own code](https://docs.anchorbrowser.io/quickstart/create-session.md)
>
> Connect with Playwright or Puppeteer over CDP and write the automation yourself. Full control over every step.

> [card] [REST API](#rest-api)
>
> Call HTTP endpoints for screenshots, page content, PDFs, and perform-web-task — no SDK required.

> [card] [OS-level control](https://docs.anchorbrowser.io/advanced/os-level-control.md)
>
> Drive the session with mouse, keyboard, and screen coordinates. Used by computer-use agents and vision models.

## REST API

Anchor exposes browser actions as REST endpoints you can call from any language or agent framework. Pass an optional `sessionId` query parameter to run on an existing session; omit it and Anchor provisions a browser for the request.

### AI endpoints

| Endpoint | What it does |
| - | - |
| [Perform Web Task](https://docs.anchorbrowser.io/api-reference/ai-tools/perform-web-task.md) | Natural-language instruction — the agent navigates, interacts, and returns a result. Same capability as `agent.task` in the SDK. |
| [Get Perform Web Task Status](https://docs.anchorbrowser.io/api-reference/ai-tools/get-perform-web-task-status.md) | Poll an async perform-web-task run by `workflow_id`. |

See [Perform Web Task](https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion.md) for SDK usage, agent options, and [Async execution](https://docs.anchorbrowser.io/agentic-browser-control/async-perform-web-task.md) for the async flow.

### Page endpoints

| Endpoint | What it does |
| - | - |
| [Screenshot Webpage](https://docs.anchorbrowser.io/api-reference/tools/screenshot-webpage.md) | Fully JavaScript-rendered PNG screenshot of a URL. |
| [Get Webpage Content](https://docs.anchorbrowser.io/api-reference/tools/get-webpage-content) | LLM-ready Markdown (or HTML) of a rendered page. PDF URLs are supported — text is extracted the same as any other page. |
| [Get Page PDF](https://docs.anchorbrowser.io/api-reference/tools/get-page-pdf.md) | Renders the page and returns a PDF file. |

> [!NOTE]
>
> The **Screenshot Webpage** endpoint does not support PDF URLs. Use **Get Webpage Content** to extract text from PDFs.

### Session-less fetch

| Endpoint | What it does |
| - | - |
| [Web Unlocker](https://docs.anchorbrowser.io/api-reference/tools/web-unlocker.md) | Fetch rendered content from bot-protected sites without managing a session. See the [Web Unlocker guide](https://docs.anchorbrowser.io/advanced/web-unlocker.md). |

See [API Quick Start](https://docs.anchorbrowser.io/quickstart/use-via-api.md) for authentication and your first REST call. To expose Anchor from Cursor, Claude, or other agent tools, see [MCP integration](https://docs.anchorbrowser.io/advanced/mcp.md).

## Compiled workflows

For repeatable, versioned flows — not one-off session control — see [Automation Tasks](https://docs.anchorbrowser.io/tasks/overview.md). Use [Which task type?](https://docs.anchorbrowser.io/tasks/which-task-type.md) to compare Perform Web Task with Automation Tasks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.