> ## 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`.

# MCP tool reference

> Every tool the Zenrows MCP server exposes, with read/write classification, authentication, credits and limits, error codes, and full parameters for scrape, extract, prepare_domain, prepared_domain_status, and account_usage.

This page lists the tools the [Zenrows MCP server](https://docs.zenrows.com/mcp/overview.md) exposes at `https://mcp.zenrows.com/mcp`, how each one is classified, and the parameters, outputs, and errors of the `scrape`, `extract`, `prepare_domain`, `prepared_domain_status`, and `account_usage` tools. For setup, see [Remote MCP server](https://docs.zenrows.com/mcp/overview.md#remote-mcp-server).

## Tool classification

The classification comes from each tool's MCP annotations. **Read-only** tools retrieve information and change nothing. **Write** tools change state: a job on your account, a file of crawl results, or a page inside a cloud browser session. Only `batch_cancel`, `batch_delete`, `crawl_stop`, `browser_clear_cookies`, `browser_clear_local_storage`, `browser_set_cookies`, `browser_set_local_storage`, `browser_evaluate` and `browser_batch` are annotated as destructive, because they can delete or overwrite data on your account or in a browser session.

| Tool | Classification | Acts on |
| - | - | - |
| `scrape` | Read-only | Reads one web page |
| `extract` | Read-only | Reads one web page |
| `prepare_domain` | Write | Submits a domain for Extract preparation, using one slot of your monthly allowance |
| `prepared_domain_status` | Read-only | Reads a domain's preparation and your allowance |
| `account_usage` | Read-only | Reads your plan and credit usage |
| `batch_create` | Write | Creates a Batch job on your account |
| `batch_status` | Read-only | Reads a Batch job |
| `batch_results` | Read-only | Reads a Batch job's results |
| `batch_content` | Read-only | Reads one Batch task's result |
| `batch_list` | Read-only | Lists the Batch jobs on your account |
| `batch_wait` | Read-only | Reads a Batch job until it finishes |
| `batch_cancel` | Write, destructive | Stops a running Batch job |
| `batch_pause` | Write | Pauses a running Batch job |
| `batch_resume` | Write | Resumes a paused Batch job |
| `batch_rerun` | Write | Starts a new run of a Batch job |
| `batch_delete` | Write, destructive | Deletes a Batch job and its results |
| `crawl_create` | Write | Creates a crawl on your account |
| `crawl_get` | Read-only | Reads a crawl |
| `crawl_results` | Read-only | Reads a crawl's results |
| `crawl_content` | Read-only | Reads one kept page's HTML |
| `crawl_download` | Write | Saves a crawl's results to a file |
| `crawl_list` | Read-only | Lists the crawls on your account |
| `crawl_stop` | Write, destructive | Stops a running crawl |
| `crawl_wait` | Read-only | Reads a crawl until it finishes |
| `browser_navigate` | Write | Opens a cloud browser session or navigates it |
| `browser_close` | Write | Closes a cloud browser session |
| `browser_go_back` | Write | Navigates a browser session back |
| `browser_go_forward` | Write | Navigates a browser session forward |
| `browser_reload` | Write | Reloads the page in a browser session |
| `browser_click` | Write | Clicks an element on the page |
| `browser_hover` | Write | Hovers over an element on the page |
| `browser_type` | Write | Types text into an element |
| `browser_fill` | Write | Sets the value of an input |
| `browser_select_option` | Write | Selects an option in a dropdown |
| `browser_check` | Write | Checks a checkbox |
| `browser_uncheck` | Write | Unchecks a checkbox |
| `browser_focus` | Write | Focuses an element |
| `browser_press_key` | Write | Presses a key on the page |
| `browser_scroll` | Write | Scrolls the page |
| `browser_drag` | Write | Drags an element |
| `browser_evaluate` | Write, destructive | Runs JavaScript on the page |
| `browser_set_cookies` | Write, destructive | Sets cookies in a browser session |
| `browser_clear_cookies` | Write, destructive | Clears cookies in a browser session |
| `browser_get_local_storage` | Read-only | Reads a local storage value in a browser session |
| `browser_set_local_storage` | Write, destructive | Writes a local storage value in a browser session |
| `browser_clear_local_storage` | Write, destructive | Clears local storage in a browser session |
| `browser_new_tab` | Write | Opens a tab in a browser session |
| `browser_switch_tab` | Write | Switches tabs in a browser session |
| `browser_batch` | Write, destructive | Runs several browser actions in one call |
| `browser_get_accessibility_tree` | Read-only | Reads the page's accessibility tree |
| `browser_get_url` | Read-only | Reads the current URL |
| `browser_get_title` | Read-only | Reads the page title |
| `browser_get_text` | Read-only | Reads text content |
| `browser_get_attribute` | Read-only | Reads an element attribute |
| `browser_get_html` | Read-only | Reads HTML |
| `browser_query_selector_all` | Read-only | Reads all elements matching a selector |
| `browser_screenshot` | Read-only | Captures a screenshot |
| `browser_generate_pdf` | Read-only | Renders the page as a PDF |
| `browser_wait_for_selector` | Read-only | Waits for an element |
| `browser_wait_for_navigation` | Read-only | Waits for a navigation to finish |
| `browser_wait` | Read-only | Waits a fixed time |
| `browser_get_cookies` | Read-only | Reads cookies |

Descriptions of the Crawl, Batch, and browser tools are in [Crawl tools](https://docs.zenrows.com/mcp/overview.md#crawl-tools), [Batch tools](https://docs.zenrows.com/mcp/overview.md#batch-tools), and [Browser tools](https://docs.zenrows.com/mcp/overview.md#browser-tools).

## Authentication and permissions

The server accepts either of these on every request:

* **OAuth 2.1 with PKCE (S256).** Clients discover the authorization server through `https://mcp.zenrows.com/.well-known/oauth-protected-resource` and can register dynamically at `https://mcp.zenrows.com/register`. The user signs in at `app.zenrows.com`, or creates a free account, and approves access.
* **API key as a Bearer token**, in the `Authorization` header. See [Authentication](https://docs.zenrows.com/mcp/overview.md#authentication).

There is one scope, `api`. The access token is the account's API key, so every tool runs with the same permissions as that key. To revoke access, rotate the API key in the dashboard: calls with the old key then fail with `AUTH003`.

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

## Credits and limits

The Free plan includes 5,000 credits that renew every billing period (an unclaimed agent account gets only its first period; see [Agent signup and unclaimed accounts](https://docs.zenrows.com/authentication.md#agent-signup-and-unclaimed-accounts)); paid plans include larger allowances. Each request costs credits depending on the site and the options used. See [Pricing](https://docs.zenrows.com/mcp/overview.md#pricing) for how each tool is billed and [Plans and pricing](https://docs.zenrows.com/first-steps/pricing.md) for plan allowances.

When the credits run out, requests fail with `AUTH004` until the allowance renews, or the account tops up or upgrades. An unclaimed agent account is the exception: it is not renewed, and once its first period ends, requests fail with `AUTH005` until a person claims it. A key can also have its own [credit cap](https://docs.zenrows.com/first-steps/api-key-credit-caps.md), which returns `AUTH014`.

Each plan also limits how many requests run at once. Requests over that limit fail with `AUTH006`. `account_usage` does not count toward the concurrency limit.

## Errors

A failed tool call returns a tool result with `isError: true`. The text of the result is JSON with the error `code`, a `message` that names the fix, and `detail`, which carries the Zenrows API error it came from.

For [`REQS007`](https://docs.zenrows.com/api-error-codes#REQS007) from `extract`, the MCP server adds three fields of its own:

* `reason`: `domain_not_prepared`, `page_not_recognised` or `domain_not_enabled`. The server reads the API's `reason` field when the API sends one. Until the API release that adds that field, the server derives `reason` from the API error's title. Either way, the tool result always carries it.
* `next_tool`: present only for `domain_not_prepared`. It holds the `prepare_domain` call to make, with its arguments.
* `then`: present only for `domain_not_prepared`. It says what to do after that call.

Any `extract` error also carries a `note` when the call sent the deprecated `fallback_autoparse: true`. The note says the option was ignored: `extract` never retries with `autoparse`.

| Code | Meaning | Retry? |
| - | - | - |
| [`AUTH003`](https://docs.zenrows.com/api-error-codes#AUTH003) | The API key is not valid, for example after it was rotated | No. Reconnect with a valid key |
| [`AUTH004`](https://docs.zenrows.com/api-error-codes#AUTH004) | The account's credit allowance is spent | No. Wait for the renewal or upgrade. An unclaimed agent account is not renewed: have a person claim it |
| [`AUTH005`](https://docs.zenrows.com/api-error-codes#AUTH005) | The account is no longer valid. On an unclaimed agent account, its first billing period has ended | No. On an unclaimed agent account, give a person its `claimUrl`; claiming starts a new billing period. Otherwise see [`AUTH005`](https://docs.zenrows.com/api-error-codes#AUTH005) |
| [`AUTH006`](https://docs.zenrows.com/api-error-codes#AUTH006) | Too many requests running at once | Yes, after current requests finish |
| [`AUTH014`](https://docs.zenrows.com/api-error-codes#AUTH014) | This API key reached its credit cap | No. Raise the cap or wait for its window |
| [`REQS007`](https://docs.zenrows.com/api-error-codes#REQS007) | Extract refused the page (`extract` in `auto` mode). `reason` says why | Depends on `reason`. `domain_not_prepared`: call `prepare_domain`, then retry once it is ready. `page_not_recognised`: try another page of the site, or retry once in a few minutes; do not prepare again. `domain_not_enabled`: no; use `mode: "css"` |

The full list is in [API error codes](https://docs.zenrows.com/api-error-codes.md).

### Retries in `scrape` and `extract`

`scrape` and `extract` send each call once by default. On the local server (MCP server 2.19.0 or later), set the `ZENROWS_FETCH_RETRIES` environment variable to make them retry, up to that many times, a call the API did not serve. The server reads it once, at startup; see [Local MCP server](https://docs.zenrows.com/mcp/overview.md#local-mcp-server). The hosted server retries only if its operator sets it. With retries turned on:

1. They retry a `429`, `502`, `503` or `504`, and a failure to connect: a refused connection, a name that did not resolve, an unreachable network or host, or a connect timeout.
2. They return every other status or error at once, because the API may have received the request.
3. Before each retry they wait the API's `Retry-After` in whole seconds, from 250 ms to 30 s. Otherwise they wait a random time from 250 ms up to 1 s before the first retry, 2 s before the second, and so on, capped at 30 s.
4. A retry starts only if its wait ends within 50 s of the first request, because many MCP clients cancel a tool call at about 60 s. A running request is not cut short, so a retry that starts near 50 s can still run past the client's timeout.
5. When the client's cancel reaches the server, the wait ends and no new request is sent.
6. Each retry writes one line to the server's stderr.

The [`batch_*`](https://docs.zenrows.com/mcp/overview#batch-tools) and `crawl_*` tools keep their own retry rules. [`prepare_domain`](#prepare_domain) and [`prepared_domain_status`](#prepared_domain_status) never retry: a `429` from them means the monthly allowance is used up, and a `503` means preparation is unavailable right now.

## `scrape`

Fetches one web page and returns its content as Markdown, plain text, HTML, a PDF, a screenshot, or JSON. Built on [Fetch](https://docs.zenrows.com/fetch/api-reference.md).

Requests use [Adaptive Stealth Mode](https://docs.zenrows.com/fetch/features/adaptive-stealth-mode.md) (`mode=auto`) by default: Zenrows enables JavaScript rendering and premium proxies only when a page needs them, and you pay only for the configuration that succeeds. Setting `js_render` or `premium_proxy` forces that configuration and turns Adaptive Stealth Mode off.

**Classification:** read-only. Makes no changes to the account or to the site it reads.

### Parameters

**url** `string` *required*

The URL of the page to fetch.

**js\_render** `boolean` (default: false)

Force rendering in a headless browser on every request. Turns Adaptive Stealth Mode off, which already renders when a page needs it.

**premium\_proxy** `boolean` (default: false)

Force residential proxies on every request. Costs more credits and turns Adaptive Stealth Mode off, which already switches to them when a site blocks.

**proxy\_country** `string`

Two-letter country code (ISO 3166-1 alpha-2), for example `US`. Works with Adaptive Stealth Mode. Without it (when `js_render` is set), it requires `premium_proxy`.

**response\_type** `string` (default: markdown)

One of `markdown`, `plaintext`, `pdf`, or `html`. Ignored when `autoparse`, `css_extractor`, `outputs`, or a screenshot option is set.

**autoparse** `boolean`

Return the page's main data as JSON.

**css\_extractor** `string`

JSON object mapping field names to CSS selectors, for example `{"title":"h1","price":".price"}`. Returns JSON.

**outputs** `string`

Comma-separated data types to return as JSON: `emails`, `headings`, `links`, `menus`, `images`, `videos`, `audios`, or `*` for all.

**wait\_for** `string`

CSS selector to wait for before capturing. Requires `js_render`. Without it, including in Adaptive Stealth Mode, it may be ignored.

**wait** `integer`

Milliseconds to wait after the page loads, up to 30000. Requires `js_render`. Without it, including in Adaptive Stealth Mode, it may be ignored.

**js\_instructions** `string`

JSON array of browser actions to run before capturing, for example `[{"click":"#load-more"},{"wait":1000}]`. Works with Adaptive Stealth Mode, which then renders the page in a browser, or with `js_render`.

**screenshot** `boolean`

Return a screenshot of the visible part of the page instead of text.

**screenshot\_fullpage** `boolean`

Return a screenshot of the full page.

**screenshot\_selector** `string`

Return a screenshot of the element matching this CSS selector.

### Output

The page content in the requested format: text for `markdown`, `plaintext`, and `html`; JSON for `autoparse`, `css_extractor`, and `outputs`; an image for screenshots.

### Example

```json Call theme={"theme":"css-variables"}
{ "name": "scrape", "arguments": { "url": "https://example.com" } }
```

```text Result theme={"theme":"css-variables"}
This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.
```

## `extract`

Returns a page as structured JSON fields instead of a full page body, for example a product's name and price. Built on [Extract](https://docs.zenrows.com/extract/introduction.md).

In its default `auto` mode, `extract` works on any prepared domain. The list of prepared domains is available from [`GET /v1/extract/domains`](https://docs.zenrows.com/extract/endpoints#which-domains-extract-serves). On a domain not prepared yet it returns [`REQS007`](https://docs.zenrows.com/api-error-codes#REQS007) with `reason` `domain_not_prepared` and the [`prepare_domain`](#prepare_domain) arguments in `next_tool`. It never falls back to `autoparse`.

Like `scrape`, every mode uses [Adaptive Stealth Mode](https://docs.zenrows.com/fetch/features/adaptive-stealth-mode.md) (`mode=auto`) by default. Setting `js_render` or `premium_proxy` forces that configuration and turns it off.

**Classification:** read-only. Makes no changes to the account or to the site it reads.

### Parameters

**url** `string` *required*

The URL of the page to extract from.

**mode** `string` (default: auto)

`auto` uses site-tailored extraction (`extract=auto`) on prepared domains. `autoparse` (deprecated) returns general-purpose JSON on any domain. `css` uses your own selectors from `css_extractor`.

**css\_extractor** `string`

Required when `mode` is `css`. JSON object mapping field names to CSS selectors.

**js\_render** `boolean`

Force rendering in a headless browser on every request. Turns Adaptive Stealth Mode off.

**premium\_proxy** `boolean`

Force residential proxies on every request. Costs more credits and turns Adaptive Stealth Mode off.

**proxy\_country** `string`

Two-letter country code. Works with Adaptive Stealth Mode. Without it (when `js_render` is set, or `mode_auto` is `false`), it requires `premium_proxy`.

**mode\_auto** `boolean` (default: true)

Adaptive Stealth Mode (`mode=auto`) is on by default. Set `false` to send a plain request without it.

**wait\_for** `string`

CSS selector to wait for before extracting. Requires `js_render`. Without it, including in Adaptive Stealth Mode, it may be ignored.

**wait** `integer`

Milliseconds to wait after the page loads, up to 30000. Requires `js_render`. Without it, including in Adaptive Stealth Mode, it may be ignored.

**fallback\_autoparse** `boolean`

Deprecated. Has no effect: `extract` never falls back to `autoparse`. It is still accepted so older prompts keep working; when it is `true`, the result carries a `note` saying it was ignored. On [`REQS007`](https://docs.zenrows.com/api-error-codes#REQS007) with `reason` `domain_not_prepared`, call [`prepare_domain`](#prepare_domain) instead.

**include\_html** `boolean` (default: false)

`auto` mode only. Also return the page HTML, which is most of the response size.

### Output

A JSON object:

| Field | Type | Description |
| - | - | - |
| `ok` | boolean | `true` when the extraction ran |
| `mode` | string | The mode that produced the data |
| `empty` | boolean | `true` when no field came back with a value, at any depth, for example `{ "listings": [{ "title": null }] }` |
| `data` | object or array | The extracted fields, or `null` |
| `html` | string | The page HTML. Present only with `include_html: true` |
| `note` | string | Present only when the call sent the deprecated `fallback_autoparse: true`. Says it was ignored and why |

### Example

```json Call theme={"theme":"css-variables"}
{ "name": "extract", "arguments": { "url": "https://www.amazon.com/s?k=airpods+pro" } }
```

```json Result (trimmed) theme={"theme":"css-variables"}
{
  "ok": true,
  "mode": "auto",
  "empty": false,
  "data": {
    "pagination": { "current_page": 1, "total_pages": 20 },
    "results": [
      { "position": 1, "asin": "B0FQFB8FMG", "price": 179, "list_price": 249 }
    ]
  }
}
```

## `prepare_domain`

Prepares a domain so `extract` in `auto` mode works on it. Use it when `extract` returns [`REQS007`](https://docs.zenrows.com/api-error-codes#REQS007) with `reason` `domain_not_prepared`. Built on [`POST /v1/extract/prepared-domains`](https://docs.zenrows.com/extract/endpoints#getting-a-domain-prepared).

It returns at once and never waits for the preparation, which takes a few minutes and costs no credits. Each new domain uses one slot of your monthly allowance. A domain already being prepared returns its current status instead of submitting again; a domain already prepared returns `status: "ready"` at once with `already_prepared: true` and uses no slot.

Do not call it for `reason` `page_not_recognised`: that domain is already prepared, and preparing it again does not change the answer.

**Classification:** write. Submits a preparation on your account.

### Parameters

**domain** `string` *required*

The host to prepare, such as `shop.example.com`. A URL is accepted. A leading `www.` is dropped; any other subdomain is prepared on its own.

**example\_urls** `string[]` *required*

1 to 5 full URLs of real pages on that host that you want to extract. 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. Several page types can share the 5 (e.g. 3 product pages + 2 search-result pages).

**idempotency\_key** `string`

Resending the same key with the same body returns the original submission.

### Output

The domain's status record, as [`GET /v1/extract/prepared-domains/{domain}`](https://docs.zenrows.com/extract/endpoints#getting-a-domain-prepared) returns it, plus `next`: the step to take now. `already_prepared` or `already_in_progress` is `true` when nothing new was submitted.

Errors name the next step: `invalid_argument` (fix the domain or the URLs), `out_of_allowance` (no slots left this month; use `mode: "css"`), and `overloaded` or `disabled` (retry in a few minutes; don't retry in a loop).

### Example

```json Call theme={"theme":"css-variables"}
{ "name": "prepare_domain", "arguments": { "domain": "example.com", "example_urls": ["https://www.example.com/products/a", "https://www.example.com/products/b", "https://www.example.com/products/c"] } }
```

```json Result theme={"theme":"css-variables"}
{
  "domain": "example.com",
  "status": "preparing",
  "state": "received",
  "submitted_at": "2026-10-15T09:21:01Z",
  "updated_at": "2026-10-15T09:21:01Z",
  "next": "Preparation is running and takes a few minutes. Call prepared_domain_status again in about 30 seconds; call extract once status is ready."
}
```

## `prepared_domain_status`

Reads how far a domain submitted with `prepare_domain` has got, and your monthly allowance. Free.

**Classification:** read-only. Makes no changes to the account.

### Parameters

**domain** `string` *required*

The domain passed to `prepare_domain`.

### Output

The domain's status record (`status` is `preparing`, `ready` or `failed`; `state` is the current step; `failure` explains a failed one), `allowance` (`used`, `limit`, `remaining`, `month`), and `next`: the step to take now. Poll about every 30 seconds, and call `extract` again once `status` is `ready`. A domain this account never submitted returns `not_found`.

## `account_usage`

Returns the current plan, its credit allowance, how much is spent, and when the period renews. Free, and does not count toward the concurrency limit.

**Classification:** read-only. Makes no changes to the account.

### Parameters

None.

### Output

The account's subscription details as JSON, passed through from the Zenrows API. Fields include `status`, `period_starts_at`, `period_ends_at`, `usage_credits`, `credit_limit`, `usage_percent`, `plan` (name, products, concurrency limit), and `api_key.caps`.

### Example

```json Call theme={"theme":"css-variables"}
{ "name": "account_usage", "arguments": {} }
```

```json Result (trimmed) theme={"theme":"css-variables"}
{
  "status": "TRIALING",
  "period_ends_at": "2026-11-05T14:25:43Z",
  "usage_credits": 0,
  "credit_limit": 5000,
  "usage_percent": 0,
  "plan": {
    "name": "Free",
    "products": { "api": { "concurrency": { "limit": 5, "usage": 0 } } }
  },
  "api_key": { "caps": [] }
}
```


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