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

# Connect your AI agent to Zenrows

> Give Claude, Cursor, Codex or your own agent live web access through the Zenrows MCP server, the CLI and AI-ready docs.

Connect your AI assistant, coding agent or application to Zenrows once, and it can read any page, extract structured data, crawl a site, run large jobs and drive a real browser on your behalf. Every recipe in this Academy includes an **Ask your AI agent** prompt you can paste as soon as you're connected.

**Uses:** [Zenrows MCP server](https://docs.zenrows.com/mcp/overview.md), [Zenrows CLI](https://docs.zenrows.com/cli/introduction.md), Zenrows docs for agents

## Choose your path

| You use | Connect with | Time |
| - | - | - |
| Claude (web, desktop or mobile) | The Zenrows connector, signed in with OAuth | 1 minute |
| Claude Code, Cursor, VS Code, Windsurf, Codex, Gemini CLI | The MCP server, plus the CLI's skills for your agent | 2 minutes |
| Your own agent on an LLM API | The remote MCP server URL as a tool | 5 minutes |
| A coding agent writing Zenrows code | Zenrows docs as context (docs MCP server, `llms.txt`) | 1 minute |

You don't need an account to start. The local MCP server (`npx -y @zenrows/mcp`) creates a Free account with 5,000 credits for its first billing period on its first tool call, and the CLI the first time it runs without a key, and you can claim it later, keeping its key and 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). The remote server and the Claude connector sign you in with OAuth, where you can log in or create a Free account. To use an account you already have, copy your key from the [dashboard](https://app.zenrows.com/settings/api-keys).

## Connect Claude

Claude connects to the hosted Zenrows MCP server and signs you in with OAuth, so there is no key to copy. Follow [Claude](https://docs.zenrows.com/integrations/claude.md) for the web, desktop and mobile apps.

In Claude Code, install the Zenrows plugin. It adds the MCP server and the Zenrows skills that teach Claude which Zenrows tool fits each task:

```text Claude Code theme={"theme":"css-variables"}
/plugin install zenrows --marketplace ZenRows/claude-zenrows
```

Then run `/mcp`, select `zenrows` and sign in. To skip sign-in, add the local server instead. With no key, it creates a Free account for you:

```bash Terminal theme={"theme":"css-variables"}
claude mcp add zenrows -- npx -y @zenrows/mcp
```

To use a key you already have:

```bash Terminal theme={"theme":"css-variables"}
claude mcp add zenrows -e ZENROWS_API_KEY=YOUR_ZENROWS_API_KEY -- npx -y @zenrows/mcp
```

## Connect any MCP client

The remote server takes the same two settings in every MCP client: the server URL and your key as a Bearer token, or OAuth sign-in where the client supports it.

| Field | Value |
| - | - |
| Server URL | `https://mcp.zenrows.com/mcp` |
| Transport | Streamable HTTP |
| Header | `Authorization: Bearer YOUR_ZENROWS_API_KEY` |

Clients that run servers locally use the [`@zenrows/mcp`](https://www.npmjs.com/package/@zenrows/mcp) package instead. Leave the `env` block out to start without a key, or keep it to use yours:

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

Step-by-step guides with each client's config file path: [Cursor](https://docs.zenrows.com/integrations/cursor.md), [VS Code](https://docs.zenrows.com/integrations/vscode.md), [Windsurf](https://docs.zenrows.com/integrations/windsurf.md), [Zed](https://docs.zenrows.com/integrations/zed.md), [JetBrains](https://docs.zenrows.com/integrations/jetbrains.md), [OpenCode](https://docs.zenrows.com/integrations/opencode.md), [Claude Desktop](https://docs.zenrows.com/integrations/claude-desktop.md).

Both servers expose the same tools: `scrape` and `extract` for single pages, `crawl_*` for whole sites, `batch_*` for URL lists, and the `browser_*` tools for the Zenrows Browser. The local server also has `account_signup_answer`, which it needs only when it creates its own account. See the [tool reference](https://docs.zenrows.com/mcp/tool-reference.md).

## Set up your coding agent with the CLI

The [Zenrows CLI](https://docs.zenrows.com/cli/introduction.md) prepares a project for your coding agents in one command: it signs you in, prints the MCP config for each agent, and installs Zenrows skills, the playbooks that tell an agent which primitive and parameters fit a task.

```bash Terminal theme={"theme":"css-variables"}
npm install -g @zenrows/cli
zenrows init --agents claude-code,cursor,codex
```

To add one client later, `zenrows plugin install <client>` installs the MCP config and every skill together. Supported clients: `claude-code`, `cursor`, `vscode`, `windsurf`, `gemini`, `codex`, `opencode`, `generic`. See [Skills](https://docs.zenrows.com/cli/skills.md) and [MCP setup from the CLI](https://docs.zenrows.com/cli/mcp.md).

## Connect your own agent

Agents built on an LLM API take the remote server as a tool definition. With the OpenAI Responses API:

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

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

response = client.responses.create(
    model="gpt-5",
    tools=[
        {
            "type": "mcp",
            "server_label": "zenrows",
            "server_url": "https://mcp.zenrows.com/mcp",
            "authorization": os.environ["ZENROWS_API_KEY"],
            "require_approval": "never",
        }
    ],
    input="Read https://www.scrapingcourse.com/ecommerce/ and list the first five products with prices.",
)
print(response.output_text)
```

Framework guides: [Anthropic API](https://docs.zenrows.com/integrations/anthropic-claude-api.md), [Claude Agent SDK](https://docs.zenrows.com/integrations/claude-agent-sdk.md), [OpenAI Agents SDK](https://docs.zenrows.com/integrations/openai-agents-sdk.md), [Google ADK](https://docs.zenrows.com/integrations/google-adk.md), [LangChain](https://docs.zenrows.com/integrations/langchain.md), [LlamaIndex](https://docs.zenrows.com/integrations/llamaindex.md), [Mastra](https://docs.zenrows.com/integrations/mastra.md), [CrewAI](https://docs.zenrows.com/integrations/crewai.md). To build the agent loop yourself, follow [Build a research agent with live web data](https://docs.zenrows.com/academy/pipelines/research-agent.md).

> [!TIP]
>
> An agent with no Zenrows account has two options. The free one: run the local MCP server or the CLI with no key, and it creates a Free account to claim later. Or pay per request with no account at all: the agent buys and calls Fetch and Extract on its own. See [Agentic payments](https://docs.zenrows.com/first-steps/agentic-payments.md).

## Give your agent the Zenrows docs

When a coding agent writes Zenrows code, give it the docs as context so it uses exact parameter names:

* **Docs MCP server**: add `https://docs.zenrows.com/mcp` to your client. It gives the agent a `search_zenrows` tool over these docs.
* **`llms.txt`**: [docs.zenrows.com/llms.txt](https://docs.zenrows.com/llms.txt) indexes every page, and [llms-full.txt](https://docs.zenrows.com/llms-full.txt) holds the full text.
* **Any page as markdown**: add `.md` to a page URL, or use the **Copy page** menu at the top of every page to send it to Claude, ChatGPT or Perplexity.
* **OpenAPI**: Fetch, Extract and Batch are described in OpenAPI 3.1 at `https://www.zenrows.com/openapi.json`.

## Check the connection

Paste this prompt into your assistant:

```text theme={"theme":"css-variables"}
Use Zenrows to check my account usage, then read https://www.scrapingcourse.com/ecommerce/
and tell me how many products are on the first page.
```

Your agent calls `account_usage` and `scrape`, and answers with your plan usage and the product count. You can also confirm the server from a terminal: a `tools/list` call returns every Zenrows tool.

```bash cURL theme={"theme":"css-variables"}
curl https://mcp.zenrows.com/mcp \
  -H "Authorization: Bearer YOUR_ZENROWS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

## Example output

An illustrative reply to the prompt above. Your agent's wording and your usage figures differ:

```text theme={"theme":"css-variables"}
Your Zenrows account is active. You've used 1,240 of your plan's credits this period.

The first page of https://www.scrapingcourse.com/ecommerce/ lists 16 products,
starting with Abominable Hoodie ($69.00), Adrienne Trek Jacket ($57.00) and
Aeon Capri ($48.00).
```

## Troubleshooting

* **The assistant answers from memory instead of the page**: name the tool in the prompt, for example "Use Zenrows to read...".
* **`401` from the server**: the Bearer token isn't a valid Zenrows API key. Copy the key again from the [dashboard](https://app.zenrows.com/dashboard), with the `Bearer ` prefix.
* **Signup refused, too many new accounts from this network**: each network can create 3 accounts in 24 hours. Set `ZENROWS_API_KEY` to a key you already have. In CI, store the key as a secret; see [In CI](https://docs.zenrows.com/authentication.md#in-ci).
* **The local server doesn't start**: `npx` needs [Node.js](https://nodejs.org/) 20.6 or later on your `PATH`.

## Related recipes

> [card] [Prompts that put Zenrows MCP to work](https://docs.zenrows.com/academy/surfaces/mcp-prompts.md)
>
> A prompt library for every primitive and workflow.

> [card] [Let your AI assistant browse with Browser tools](https://docs.zenrows.com/academy/browser/ai-assistant-browsing.md)
>
> Drive the Zenrows Browser with plain-language instructions.

> [card] [Build a research agent with live web data](https://docs.zenrows.com/academy/pipelines/research-agent.md)
>
> Wire Zenrows into your own agent loop.

> [card] [Automate scraping from your terminal with the CLI](https://docs.zenrows.com/academy/surfaces/cli-workflows.md)
>
> Script fetch, extract, crawl and batch with the CLI.


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