Skip to main content
Run ade extract to pull the fields you name from a document you have already parsed. A schema defines those fields, and the result comes back shaped like the schema, with a record of where each value was found. Each extraction is its own job item, and it references the parse it ran against rather than copying it. For a worked example, see the Quickstart. For the files a run saves, see CLI Concepts.

Choose Your Input

Extract from a completed parse, from a document path, or from Markdown you hold yourself.

Write a Schema

A schema is a JSON Schema object naming each field, its type, and a description the model uses to recognize it. Build one visually in the Playground and download the JSON, or write it by hand following Extraction Schema (JSON). Pass a file path or an inline JSON object. Changing a schema changes the run, so the next extraction is a new job item that consumes credits.

Require Every Field

By default, a field the model cannot extract is skipped, and the run reports schema_violation_error. Add --strict to make the request fail instead. For everything strict mode covers, see Extract Input Parameters.

Read the Result

The extracted values come back under extraction, shaped exactly like your schema. For the three-field schema in the Quickstart, that looks like this:

Check Which Values Are Grounded

A grounded value is one the model read from a specific place on the page. To see where a value came from, open the extraction in the viewer, which highlights the spot on the page each field was read from. Find, Crop, and View covers the viewer, local search, and cropping evidence images. Three signals tell you where each field stands.

Use the Values in a Script

Add --json to print the whole payload, then select the extraction key with a JSON tool such as jq.

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. For how the two lanes differ, see Sync vs Async. Set the tier per run:

Stale Extractions

An extraction points at the parse it ran against. If you later re-run that parse with --force, the extraction keeps its old result, and ade history list marks it stale. Re-run the extraction to update it.

Next Steps

Find, Crop, and View

Verify a value by searching the parse and cropping the evidence.

Scripting and Automation

Pipe extractions into other tools and run them unattended.