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

# Extract Data

> Pull specific fields from Markdown with a schema for high-volume, repeatable extraction.

export const dpt3 = 'DPT-3';

export const extractDpt3 = 'Extract';

export const parseDpt3 = 'Parse';

export const ade = 'Agentic Document Extraction';

Use the redesigned Extract v2 API to pull specific data fields from a document. You provide a Markdown representation of the document and a schema that defines the fields you want, and the API returns their values in a structured, predictable format along with the location of each value in the source Markdown.

The Extract API suits high-volume, repeatable workflows: use it when you need the same set of fields from many documents, such as invoice totals, contract dates, or form field values. Results stay consistent across documents with varying layouts because extraction is schema-driven.

## How Extract Works

The Extract API works on a Markdown string. That Markdown can come from any source: the [Parse v2 API](https://docs.landing.ai/api-reference/parse/ade-parse), a third-party parser, a web scraper, or a hand-authored document. For the best results, use Markdown produced by the Parse v2 API, which preserves the document's reading order and structure and links each extraction back to its parse job.

You pass the Markdown and a schema to the endpoint. The API returns the extracted values, per-field span grounding that points back into the source Markdown, and request metadata.

## Sample Request

Send the Markdown and a schema to the extract endpoint with a POST request. Replace `YOUR_API_KEY` with your [API key](./agentic-api-key) and `parse-output.md` with the path to your Markdown file.

```bash theme={null}
curl -X POST 'https://api.ade.landing.ai/v2/extract' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'markdown=@parse-output.md' \
  -F 'schema={"type":"object","properties":{"revenue":{"type":"string","description":"Q1 2024 revenue"}}}'
```

<Info>
  For the full request and response contract, see the [API reference](https://docs.landing.ai/api-reference/extract/ade-extract).
</Info>
