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

# Parse Documents

> Parse your own documents from the terminal: choose a local file or a URL, pick a service tier, and parse only the pages you need.

Run `ade parse` to turn a document into Markdown and a structured element tree, saved on your machine. Parse is the first step in most workflows: `ade find`, `ade crop`, and `ade view` all read a completed parse. Run [Extract](./extract) on a completed parse as well: that is what grounds each extracted value to a location on the page. Extract also accepts Markdown from other sources. The CLI covers Parse and Extract, so Classify, Split, and Section stay API-only.

For a worked example, see the [Quickstart](./quickstart). For the files a run saves, see [CLI Concepts](./concepts).

## Choose Your Input

Parse a local file with `-d`, or a URL the server fetches with `--document-url`. Pass exactly one of them. Parse accepts PDFs, images, and Office documents, and rejects encrypted PDFs, so decrypt those first. See [File Types](/dpt3/file-types).

A URL parse never gives the CLI the document bytes, so `ade view` and `ade crop` fetch a copy the first time you use them. Add `--keep-copy` to fetch it during the parse instead, which matters when a pre-signed URL may expire before then.

```bash theme={null}
ade parse -d invoice.pdf --tier standard
ade parse --document-url https://example.com/invoice.pdf --tier standard
ade parse --document-url https://example.com/invoice.pdf --tier standard --keep-copy
```

## Choose a Service Tier

Parse and Extract use async jobs, and each submitted job sends a service tier. The `standard` tier consumes half the credits and runs in a slower lane, which suits any run where you are not waiting on the result. The `priority` tier is the fast lane and consumes credits at the full rate.

The CLI uses the `priority` tier when you omit `--tier`. That differs from the API, where a job that sends no `service_tier` runs on `standard`. Pass `--tier standard` whenever you are not waiting on the result. Pass it also when you move a workload from the API to the CLI, to keep credit consumption the same.

For the rates, see [Credit Consumption](/dpt3/credit-consumption). For how the two lanes differ, see [Sync vs Async](/dpt3/sync-async).

Set the tier per run. Pass `priority` only when you are waiting on the result:

```bash theme={null}
ade parse -d invoice.pdf --tier priority
```

## Parse Only Some Pages

Pass 1-indexed page numbers and ranges to `--pages`. Parsing fewer pages consumes fewer credits.

```bash theme={null}
ade parse -d contract.pdf --pages 1,3-5 --tier standard
```

## Send Advanced Options

The `--options` flag passes a JSON object straight through to the API, for settings the dedicated flags do not cover, such as table format or inline Markdown. The server rejects unknown keys. For the full set, see [Parse Input](/dpt3/parse-input) and the [CLI Reference](./reference).

```bash theme={null}
ade parse -d report.pdf --tier standard --options '{"blocks": {"table": {"format": "markdown"}}}'
```

## Parse a Long Document

A document with more pages than your per-minute `priority` limit cannot run on the `priority` tier at all, because all `priority` work shares that limit. Run it as a `standard` job instead. See [Rate Limits](/dpt3/rate-limits#run-large-documents-as-async-jobs-on-the-standard-tier).

A long parse can also outlast the 600-second default wait. The job keeps running on the server, and re-running the same command reconnects to it rather than starting over. [CLI Concepts](./concepts) covers the wait budget, and [Scripting and Automation](./scripting-automation) shows how to submit now and collect later.

## Next Steps

<CardGroup cols={2}>
  <Card title="Extract Fields" icon="table-list" href="./extract">
    Run a schema against a parse and read the grounded result.
  </Card>

  <Card title="Find, Crop, and View" icon="magnifying-glass" href="./find-crop-view">
    Search a parse locally and turn matches into visual evidence.
  </Card>
</CardGroup>
