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

> Set the Markdown, schema, options, and model version when calling the Extract API.

The Extract API accepts Markdown, a schema that names the fields to pull, an optional model, and an optional `options` object. The same core fields work whether you [call it synchronously](https://docs.landing.ai/api-reference/extract/ade-extract.md) or create an [Extract Job](https://docs.landing.ai/dpt3/extract-async.md), which takes a few additional parameters of its own.

## Sample Request

Create an [Extract Job](https://docs.landing.ai/dpt3/extract-async.md) on the `standard` service tier, then collect the extraction from the finished job. Replace `YOUR_API_KEY` with your [API key](https://docs.landing.ai/dpt3/agentic-api-key.md) and `parse-output.md` with the path to your Markdown file.

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

```python Python theme={null}
from pathlib import Path
from landingai_ade import LandingAIADE

client = LandingAIADE()

job = client.v2.extract_jobs.create(
    markdown=Path("parse-output.md").read_text(),
    schema={
        "type": "object",
        "properties": {
            "revenue": {"type": "string", "description": "Q1 2024 revenue"}
        },
    },
    service_tier="standard",
)
done = client.v2.extract_jobs.wait(job.job_id)
print(done.result.extraction)
```

```typescript TypeScript theme={null}
import fs from "fs";
import LandingAIADE from "landingai-ade";

const client = new LandingAIADE();

const job = await client.v2.extractJobs.create({
  markdown: fs.readFileSync("parse-output.md", "utf8"),
  schema: {
    type: "object",
    properties: {
      revenue: { type: "string", description: "Q1 2024 revenue" },
    },
  },
  service_tier: "standard",
});
const done = await client.v2.extractJobs.wait(job.job_id);
console.log((done.result as LandingAIADE.V2ExtractResult).extraction);
```

## Parameters

| Parameter | Required | Description |
| - | - | - |
| `markdown` | Conditional | The Markdown content to extract from, sent as a string or an uploaded file. Provide either `markdown` or `markdown_url`. |
| `markdown_url` | Conditional | A public URL that the API fetches the Markdown from. Provide either `markdown` or `markdown_url`. |
| `schema` | Yes | The JSON Schema that defines the fields to extract. See [Extraction Schema (JSON)](https://docs.landing.ai/dpt3/ade-extract-schema-json.md). |
| `model` | No | The extraction model version. Defaults to `extract-latest`, which runs the `extract-20260903` snapshot. See [Model Version](#model-version). |
| `options` | No | A JSON object of optional settings. See [Options](#options). |
| `service_tier` | No | Extract Jobs only: the tier the job runs on, either `standard` or `priority`. Defaults to `standard`. See [Choose a Service Tier](https://docs.landing.ai/dpt3/extract-async.md#choose-a-service-tier). |
| `output_save_url` | No | Extract Jobs only: a presigned URL the job delivers its output to, instead of returning it in `result`. See [Save Extraction Output to a URL](https://docs.landing.ai/dpt3/extract-async.md#save-extraction-output-to-a-url). |

## Provide the Markdown

The Extract API works on a Markdown string. That Markdown can come from any source: the [Parse API](https://docs.landing.ai/api-reference/parse/ade-parse.md), a third-party parser, a web scraper, or a hand-authored document.

For the best results, use Markdown produced by the Parse API. Parse output preserves the document's reading order and structure, which improves extraction accuracy, and it embeds a `<!-- doc_id=<id> -->` comment that Extract reads automatically and echoes back as `metadata.doc_id`. This links each extraction to the parse job it came from.

Pass the Markdown in one of two ways:

* `markdown`: the Markdown content, sent as a string or an uploaded file.
* `markdown_url`: a public URL that the API fetches the Markdown from.

Provide exactly one of these fields per request.

## Set the Extraction Schema

Set the extraction schema in the `schema` field. The schema is a JSON object with a `properties` map that names each field and describes what to extract. The schema must meet specific format and property requirements. For detailed guidance, see [Extraction Schema (JSON)](https://docs.landing.ai/dpt3/ade-extract-schema-json.md).

## Options

Pass optional settings in the `options` field as a JSON object. The Extract API accepts two options:

| Option | Type | Default | Description |
| - | - | - | - |
| `strict` | boolean | `false` | Controls how the API handles schema content it cannot honor. When `false` (default), fields the model cannot extract are skipped, unsupported schema keywords are ignored, and extraction continues. When `true`, the API returns a `422` error in either case. |
| `grounding` | boolean | `true` | Controls whether to run the grounding stage. When `true` (default), each value in `extraction_metadata` includes `ranges` locating it in the source Markdown. When `false`, the request skips grounding to complete faster, and each `ranges` is `null`. Turn it off when you only need extracted values, not [range grounding](https://docs.landing.ai/dpt3/extract-response.md#grounding-with-ranges). |

To enable strict mode, add it to your request. In cURL, pass the `options` form field; the client libraries expose it as the top-level `strict` parameter:

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

```python Python highlight={14} theme={null}
from pathlib import Path
from landingai_ade import LandingAIADE

client = LandingAIADE()

job = client.v2.extract_jobs.create(
    markdown=Path("parse-output.md").read_text(),
    schema={
        "type": "object",
        "properties": {
            "revenue": {"type": "string", "description": "Q1 2024 revenue"}
        },
    },
    strict=True,
    service_tier="standard",
)
done = client.v2.extract_jobs.wait(job.job_id)
print(done.result.extraction)
```

```typescript TypeScript highlight={14} theme={null}
import fs from "fs";
import LandingAIADE from "landingai-ade";

const client = new LandingAIADE();

const job = await client.v2.extractJobs.create({
  markdown: fs.readFileSync("parse-output.md", "utf8"),
  schema: {
    type: "object",
    properties: {
      revenue: { type: "string", description: "Q1 2024 revenue" },
    },
  },
  strict: true,
  service_tier: "standard",
});
const done = await client.v2.extractJobs.wait(job.job_id);
console.log((done.result as LandingAIADE.V2ExtractResult).extraction);
```

To skip grounding, set it the same way. In cURL, pass the `options` form field; the client libraries expose it as the top-level `grounding` parameter:

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

```python Python highlight={14} theme={null}
from pathlib import Path
from landingai_ade import LandingAIADE

client = LandingAIADE()

job = client.v2.extract_jobs.create(
    markdown=Path("parse-output.md").read_text(),
    schema={
        "type": "object",
        "properties": {
            "revenue": {"type": "string", "description": "Q1 2024 revenue"}
        },
    },
    grounding=False,
    service_tier="standard",
)
done = client.v2.extract_jobs.wait(job.job_id)
print(done.result.extraction)
```

```typescript TypeScript highlight={14} theme={null}
import fs from "fs";
import LandingAIADE from "landingai-ade";

const client = new LandingAIADE();

const job = await client.v2.extractJobs.create({
  markdown: fs.readFileSync("parse-output.md", "utf8"),
  schema: {
    type: "object",
    properties: {
      revenue: { type: "string", description: "Q1 2024 revenue" },
    },
  },
  grounding: false,
  service_tier: "standard",
});
const done = await client.v2.extractJobs.wait(job.job_id);
console.log((done.result as LandingAIADE.V2ExtractResult).extraction);
```

## Model Version

Requests that omit `model`, or that send `extract-latest` or `extract`, run on the `extract-20260903` snapshot. To pin to a specific snapshot, supply it in the `model` form field. The resolved version is returned in `metadata.model_version`.

Use the `-latest` alias for development or when you want continuous improvements; pin to a dated snapshot for production workloads where consistent results matter.

| Value | Behavior |
| - | - |
| `extract-latest` | The default. Runs `extract-20260903`. |
| `extract` | Alias for `extract-latest`. Runs `extract-20260903`. |
| `extract-20260903` | The snapshot generated on September 3, 2026. For a number, integer, or enum field that your schema allows to be `null` (for example, `"type": ["number", "null"]`), it returns `null` when the document has no value for the field. See [Return Null for Number, Integer, and Enum Fields](https://docs.landing.ai/dpt3/ade-extract-schema-json.md#return-null-for-number-integer-and-enum-fields). |
| `extract-20260819` | The snapshot generated on August 19, 2026. It was the default until October 16, 2026. Pin it to keep the results you got before that date. |
| `extract-20260710` | The snapshot generated on July 10, 2026. |

To set the model, add the `model` field to your request:

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

```python Python highlight={14} theme={null}
from pathlib import Path
from landingai_ade import LandingAIADE

client = LandingAIADE()

job = client.v2.extract_jobs.create(
    markdown=Path("parse-output.md").read_text(),
    schema={
        "type": "object",
        "properties": {
            "revenue": {"type": "string", "description": "Q1 2024 revenue"}
        },
    },
    model="extract-latest",
    service_tier="standard",
)
done = client.v2.extract_jobs.wait(job.job_id)
print(done.result.extraction)
```

```typescript TypeScript highlight={14} theme={null}
import fs from "fs";
import LandingAIADE from "landingai-ade";

const client = new LandingAIADE();

const job = await client.v2.extractJobs.create({
  markdown: fs.readFileSync("parse-output.md", "utf8"),
  schema: {
    type: "object",
    properties: {
      revenue: { type: "string", description: "Q1 2024 revenue" },
    },
  },
  model: "extract-latest",
  service_tier: "standard",
});
const done = await client.v2.extractJobs.wait(job.job_id);
console.log((done.result as LandingAIADE.V2ExtractResult).extraction);
```

> [!NOTE]
>
> Some snapshots have been superseded: a newer snapshot replaced them, and they no longer appear in the [Model Version](#model-version) table. If you pin a superseded snapshot, your requests still succeed. The API runs the snapshot that replaced it (for example, `extract-20260630` runs `extract-20260710`) and reports that version in `metadata.model_version`. Update pinned code to a value from the table.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.