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

> ## Agent Instructions
> Authenticate REST, SDK, and CLI requests with the `x-api-key` header using the `HYPERBROWSER_API_KEY` environment variable (create keys at https://app.hyperbrowser.ai).
> Always stop browser sessions (`sessions.stop(id)` / `PUT /api/session/{id}/stop`) and sandboxes (`sandboxes.stop(id)` / `PUT /api/sandbox/{id}/stop`) in `try`/`finally` blocks to avoid idle billing.
> Choose the right surface: use Web API (`/api/web/fetch`, `batch-fetch`, `crawl`, `search`) for stateless reading and extraction (prefer it over legacy `/api/scrape`); Browser Sessions (`/api/session`) for interactive, authenticated, or Playwright/Puppeteer workflows; Cloud Agents (`/api/task/*`) for autonomous browser tasks; and Sandboxes (`/api/sandbox`) for isolated Linux or macOS code execution.
> Use `@hyperbrowser/sdk` for Node.js/TypeScript, `hyperbrowser` 1.0+ typed-dict request params for Python (avoid legacy Pydantic request classes), the unified `hx` CLI for terminal workflows, and hosted OAuth MCP at `https://mcp.hyperbrowser.ai/mcp/web` (web tools; use `https://mcp.hyperbrowser.ai/mcp` only when browser, sandbox, admin, and usage tools are needed).

# Recipes & Cookbooks

> End-to-end, production-ready recipes combining Hyperbrowser Browsers, Web API v2, Cloud Agents, Sandboxes, Secrets, and Hosted MCP

Each cookbook below combines multiple shipped Hyperbrowser primitives into a complete, runnable workflow—including error handling, `try`/`finally` cleanup, and minimum API key scopes.

> [card] [Authenticated Playwright Scraping](https://hyperbrowser.ai/docs/recipes/authenticated-playwright-scraping.md)
>
> Persist login state across runs with Profiles, Stealth, and Proxies using Playwright over CDP.

> [card] [Batch Web Extraction with Web API v2](https://hyperbrowser.ai/docs/recipes/batch-web-extraction.md)
>
> Extract structured JSON across dozens of URLs using `web.fetch` actions and `web.batchFetch`.

> [card] [Human-in-the-Loop Cloud Agents](https://hyperbrowser.ai/docs/recipes/human-in-the-loop-agents.md)
>
> Pair `browserUse` with Credential Fill and Live View so humans can intervene without exposing secrets to LLMs.

> [card] [Isolated CI Sandbox with Vaults & Egress](https://hyperbrowser.ai/docs/recipes/isolated-ci-sandbox.md)
>
> Execute untrusted code inside a default-deny Linux sandbox with injected vault secrets and file transfers.

> [card] [Coding Agents + Hosted MCP Workflow](https://hyperbrowser.ai/docs/recipes/hosted-mcp-coding-agents.md)
>
> Wire Claude Code or Codex to least-privilege `/mcp/web` and verify live pages from your IDE.

> [card] [Warm Browser Pools with Session Snapshots](https://hyperbrowser.ai/docs/recipes/warm-session-pools-and-snapshots.md)
>
> Capture a warm browser snapshot, restore clones in parallel, extend timeouts, and inspect event logs.


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