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

# Troubleshooting

> Fix a failed run: read its trace and find the exact next step for every error code.

Every `fetch`/`extract`/`batch` run writes a secret-free record under `.zenrows/runs/<run-id>/`. Read it before reflexively adding more flags.

```bash theme={"theme":"css-variables"}
zenrows trace inspect <run-id>    # raw run record
zenrows trace explain <run-id>    # what happened and why
zenrows trace replay <run-id>     # print the equivalent command to re-run
zenrows trace export <run-id>     # JSON, for piping elsewhere
```

## Error codes

| Code | When it happens | Next action |
| - | - | - |
| `AUTH_MISSING` | No API key is configured and auto-signup is off (`--no-signup`, or `auto_signup: false` in `.zenrows/policy.json`). With auto-signup on, the first cloud command creates a Free account instead | `zenrows login --api-key <your-key>` or set `ZENROWS_API_KEY`, or drop `--no-signup` to let the CLI create a Free account. See [Agent signup and unclaimed accounts](https://docs.zenrows.com/authentication.md#agent-signup-and-unclaimed-accounts) |
| `SIGNUP_RATE_LIMITED` | Auto-signup was refused: this network already created 3 accounts in the last 24 hours. CI runners and shared networks reach it first | Use a key you already have: `zenrows login --api-key <your-key>` or `ZENROWS_API_KEY`. Otherwise wait for the 24-hour window to move on. In CI, see [Run the CLI in CI](https://docs.zenrows.com/cli/introduction.md#run-the-cli-in-ci) |
| `SIGNUP_CHALLENGE` | Signup asked one short question before creating the account. The message carries the question; with `--json`, `error.challenge` has `id`, `question` and `expires_at` | Run `zenrows signup --answer "<answer>"`, then re-run the original command. A wrong or expired answer prints a new question. See [Answer the signup question](https://docs.zenrows.com/authentication.md#answer-the-signup-question) |
| `SIGNUP_CHALLENGE_LOCKED` | Too many questions or wrong answers from this network | Wait the time the error gives (an hour), or use a key you already have: `zenrows login --api-key <your-key>` or `ZENROWS_API_KEY` |
| `SIGNUP_CHALLENGE_MISSING` | `zenrows signup --answer` ran with no pending question, or the question expired | Re-run the original command to get a new question |
| `SIGNUP_FAILED` | The signup endpoint answered with an error, or no signup endpoint was reachable | `zenrows login --api-key <your-key>` (or `ZENROWS_API_KEY`), or wait a moment and retry |
| `AUTH_INVALID` | Zenrows rejected the key | Re-check the key in the dashboard, then `zenrows login --api-key <your-key>` again |
| `DOMAIN_FORBIDDEN` | The target domain is blocked by Zenrows policy | Permanent, the same request fails again with any flags. Use a different source |
| `FETCH_EMPTY_RESPONSE` | The page returned no usable content | Retry with `--js-render` and a `--wait-for <selector>` or `--wait <ms>` |
| `PARAM_CONFLICT_AUTO_MANUAL` | `zenrows fetch` or `zenrows extract` got `--js-render` / `--premium-proxy` without `--manual`. `zenrows batch create` accepts those flags on their own | Drop those flags to keep the automatic default, or add `--manual` |
| `PARAM_PROXY_COUNTRY_REQUIRES_PREMIUM` | `--proxy-country` used in manual mode without `--premium-proxy` | Add `--premium-proxy` (10 credits), or drop `--manual` to use auto mode |
| `POLICY_MAX_CREDITS_EXCEEDED` | The **account** has spent its credit allowance | Credits renew at the end of the billing period: run `zenrows usage` for the date. To carry on now, add credits/upgrade in the dashboard. An unclaimed agent account is not renewed and has no owner who can sign in to the dashboard: run `zenrows account claim` (or open its claim link) so a person claims it, then upgrade. Claiming adds no credits to a running period; once the first period has ended, claiming starts a new one |
| `POLICY_LIMIT_EXCEEDED` | The run exceeds a cap in the local `policy.json`. The CLI ships with `max_pages_per_run` 10,000 and `max_credits_per_run` 250,000, and Batch tasks in Adaptive Stealth Mode count at their 25-credit maximum. A workspace created by an earlier version keeps its caps (1,000 and 10,000) | Run the `zenrows policy set` command the error prints, split the run, or raise the cap (for example `zenrows policy set max_pages_per_run 100000` and `zenrows policy set max_credits_per_run 2500000`). With `--manual` and only the options the sites need, a basic request counts 1 credit, `--js-render` 5, `--premium-proxy` 10 |
| `KEY_CREDIT_CAP_REACHED` | The API key reached one of its [credit caps](https://docs.zenrows.com/first-steps/api-key-credit-caps.md), on a request or during a Batch run (`server_code` `api_key_cap_reached`) | Raise or remove the cap in the dashboard, or wait for it to reset. For a Batch run, then `zenrows batch rerun <job-id>` |
| `BATCH_QUOTA_EXCEEDED` | The account already runs its active Batch and Crawl jobs (3 by default), holds 5 scheduled jobs, or an open job reached 100,000 tasks | Wait for a job to finish, or `zenrows batch delete <job-id> --yes` one you no longer need. More credits don't help |
| `BATCH_FAILED` | A Batch run ended `failed` for a reason other than credits, subscription or a key cap, or the API answered with another error | Read `server_code` and the message, then `zenrows batch rerun <job-id>` |
| `BATCH_RUN_IN_PROGRESS` | A rerun while the job's latest run is still going | `zenrows batch wait <job-id>`, or `zenrows batch cancel <job-id>`, then rerun |
| `BATCH_NO_MATCHING_TASKS` | A partial rerun found no task with the statuses asked for | Nothing to rerun; use `--all` for a full rerun |
| `BATCH_RERUN_WINDOW_EXPIRED` | A partial rerun more than 10 days after the run it retries started | `zenrows batch rerun <job-id> --all` |
| `BATCH_RESULT_EXPIRED` | `batch content` on a result past its 14-day retention | Rerun the job to scrape the page again |
| `BATCH_NOT_FOUND` | No such job or task on this account, or it was deleted | Check the id with `zenrows batch list` |
| `POLICY_BROWSER_DISABLED` | `zenrows browser` used after browser sessions were turned off in `policy.json` | `zenrows policy set allow_browser true`, only once Fetch/Extract genuinely can't do the job |
| `MCP_CLIENT_UNSUPPORTED` | `--client` isn't a known MCP client id | Use one of the supported client ids, or generate a generic config snippet |
| `CAPABILITY_UNAVAILABLE` | The command's backend capability isn't enabled yet | Use a local spec/validation path, or escalate to Protected Fetch/Extract |


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