> ## 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 and images, 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
ade parse --document-url https://example.com/invoice.pdf
ade parse --document-url https://example.com/invoice.pdf --keep-copy
```

## Choose a Service Tier

Parse and Extract use async jobs, and each submitted job sends a service tier. The CLI defaults to `priority`, the fast lane, which consumes credits at the full rate. The `standard` tier runs in a slower lane and consumes half the credits.

That default differs from the API, where a job that sends no `service_tier` runs on `standard`. If you are moving a workload from the API to the CLI, pass `--tier standard` to keep 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:

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

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

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