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

# Batch

> Process thousands of URLs reliably, in one job, and check the cost before you spend a single credit.

`zenrows batch` runs the same fetch or extract job across a list of URLs as a single, trackable job: submit once, then check status or collect results whenever you want.

```bash theme={null}
zenrows batch <estimate|create|status|results|cancel|wait|retry-failed> [flags]
```

`jobs.jsonl` is one JSON object per line, each with a `url` and optional per-line overrides (`js_render`, `premium_proxy`, `proxy_country`).

## Local, no key needed

```bash theme={null}
zenrows batch estimate jobs.jsonl
```

Validates the spec and estimates credit cost with no cloud call. Run this before submitting a real job.

## Cloud

```bash theme={null}
# Submit a job and wait for it to finish
zenrows batch create jobs.jsonl --wait

# Check status
zenrows batch status <job-id>

# Collect results (paginated)
zenrows batch results <job-id> --out results.jsonl

# Rerun only the failed tasks
zenrows batch retry-failed <job-id>

# Stop an in-flight run
zenrows batch cancel <job-id>
```

## Flags

`--json` (print structured output) works on every subcommand. The rest are subcommand-specific:

| Subcommand            | Flags                                                                                                                                           |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `create <file.jsonl>` | `--js-render`, `--premium-proxy`, `--proxy-country <cc>` (needs `--premium-proxy`), `--output <fmt>` (`markdown`\|`plaintext`\|`pdf`), `--wait` |
| `results <id>`        | `--status <successful\|failed\|all>`, `--out <file>`, `--download <dir>` (fetches each result body, plus a `_manifest.jsonl`)                   |
| `wait <id>`           | `--timeout <ms>`                                                                                                                                |
