> ## 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 API (Fetch, Extract via extract=auto, and Batch) is 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. Use the spec for exact parameter names and types.

# 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](/mcp/overview), [Zenrows CLI](/cli/introduction), 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 need a [Zenrows account](https://app.zenrows.com/register) and, for API-key setups, your key from the [dashboard](https://app.zenrows.com/dashboard).

## 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](/integrations/claude) 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={"dark"}
/plugin install zenrows --marketplace ZenRows/claude-zenrows
```

Then run `/mcp`, select `zenrows` and sign in. To use an API key instead, add the local server:

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

## Connect any MCP client

Every MCP client takes the same two settings: the server URL and your key as a Bearer token.

| 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 <a href="https://www.npmjs.com/package/@zenrows/mcp" rel="nofollow">`@zenrows/mcp`</a> package instead:

```json JSON theme={"dark"}
{
  "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](/integrations/cursor), [VS Code](/integrations/vscode), [Windsurf](/integrations/windsurf), [Zed](/integrations/zed), [JetBrains](/integrations/jetbrains), [OpenCode](/integrations/opencode), [Claude Desktop](/integrations/claude-desktop).

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 Browser. See the [tool reference](/mcp/tool-reference).

## Set up your coding agent with the CLI

The [Zenrows CLI](/cli/introduction) 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={"dark"}
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](/cli/skills) and [MCP setup from the CLI](/cli/mcp).

## 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={"dark"}
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](/integrations/anthropic-claude-api), [Claude Agent SDK](/integrations/claude-agent-sdk), [OpenAI Agents SDK](/integrations/openai-agents-sdk), [Google ADK](/integrations/google-adk), [LangChain](/integrations/langchain), [LlamaIndex](/integrations/llamaindex), [Mastra](/integrations/mastra), [CrewAI](/integrations/crewai). To build the agent loop yourself, follow [Build a research agent with live web data](/academy/pipelines/research-agent).

<Tip>
  An agent that has no Zenrows account yet can buy and call Fetch and Extract on its own, paying per request. See [Agentic payments](/first-steps/agentic-payments).
</Tip>

## 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={"dark"}
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={"dark"}
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={"dark"}
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.
* **The local server doesn't start**: `npx` needs <a href="https://nodejs.org/" rel="nofollow">Node.js</a> 20.6 or later on your `PATH`.

## Related recipes

<CardGroup cols={2}>
  <Card title="Prompts that put Zenrows MCP to work" icon="message-chatbot" href="/academy/surfaces/mcp-prompts">
    A prompt library for every primitive and workflow.
  </Card>

  <Card title="Let your AI assistant browse with Browser tools" icon="click" href="/academy/browser/ai-assistant-browsing">
    Drive Zenrows Browser with plain-language instructions.
  </Card>

  <Card title="Build a research agent with live web data" icon="robot" href="/academy/pipelines/research-agent">
    Wire Zenrows into your own agent loop.
  </Card>

  <Card title="Automate scraping from your terminal with the CLI" icon="terminal" href="/academy/surfaces/cli-workflows">
    Script fetch, extract, crawl and batch with the CLI.
  </Card>
</CardGroup>


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