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

> ## Agent Instructions
> The Zenrows HTTP API serves Fetch and Extract (extract=auto) at https://api.zenrows.com/v1/, Crawl at https://api.zenrows.com/v1/crawls, and Batch at https://async.api.zenrows.com/v1. Fetch, Extract, Crawl and Batch are described in OpenAPI 3.1 at https://www.zenrows.com/openapi.json and listed in the RFC 9727 API catalog at https://www.zenrows.com/.well-known/api-catalog. Every endpoint also has its own page under /api-reference with its schema. Use the spec for exact parameter names and types. Crawl's endpoints, parameters and errors are also at https://docs.zenrows.com/crawl/endpoints.md. To call Zenrows from an agent, connect the MCP server at https://mcp.zenrows.com/mcp. To search these docs from an agent, connect the docs MCP server at https://docs.zenrows.com/mcp. Agent skills for Zenrows are published at https://github.com/ZenRows/cli and install with `npx skills add ZenRows/cli`.

# Zenrows MCP Server

> Give any MCP-compatible AI tool, agent, or application real-time access to the live web. One integration combines fast scraping and full browser automation, with anti-bot bypass on every tool.

The [Zenrows MCP (Model Context Protocol) server](https://github.com/ZenRows/zenrows-mcp) is the standard way AI systems use Zenrows. A single connection gives your AI assistant, agent, or application real-time access to any website.

No signup and no API key are needed for the local server (`npx -y @zenrows/mcp`). On its first tool call without a key, it creates a Free account with 5,000 credits for its first billing period, and you can claim that account later, keeping its key and its usage. An unclaimed account is not renewed after that first period. See [Agent signup and unclaimed accounts](https://docs.zenrows.com/authentication.md#agent-signup-and-unclaimed-accounts).

> [card] [View on GitHub](https://github.com/ZenRows/zenrows-mcp)
>
> Zenrows MCP is open source. Star the repository, file issues, or contribute.

## Why Zenrows MCP

* **Reach sites that normally block bots:** Get access to any website at scale without getting blocked by anti-bot systems.
* **Managed scraping infrastructure:** Proxy rotation, headless browser orchestration, anti-bot evasion, and session management run on Zenrows infrastructure.
* **Plug into any AI you already use:** Works with any MCP client, including AI assistants, agent frameworks, AI SDKs, IDE plugins, and custom applications.
* **Plain English, no scraping code:** Describe the task naturally and the AI picks the right tool. No selectors, no proxy management, no anti-bot tuning.

## What you can do

Once connected, your AI assistant can:

* Scrape any webpage by describing the task in plain English
* Extract structured data from e-commerce sites, news pages, job boards, and more
* Render pages as Markdown, plain text, HTML, or PDF
* Take above-the-fold or full-page screenshots
* Access geo-restricted, JavaScript-heavy, or bot-protected pages
* Automate multi-step browser workflows: navigate, click, fill forms, scroll, drag, and extract across pages
* Queue a large set of URLs as one asynchronous job, then come back for the results
* Start from one page and collect the URLs linked from it, with each page's HTML when you ask for it
* Run JavaScript in a live browser context
* Manage cookies, local storage, multiple tabs, and persistent sessions
* Check the plan's remaining credits before starting a large job

## Before you start

Whether you need an account first depends on the server you connect to:

| Server | Zenrows account and API key |
| - | - |
| [Local](#local-mcp-server) (`npx -y @zenrows/mcp`) | Optional. With no key, the server creates a Free account for you. See [Start without an API key](#start-without-an-api-key). To use an account you already have, set `ZENROWS_API_KEY` |
| [Remote](#remote-mcp-server) (`https://mcp.zenrows.com/mcp`) | Required. Sign in with OAuth, where you can log in or create a Free account, or send your API key as a Bearer token. Listing the tools (`tools/list`) works without a key; calling a tool needs one |

The local server also needs [Node.js](https://nodejs.org/) for `npx`.

[Create an account](https://app.zenrows.com/register)
[Get your API key](https://app.zenrows.com/settings/api-keys)

> [!NOTE]
>
> An agent can also pay per request with no Zenrows account at all: it buys and calls Fetch and Extract on its own over x402, MPP or a card at `https://agents.zenrows.com/llms.txt`. See [Agentic Payments](https://docs.zenrows.com/first-steps/agentic-payments.md).

## Connection options

The Zenrows MCP server supports two transport options. Pick the one that fits your client.

| Option | Transport | Authentication |
| - | - | - |
| [**Remote MCP server**](#remote-mcp-server) | Streamable HTTP | OAuth 2.1 sign-in, or API key as a Bearer token |
| [**Local MCP server**](#local-mcp-server) | STDIO (local subprocess) | `ZENROWS_API_KEY` environment variable, or none: the server creates a Free account |

Both options expose the same set of tools and capabilities. The choice is purely about how your client connects to the server. The one exception is `account_signup_answer`: only the local server signs up on its own, so only it has that tool.

### Remote MCP server

The hosted Zenrows MCP server is the recommended path for any AI application that calls an LLM API directly. The server runs on Zenrows' infrastructure, so there is nothing to install, configure, or update.

* **Server URL:** \
  &#x20;`https://mcp.zenrows.com/mcp`
* **Transport:** \
  &#x20;Streamable HTTP
* **Authentication:** \
  &#x20;OAuth 2.1 sign-in, or your Zenrows API key as a Bearer token. See [Authentication](#authentication) for details.

**Example: OpenAI Responses API**

Most modern AI SDKs accept the connection details through a single MCP tool definition. Here is the complete configuration for the OpenAI Responses API:

```python Python theme={"theme":"css-variables"}
import os
from openai import OpenAI

ZENROWS_API_KEY = os.environ["ZENROWS_API_KEY"]

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

response = client.responses.create(
    model="gpt-5",
    tools=[
        {
            "type": "mcp",
            "server_label": "zenrows",
            "server_description": "Web scraping MCP server for accessing live web content.",
            "server_url": "https://mcp.zenrows.com/mcp",
            "authorization": ZENROWS_API_KEY,
            "require_approval": "never",
        }
    ],
    input="Visit https://news.ycombinator.com/ and summarize the three most recent posts.",
)

print(response.output_text)
```

**Generic configuration**

| Field | Value |
| - | - |
| Endpoint | `https://mcp.zenrows.com/mcp` |
| Transport | Streamable HTTP |
| Auth header | `Authorization: Bearer YOUR_ZENROWS_API_KEY` |

Most MCP clients accept either an `authorization` shorthand field that automatically wraps the value as a Bearer token, or a free-form `headers` field where you set the `Authorization` header yourself. Either approach works with Zenrows MCP.

**No key yet, no browser.** The remote server never creates an account itself. A tool call without a key gets a `401` whose body carries an `agent_signup` field with the signup URL (`https://app.zenrows.com/api/agent/signup`). A headless agent can `POST` there to create a Free account (the endpoint may first ask one short question for the agent to answer), then retry with the returned `apiKey` as the Bearer token. The same endpoint is listed in the `agent_auth` block of `https://mcp.zenrows.com/.well-known/oauth-authorization-server`. See [Agent signup and unclaimed accounts](https://docs.zenrows.com/authentication.md#agent-signup-and-unclaimed-accounts).

### Local MCP server

If your AI client runs the MCP server as a local subprocess instead of calling a remote URL, use the [`@zenrows/mcp`](https://www.npmjs.com/package/@zenrows/mcp) npm package. This is the standard configuration for desktop AI clients.

> [!WARNING]
>
> You need [Node.js](https://nodejs.org/) installed for `npx` to work.

The exact location of the configuration file varies by client, but every supported client uses a similar MCP server config shape. To use an account you already have, replace `YOUR_ZENROWS_API_KEY` with your key:

```json JSON theme={"theme":"css-variables"}
{
  "mcpServers": {
    "zenrows": {
      "command": "npx",
      "args": ["-y", "@zenrows/mcp"],
      "env": {
        "ZENROWS_API_KEY": "YOUR_ZENROWS_API_KEY"
      }
    }
  }
}
```

The optional `ZENROWS_FETCH_RETRIES` variable turns on retries in `scrape` and `extract`: it sets how many times they retry a call the API did not serve. The default is `0`, so each call is sent once. Any value other than a whole number of 0 or more stops the server at startup with an error. See [Retries in `scrape` and `extract`](https://docs.zenrows.com/mcp/tool-reference#retries-in-scrape-and-extract).

#### Start without an API key

Leave `ZENROWS_API_KEY` out and the server gets its own key:

```json JSON theme={"theme":"css-variables"}
{
  "mcpServers": {
    "zenrows": {
      "command": "npx",
      "args": ["-y", "@zenrows/mcp"]
    }
  }
}
```

The local server looks for a key in this order:

1. The `ZENROWS_API_KEY` environment variable.
2. A key it stored earlier in `~/.zenrows/secrets.json`.
3. Auto-signup. With neither, the server still starts. On the first tool call it creates a Zenrows account on the Free plan (5,000 credits for its first billing period), saves the key to `~/.zenrows/secrets.json` and the account's claim details to `~/.zenrows/account.json` (both readable only by your user), and writes a claim link to its log (stderr).

The account is unclaimed until a person claims it. An unclaimed account is not renewed after its first billing period: requests then answer `402 AUTH005` until it is claimed. Claiming keeps the same key and the usage so far, and if the first period has ended, it starts a new billing period. When an unclaimed account runs out of credits, the tool error includes the claim link, so your agent can hand it to you. See [Agent signup and unclaimed accounts](https://docs.zenrows.com/authentication.md#agent-signup-and-unclaimed-accounts).

Before it shows a claim link, the server checks whether the account has been claimed and asks for a fresh link when the stored one is missing or 25 days old or more (links expire after 30 days). Once the account is claimed, tool errors stop carrying a claim link.

Signup may first ask one short question that the agent answers itself. The tool call that triggers signup then returns the question instead of a result. Answer it with the `account_signup_answer` tool, passing `{"answer": "..."}`, then retry the original tool call. A wrong or expired answer returns a new question. See [Answer the signup question](https://docs.zenrows.com/authentication.md#answer-the-signup-question).

Each network can create 3 accounts this way in 24 hours. If signup is refused (that cap, signup turned off on the Zenrows side, or a network error), the server keeps running and the tool call returns an error that gives the reason, when to retry, and the fix: set `ZENROWS_API_KEY` to a key you already have, persist `ZENROWS_HOME` between CI runs, or set `ZENROWS_AUTO_SIGNUP` to `false`. Until that retry time, tool calls return the same error without asking Zenrows again.

To turn auto-signup off, set `ZENROWS_AUTO_SIGNUP` to `false`. The server then never creates an account. It still starts, but tool calls return an error asking for a key until you set `ZENROWS_API_KEY` (or a key is already in `~/.zenrows/secrets.json`):

```json JSON theme={"theme":"css-variables"}
{
  "mcpServers": {
    "zenrows": {
      "command": "npx",
      "args": ["-y", "@zenrows/mcp"],
      "env": {
        "ZENROWS_AUTO_SIGNUP": "false",
        "ZENROWS_API_KEY": "YOUR_ZENROWS_API_KEY"
      }
    }
  }
}
```

The signup request carries a random per-machine id, shared with the Zenrows CLI, and a guess at the agent running the server (for example `claude-code` or `cursor`). Set `ZENROWS_TELEMETRY` to `off` to leave both out.

#### Run the local server in CI

A CI runner starts from a clean home directory, so without a key every run creates a new account, and the fourth run from the same network within 24 hours is refused. Give CI one key instead:

* Store your API key as a CI secret and pass it as `ZENROWS_API_KEY`.
* Or keep the server's key between runs: cache `~/.zenrows`, or set `ZENROWS_HOME` to a cached directory. The server reads and writes `secrets.json` and `account.json` in a `.zenrows` folder inside it (or in it directly, when the path ends in `.zenrows`).

Set `ZENROWS_AUTO_SIGNUP` to `false` in CI as well, so a missing secret never creates an account: the server still starts, and every tool call returns an error asking for a key.

#### Per-client setup guides

For step-by-step instructions including the exact config file path and restart steps for each client:

| Client | Type |
| - | - |
| [Claude (web, desktop and mobile)](https://docs.zenrows.com/integrations/claude.md) | AI assistant, remote connector with OAuth |
| [Claude Desktop](https://docs.zenrows.com/integrations/claude-desktop.md) | AI assistant, local setup with an API key |
| [Claude Code](https://docs.zenrows.com/integrations/claude-code.md) | AI coding assistant |
| [Cursor](https://docs.zenrows.com/integrations/cursor.md) | AI code editor |
| [Windsurf](https://docs.zenrows.com/integrations/windsurf.md) | AI code editor |
| [VS Code](https://docs.zenrows.com/integrations/vscode.md) | AI code editor |
| [Zed](https://docs.zenrows.com/integrations/zed.md) | AI code editor |
| [JetBrains IDEs](https://docs.zenrows.com/integrations/jetbrains.md) | AI code editor |

## Authentication

The remote Zenrows MCP server accepts either OAuth 2.1 sign-in or your Zenrows API key sent directly as a Bearer token. With OAuth, the access token it issues is your account's API key, so every tool runs with that key's permissions either way. See [Authentication and permissions](https://docs.zenrows.com/mcp/tool-reference.md#authentication-and-permissions) for the OAuth flow.

> [tab] Remote MCP server
>
> Send the key in the HTTP `Authorization` header on every request:
>
> ```text theme={"theme":"css-variables"}
> Authorization: Bearer YOUR_ZENROWS_API_KEY
> ```
>
> OpenAI's MCP tool, Anthropic's MCP tool, and most other MCP clients expose this through a single `authorization` field on the tool config and forward it as the Bearer token automatically. Some clients use a free-form `headers` field instead. Both approaches are valid.

> [tab] Local STDIO MCP server
>
> The key is optional: with none, the server creates a Free account (see [Start without an API key](#start-without-an-api-key)). To use your own key, pass it through the `ZENROWS_API_KEY` environment variable in your client's MCP configuration:
>
> ```json JSON theme={"theme":"css-variables"}
> {
>   "mcpServers": {
>     "zenrows": {
>       "env": {
>         "ZENROWS_API_KEY": "YOUR_ZENROWS_API_KEY"
>       }
>     }
>   }
> }
> ```

You can find or rotate your API key in your Zenrows dashboard.

[Manage API keys](https://app.zenrows.com/settings/api-keys)

> [!WARNING]
>
> Treat your API key like a password. Do not commit it to source control or share it in client-side code.

## Tools

A tool in MCP terms is a named capability the server exposes. For example, `scrape` or `browser_navigate`.

When you ask your AI to fetch a webpage or fill a form, the AI sees the available tools, picks the one that fits the task, and invokes it. **You don't call tools yourself in code.** You set up the MCP connection once, and the AI handles tool selection and invocation from there.

The Zenrows MCP exposes five groups of tools, plus one standalone tool for checking credits. The local server adds `account_signup_answer`, which answers the [signup question](https://docs.zenrows.com/authentication.md#answer-the-signup-question) when it creates its own account. The `extract` group includes the two tools that prepare a domain for it: `prepare_domain` and `prepared_domain_status`.

### The `scrape` tool

The `scrape` tool fetches a webpage in a single request and returns its content in the format you specify: clean Markdown (default), plain text, raw HTML, a screenshot, a PDF, or structured JSON. It uses [Fetch](https://docs.zenrows.com/fetch/api-reference.md) under the hood.

By default, `scrape` uses [Adaptive Stealth Mode](https://docs.zenrows.com/fetch/features/adaptive-stealth-mode.md) (`mode=auto`): Zenrows enables JavaScript rendering and premium proxies only when a page needs them, and you pay only for the configuration that succeeds. Set `js_render` or `premium_proxy` only to force a fixed configuration, which turns Adaptive Stealth Mode off.

Best for quick data extraction where the AI doesn't need to interact with the page.

### The `extract` tool

The `extract` tool returns a page as structured JSON rather than as a body of text. Prefer it over `scrape` when the answer is a set of fields, such as a product's name and price, an article's author and date, or the rows of a listing: it returns a fraction of the tokens a full page costs.

It runs in one of three modes:

| Mode | What it does |
| - | - |
| `auto` (default) | Site-tailored extraction (`extract=auto`) on any prepared domain, currently free. On a domain not prepared yet it returns [`REQS007`](https://docs.zenrows.com/api-error-codes#REQS007); prepare the domain with `prepare_domain`, then call `extract` again. |
| `autoparse` | Deprecated. General-purpose structured JSON, on any domain. Runs only when you ask for it. |
| `css` | Your own selector map, passed as `css_extractor`. |

Like `scrape`, `extract` uses Adaptive Stealth Mode by default, and so do the Batch tools. Set `js_render` or `premium_proxy` only to force a fixed configuration, or `mode_auto: false` to turn Adaptive Stealth Mode off.

`extract` returns the extracted fields only. In `auto` mode, set `include_html: true` to also get the page HTML, which is most of the response size.

For a full page as Markdown, HTML, or a screenshot, use `scrape` instead.

### Preparing a domain

When `extract` returns `REQS007` with `reason` `domain_not_prepared`, prepare the domain yourself:

1. Call `prepare_domain` with the domain and 1 to 5 example URLs. One works; we recommend 3 or more of the same page type (e.g. 3 product pages), because Extract compares pages of one type to check the fields it found and fill in fields one page is missing. It returns at once with `status: "preparing"`.
2. Call `prepared_domain_status` about every 30 seconds until `status` is `ready`. Preparation takes a few minutes and costs no credits; each new domain uses one slot of your monthly allowance, which `prepared_domain_status` shows.
3. Call `extract` again.

A `REQS007` with `reason` `page_not_recognised` is different: the domain is already prepared, and preparing it again does not change the answer. See [REQS007](https://docs.zenrows.com/api-error-codes.md#REQS007) for what to do.

### Crawl tools

The `crawl_*` tools start and read a [Crawl](https://docs.zenrows.com/crawl/introduction.md): one start URL, then the URLs it finds behind that page, and each page's HTML when `output_format` is `html`.

`crawl_create` returns as soon as the crawl is accepted, so a crawl that runs for a while does not block the call. Poll with `crawl_get`, or hand the waiting to `crawl_wait`. `crawl_wait` returns the status, the counts, and the first 20 URLs. Save every result with `crawl_download`, or page through them with `crawl_results`.

`depth` is optional. Leave it out and the crawl follows links until `max_pages` or `max_items` stops it. Both default to 100 and cap at 100,000. Each page fetched is one [Fetch](https://docs.zenrows.com/fetch/api-reference.md) request. See [Crawl pricing](https://docs.zenrows.com/crawl/endpoints.md#pricing).

Crawl tools are in the Zenrows MCP server from version 2.6.1. The hosted server at `https://mcp.zenrows.com/mcp` and `npx -y @zenrows/mcp` both expose them.

| Tool | Description |
| - | - |
| `crawl_create` | Start a crawl from one URL. Returns a `crawl_id` at once. `depth` is optional. Set `output_format` to `html` to store each kept page. Set `idempotency_key` so a retry returns the crawl the first request created |
| `crawl_wait` | Poll until the crawl ends, or until `timeout` seconds pass (default 50, max 3,600). Returns the status, the counts, and the first 20 URLs (`first_urls`) |
| `crawl_results` | List the URLs kept so far, in order. Pass `next_cursor` to continue. On a running crawl the list is partial. A stopped crawl can still add URLs for up to 10 minutes, and `next_cursor` is null once every URL was read |
| `crawl_content` | Read the HTML of one kept page. Pass `content_id`: a content id, or `content_url` from a `crawl_results` row. Only for crawls created with `output_format` `html`, and only once `content_status` is `fetched`. The HTML is cut at `max_chars` (default 20,000) |
| `crawl_download` | Save every result as JSON lines (`.jsonl`): `url`, and `content` once the page is fetched. Locally the file is `~/.zenrows/crawls/<crawl_id>.jsonl` unless you pass a `path` inside that folder. On the hosted server no file is written: the reply is the download URL and a command to run where your API key is set |
| `crawl_get` | Read a crawl and one page of its results |
| `crawl_list` | List this account's crawls, newest first, without their results |
| `crawl_stop` | Stop a running crawl. The URLs kept so far stay readable. A crawl that already ended answers as it ended |

### Batch tools

`batch_content`, `batch_list`, `batch_pause`, `batch_resume`, `batch_rerun` and `batch_delete` are in the Zenrows MCP server from version 2.13.0. The hosted server at `https://mcp.zenrows.com/mcp` and `npx -y @zenrows/mcp` both expose them.

The `batch_*` tools submit and manage [Batch](https://docs.zenrows.com/batch/introduction.md) jobs: one job that fans out many URLs asynchronously, so the AI doesn't hold a connection open per URL. Best when the URL set is large enough that waiting on each request in turn is impractical, or when the assistant should submit work now and collect it later.

`batch_create` returns as soon as the job is accepted, so a job that runs for hours doesn't block a synchronous tool call. The usual flow is `batch_create`, then `batch_wait` until the run ends, `batch_results` to page through the rows, and `batch_content` to read one task's page.

| Tool | Description |
| - | - |
| `batch_create` | Submit one closed job with all its tasks, up to 100,000 per call. Each task takes a `url`, plus optional `external_id`, `metadata`, `method` and `body` for POST tasks, and scrape params. `response_type` takes `markdown`, `plaintext` or `pdf`; leave it out for HTML. Every call sends an `Idempotency-Key` (generated unless you set `idempotency_key`), so a retry never creates a second job. Returns a `job_id` plus the run's status and stats at once; set `wait` to return when the run ends or pauses |
| `batch_status` | Get the latest run's status (`pending`, `running`, `completed`, `stopped`, `failed`) and stats |
| `batch_wait` | Poll until the run ends (`completed`, `stopped` or `failed`). `timeout` is in seconds, default 50: when it runs out, the reply is the current state with `timed_out: true`, not an error, so call it again. A paused run returns at once with `paused: true` |
| `batch_results` | List a run's result rows a page at a time: `limit` (default 100, max 1,000), `cursor`, `run_id`, and a `status` filter (`all`, `successful`, `failed` or `processing`). Pass `next_cursor` back as `cursor` until it is `null`; the cursor resumes after the last task it returned, so rows that leave a filter between calls don't hide the rows after them. A `result_url` is valid for 2 hours. After 14 days a successful row reads `expired` |
| `batch_content` | Read one task's result: text inline, cut to `max_chars` (default 20,000), or a PDF's `result_url`. Finding a PDF's link reads the run's results; on a large run one call can run out of time first and answer with `lookup_cursor`, so call `batch_content` again with it |
| `batch_list` | List the account's jobs, newest first |
| `batch_cancel` | Stop the current run for good. In-flight tasks finish and results stay |
| `batch_pause` / `batch_resume` | Halt the current run and continue it later. A paused run still counts as an active job |
| `batch_rerun` | Start a new run once the latest one ended. By default it reruns the `failed` and `pending` tasks and carries the others over; pass `status` for other statuses, or `full: true` to scrape every task again. A partial rerun works within 10 days of when the run started |
| `batch_delete` | Delete a job with its runs and results, and free its active-job slot |

`batch_cancel`, `batch_pause` and `batch_resume` are idempotent: on a run that already ended they answer with its final state and `already_ended: true`.

A run that ends `failed` answers `ok: false`. Its `error.code` is the one the matching HTTP error gets: `BATCH_INSUFFICIENT_CREDITS` (out of credits), `BATCH_KEY_CAP_REACHED` (the key reached a [credit cap](https://docs.zenrows.com/first-steps/api-key-credit-caps.md)), `AUTH_INVALID` with `server_code` `subscription_inactive` (fix Billing), or `BATCH_RUN_FAILED`. `error.server_code` is the run's `failure_reason`, and `error.job_id` names the job. Fix the cause, then call `batch_rerun`.

| Error code | When |
| - | - |
| `BATCH_INVALID_REQUEST` | `400`: the request was rejected; `invalid_tasks` lists the first bad tasks. Nothing was created |
| `AUTH_INVALID` | `401`: the API key was rejected, or, with `server_code` `subscription_inactive`, the subscription needs fixing in Billing |
| `BATCH_INSUFFICIENT_CREDITS` | `402`: the account has no credits left |
| `BATCH_KEY_CAP_REACHED` | `402`: this API key reached one of its credit caps; the account's other keys still work |
| `BATCH_ACCESS_DENIED` | `403`: Batch isn't enabled for this account. Don't retry |
| `BATCH_NOT_FOUND` | `404`: no such job, run or task for this account |
| `BATCH_RUN_ENDED`, `BATCH_RUN_NOT_FINISHED`, `BATCH_NO_MATCHING_TASKS`, `BATCH_RERUN_WINDOW_EXPIRED`, `BATCH_NO_PRIOR_RUN`, `BATCH_IDEMPOTENCY_CONFLICT`, `BATCH_TASK_NOT_READY`, `BATCH_CONFLICT` | `409`, by `server_code` |
| `BATCH_RESULT_EXPIRED` | `410`: the result is past its retention window |
| `BATCH_TASK_FAILED` | `422`: the task failed; `task_error` holds its error |
| `BATCH_QUOTA_EXCEEDED` | `429`: an account limit more credits don't raise: 3 active jobs (shared with Crawl), 5 scheduled jobs, or an open job's 100,000 tasks |
| `BATCH_RATE_LIMITED` | Any other `429` |
| `BATCH_FAILED` | Any other HTTP error |
| `BACKEND_UNAVAILABLE` | No response after retries: a network error or timeout |

Errors also carry `message`, `detail`, `server_code` (the Batch API's own [error code](https://docs.zenrows.com/api-error-codes.md#batch)) and, for a call about one job, `job_id`.

Reads and polls retry `429`, `500`, `502`, `503`, `504` and network errors up to 3 times, honoring `Retry-After` up to 30 seconds. `batch_create` and `batch_rerun` retry `500`, `502`, `503`, `504`, network errors and a `429` with `Retry-After`, always with the same `Idempotency-Key`, and never the job-limit `429`. On `BATCH_IDEMPOTENCY_CONFLICT` for the same request, check `batch_list` first. If the job is there, use its `job_id`: a `503` that arrived after the job was created leaves no stored answer, so that key returns the conflict every time. If it isn't, retry later with the same key, because a new key can create a second, billed job.

> [!NOTE]
>
> Schedules, webhooks, results exports, CSV inputs, open jobs (adding tasks over time), and task history are available through the [Batch API](https://docs.zenrows.com/batch/developer-guide-restapi.md) and the [SDKs](https://docs.zenrows.com/batch/sdk/python.md) only.

> [!NOTE]
>
> **`browser_batch` is a different tool.** It sequences several browser actions into one call against a browser session and has nothing to do with the Batch API. See [Available browser tools](#available-browser-tools).

### Browser tools

The `browser_*` tools give your AI assistant control of a cloud-hosted browser session powered by the [Zenrows Browser](https://docs.zenrows.com/browser-sessions/introduction.md). The browser comes with built-in residential proxies and anti-bot bypass.

The `browser_*` tools cover tasks that involve:

* Navigation across multiple pages in a single session
* Form fills, button clicks, and other element interactions
* Waiting for dynamically loaded content
* JavaScript execution in the browser context
* Cookies, local storage, and multi-tab management

Every browser workflow starts with `browser_navigate`, which opens a session and returns a `session_id`. All subsequent browser calls use this `session_id`. Call `browser_close` when done.

#### Available browser tools

> [accordion] Session
>
> | Tool | Description |
> | - | - |
> | `browser_navigate` | Open a browser session and navigate to a URL. Returns a `session_id` for subsequent calls. |
> | `browser_close` | Close a browser session and free all associated resources. |

> [accordion] Navigation
>
> | Tool | Description |
> | - | - |
> | `browser_go_back` | Navigate back in browser history. |
> | `browser_go_forward` | Navigate forward in browser history. |
> | `browser_reload` | Reload the current page. |

> [accordion] Interaction
>
> | Tool | Description |
> | - | - |
> | `browser_click` | Click an element using a CSS selector. |
> | `browser_hover` | Hover over an element to trigger hover effects. |
> | `browser_type` | Type text into an input field. Appends to existing content unless `clear_first` is set. |
> | `browser_fill` | Clear an input field and set its value. |
> | `browser_select_option` | Select an option from a `<select>` dropdown. |
> | `browser_check` | Check a checkbox or radio button. |
> | `browser_uncheck` | Uncheck a checkbox. |
> | `browser_focus` | Move focus to an element. |
> | `browser_press_key` | Press a keyboard key (e.g. `Enter`, `Tab`, `Escape`, `Control+a`). |
> | `browser_scroll` | Scroll the page in a given direction. |
> | `browser_drag` | Drag an element to a target element. |

> [accordion] Extraction
>
> | Tool | Description |
> | - | - |
> | `browser_get_accessibility_tree` | Get the page's accessibility tree as readable text. Call this after `browser_navigate` to understand page structure. |
> | `browser_get_url` | Get the current URL. |
> | `browser_get_title` | Get the page title. |
> | `browser_get_text` | Get the visible text of an element or the entire page. |
> | `browser_get_attribute` | Get the value of a specific attribute on an element. |
> | `browser_get_html` | Get the HTML source of an element or the full page. |
> | `browser_query_selector_all` | Find all elements matching a CSS selector. Returns text, HTML, and attributes. |

> [accordion] Visual
>
> | Tool | Description |
> | - | - |
> | `browser_screenshot` | Take a screenshot of the page or a specific element. |
> | `browser_generate_pdf` | Render the current page as a PDF. |

> [accordion] Wait
>
> | Tool | Description |
> | - | - |
> | `browser_wait_for_selector` | Wait until an element is stable in the DOM. Set `visible=true` to require visibility. |
> | `browser_wait_for_navigation` | Wait for a page navigation. Call this before the action that triggers navigation. |
> | `browser_wait` | Wait for a fixed duration in milliseconds. |

> [accordion] JavaScript
>
> | Tool | Description |
> | - | - |
> | `browser_evaluate` | Execute JavaScript in the browser context and return the result. |

> [accordion] Cookies
>
> | Tool | Description |
> | - | - |
> | `browser_get_cookies` | Get all cookies for the current page. |
> | `browser_set_cookies` | Set one or more cookies. |
> | `browser_clear_cookies` | Clear all cookies for the session. |

> [accordion] Storage
>
> | Tool | Description |
> | - | - |
> | `browser_get_local_storage` | Read one localStorage value. |
> | `browser_set_local_storage` | Write one localStorage value. |
> | `browser_clear_local_storage` | Clear all localStorage for the page. |

> [accordion] Tabs
>
> | Tool | Description |
> | - | - |
> | `browser_new_tab` | Open a new tab. Returns a `tab_id`. |
> | `browser_switch_tab` | Switch focus to a different tab. |

> [accordion] Batch
>
> | Tool | Description |
> | - | - |
> | `browser_batch` | Execute a sequence of browser actions in a single call for better performance. |

### The `account_usage` tool

The `account_usage` tool reports the current plan's credit allowance and how much of it is spent. It is free and does not consume a concurrency slot, so an assistant can call it safely before fanning out a large job, or after a request fails for credits.

Credit cost per request: 1 basic, 5 with `js_render`, 10 with `premium_proxy`, 25 with both.

`AUTH004` means the allowance is spent. It renews at the end of the billing period, so it is not a permanent block and should never be retried in a loop. An unclaimed agent account is the exception: it is not renewed, and once its first period ends, requests answer `AUTH005` until a person claims it. `AUTH006` is the concurrency limit, which is a different thing.

`AUTH014` means the API key reached one of its [credit caps](https://docs.zenrows.com/first-steps/api-key-credit-caps.md), while your other keys keep working. Raise or remove the cap, or wait for its window to reset, instead of retrying.

## Pricing

The Zenrows MCP server itself is free. There is no separate fee for connecting, listing tools, or using the integration. Each tool call is billed against your Zenrows subscription using the standard pricing of the underlying product:

* Calls to the `scrape` tool follow [Fetch pricing](https://docs.zenrows.com/fetch/api-reference.md#pricing).
* Calls to the `extract` tool use [Extract](https://docs.zenrows.com/extract/sdk-overview.md), which is currently free. Billing may apply later.
* `prepare_domain` and `prepared_domain_status` cost no credits. Each new domain `prepare_domain` submits uses one slot of your monthly allowance.
* Calls to `crawl_*` tools follow [Crawl pricing](https://docs.zenrows.com/crawl/endpoints.md#pricing). Each page a crawl fetches is one Fetch request.
* Calls to `batch_*` tools follow [Batch pricing](https://docs.zenrows.com/batch/introduction.md#pricing): the same credits as Fetch per successful task, plus tasks whose target answered `404` or `410`.
* Calls to `browser_*` tools follow [Zenrows Browser pricing](https://docs.zenrows.com/browser-sessions/introduction.md).
* `account_usage` is free and is not billed.

You can monitor real-time usage and remaining quota on your Analytics page.

[Open Analytics](https://app.zenrows.com/overview#performance)

## Troubleshooting

### Connection issues

| Issue | Cause | Solution |
| - | - | - |
| `424 Failed Dependency` or `401 Unauthorized` | Missing or invalid Bearer token | Confirm `Authorization: Bearer YOUR_ZENROWS_API_KEY` is set on every request. For OpenAI/Anthropic SDKs, use the `authorization` field on the MCP tool config. Verify your key is active in your dashboard |
| Tool list is empty when connecting to the remote URL | Authentication failed silently or wrong endpoint | Confirm the URL is exactly `https://mcp.zenrows.com/mcp` and the Bearer token is present and valid |
| The `scrape` tool is unavailable in your AI assistant (local STDIO) | Configuration not loaded yet | Restart your AI tool after saving the configuration file. For Claude Desktop, fully quit and reopen the application |
| API key is not recognized (local STDIO) | Key not replaced in configuration | Confirm `YOUR_ZENROWS_API_KEY` has been replaced with your actual key from the Zenrows dashboard. The value must have no extra spaces or surrounding quotation marks |
| A tool call fails with a signup error that says when to retry (local STDIO) | Auto-signup was refused: the cap of 3 accounts per network in 24 hours (CI runners and shared networks reach it first), signup turned off on the Zenrows side, or a network error. The server keeps running | Set `ZENROWS_API_KEY` to a key you already have and restart the server, or call the tool again after the time the error gives. In CI, see [Run the local server in CI](#run-the-local-server-in-ci) |
| A tool call returns a question instead of a result (local STDIO) | Signup asked one short question before creating the account | Answer it with the `account_signup_answer` tool (`{"answer": "..."}`), then retry the tool call. After too many questions or wrong answers from this network (`challenge_locked`), wait an hour or set `ZENROWS_API_KEY` |
| `This tool needs a Zenrows API key, and automatic signup is off (ZENROWS_AUTO_SIGNUP=false)` (local STDIO) | Auto-signup is off and no key is set | Set `ZENROWS_API_KEY` and restart the server, or remove `ZENROWS_AUTO_SIGNUP` to let the server create a Free account |
| Tools are listed but every call returns `401` (remote) | `tools/list` needs no key, tool calls do | Complete OAuth sign-in in your client, or send `Authorization: Bearer YOUR_ZENROWS_API_KEY`. A headless agent can create a key at the `agent_signup` URL in the `401` body |

[Manage API keys](https://app.zenrows.com/settings/api-keys)
[Open the dashboard](https://app.zenrows.com)

### Scraped content issues

If your AI is connecting and invoking tools correctly but the scraped content comes back missing, blocked, or incomplete, the issue is with the target page rather than the MCP connection.

Common causes include JavaScript-loaded content, anti-bot protection, geo-restrictions, and dynamic loading. See the [Fetch troubleshooting guide](https://docs.zenrows.com/fetch/troubleshooting/troubleshooting-guide.md) for fixes you can ask your AI to apply. For example, "scrape with JavaScript rendering enabled" or "use Premium Proxies."

## Example prompts

Once Zenrows MCP is connected, describe the task to your AI assistant in plain English and it handles the scraping automatically.

> [tab] Scrape tool
>
> ```text wrap theme={"theme":"css-variables"}
> Fetch https://www.scrapingcourse.com/javascript-rendering/. It uses React, so enable JavaScript rendering.
> ```
>
> ```text wrap theme={"theme":"css-variables"}
> Get the top 5 products from https://www.scrapingcourse.com/ecommerce/ and extract just the names and prices.
> ```
>
> ```text wrap theme={"theme":"css-variables"}
> Take a full-page screenshot of https://news.ycombinator.com.
> ```
>
> ```text wrap theme={"theme":"css-variables"}
> Scrape https://www.scrapingcourse.com/antibot-challenge. It's blocking requests. Use Adaptive Stealth Mode.
> ```

> [tab] Crawl tools
>
> ```text wrap theme={"theme":"css-variables"}
> Start a crawl at https://www.scrapingcourse.com/ecommerce/, keep the product URLs, and list them.
> ```
>
> ```text wrap theme={"theme":"css-variables"}
> Crawl https://www.scrapingcourse.com/ecommerce/ with HTML saved for each product page, wait until it finishes, then download the results.
> ```

> [tab] Browser tools
>
> ```text wrap theme={"theme":"css-variables"}
> Open https://www.scrapingcourse.com/ecommerce/ in a browser, type "hoodie" into the search field, press Enter, wait for the results to load, then extract all matching product names and prices.
> ```
>
> ```text wrap theme={"theme":"css-variables"}
> Navigate to https://scrapingcourse.com/ecommerce/, click on the first product, extract its full description and price, then go back and do the same for the second product.
> ```
>
> ```text wrap theme={"theme":"css-variables"}
> Open https://news.ycombinator.com in a browser, scroll down to load more stories, then extract all the headlines and links.
> ```

## Docs MCP server

These docs have their own MCP server at `https://docs.zenrows.com/mcp`. It searches and reads the Zenrows documentation, so an agent can look up parameters, error codes, and setup steps without leaving the conversation. It needs no API key and spends no credits.

The two servers do different jobs. Connect the Zenrows MCP server to fetch and extract web data; connect the docs MCP server to answer questions about Zenrows. Most agents benefit from both.

```json theme={"theme":"css-variables"}
{
  "mcpServers": {
    "zenrows-docs": {
      "url": "https://docs.zenrows.com/mcp"
    }
  }
}
```

The page menu at the top of every docs page also copies this URL. Name the server `zenrows-docs`, as above, so it sits next to the `zenrows` server rather than replacing it.

## Related resources

> [card] [Fetch Reference](https://docs.zenrows.com/fetch/api-reference.md)
>
> Full parameter reference for the `scrape` tool's underlying API.

> [card] [Zenrows Browser Introduction](https://docs.zenrows.com/browser-sessions/introduction.md)
>
> Learn more about the browser powering the `browser_*` tools.

> [card] [Zenrows Dashboard](https://app.zenrows.com)
>
> Monitor usage, manage your API key, and track quota.

> [card] [NPM Package](https://www.npmjs.com/package/@zenrows/mcp)
>
> `@zenrows/mcp` on npm for local STDIO deployments.

## Contributing

The Zenrows MCP server is open source. If you want to modify the server, fix a bug, or suggest an improvement, clone the [GitHub repository](https://github.com/ZenRows/zenrows-mcp) and run it locally:

```bash Bash theme={"theme":"css-variables"}
git clone https://github.com/ZenRows/zenrows-mcp
cd zenrows-mcp
npm install
cp .env.example .env   # Add your API key
npm run dev            # Run with .env loaded (requires Node.js 20.6+)
npm run build          # Compile to dist/
npm run inspect        # Open the MCP inspector UI
```

Pull requests and issues are welcome on the [GitHub repository](https://github.com/ZenRows/zenrows-mcp).


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