---
title: "ezgh ocr batches download"
description: "Save a finished batch's outputs: each document's, a zip of them all, or results.jsonl."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh ocr batches download

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh ocr batches download <batch> (--dir out/ | --zip out.zip | --jsonl out.jsonl) [flags]
```

Save a finished batch's outputs, streamed to disk (never printed on a terminal):

```text
--dir d      each document's output in d, named after the document (receipt.pdf's is
             receipt.txt, or receipt.json for json-layout), in the subdirectories it was
             uploaded from. An output already there is kept; one cut off (<name>.part) is
             resumed where it stopped. Documents that failed have no output.
--zip f      a zip of every output, named by document ID.
--jsonl f    results.jsonl: a line per document with its status, error and page counts.
```

`--zip` - and `--jsonl` - write to stdout, when it isn't a terminal. Files are readable only by you. Outputs are kept for 30 days after the batch finishes.

Part of [`ezgh ocr batches`](/cli/reference/ocr-batches).

## Examples

```sh
ezgh ocr batches download obt_k3f9a0x2m7qp --dir out/
ezgh ocr batches download march --zip march.zip
ezgh ocr batches download march --jsonl - | jq -r 'select(.status != "succeeded") | .name'
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--dir` | string |  | save each document's output in this directory |
| `--jsonl` | string |  | save results.jsonl to this file (- for stdout) |
| `--zip` | string |  | save a zip of every output to this file (- for stdout) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/ocr-batches-download/index.mdx
