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

# ADE Extract Jobs

> Extract structured data from a Markdown document according to a JSON schema, with character-span grounding into the source Markdown. Runs asynchronously and returns a job ID; use it to poll for status and retrieve the result once processing completes.



## OpenAPI

````yaml /dpt3/openapi-adev2.json post /v2/extract/jobs
openapi: 3.1.0
info:
  title: >-
    LandingAI Agentic Document Extraction (ADE) API v2: Parse and Extract
    Documents with DPT-3
  description: >-
    Parse and extract data from documents with DPT-3, a document parsing model
    from LandingAI, using the Agentic Document Extraction (ADE) v2 endpoints.
    Parse converts PDFs and images into structured Markdown and elements with
    per-element grounding (page numbers and coordinates) for RAG, search, and
    extraction pipelines. Extract pulls specific fields from parsed Markdown
    using a JSON schema. Documentation: https://docs.landing.ai
  version: 1.0.0
servers:
  - url: https://api.ade.landing.ai
    description: Production vision tools API
security: []
paths:
  /v2/extract/jobs:
    post:
      tags:
        - Extract
      summary: ADE Extract Jobs
      description: >-
        Extract structured data from a Markdown document according to a JSON
        schema, with character-span grounding into the source Markdown. Runs
        asynchronously and returns a job ID; use it to poll for status and
        retrieve the result once processing completes.
      operationId: v2-extract_create_job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: >-
                Input to V2ExtractOperationWorkflow.


                Provide the markdown as an inline ``markdown`` string, as a
                multipart file

                part named ``markdown`` (for large inputs — the gateway stages
                the upload

                internally), or via a public ``markdown_url``. Exactly one
                source must be

                supplied.
              properties:
                schema:
                  additionalProperties: true
                  description: >-
                    JSON Schema describing the fields to extract. The schema
                    must be an object type with a ``properties`` map of field
                    names to their types and descriptions.
                  example:
                    properties:
                      revenue:
                        description: Q1 revenue figure
                        type: string
                      summary:
                        description: Executive summary
                        type: string
                    type: object
                  title: Schema
                  type: object
                markdown:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: >-
                    Markdown string to extract from, or a multipart FILE part
                    carrying the markdown (large inputs — uploads are staged by
                    the gateway). Can come from any source — LandingAI parse
                    output, a third-party parser, or hand-authored text. When
                    the markdown was produced by ``POST /v2/parse``, it ends
                    with a ``<!-- doc_id=<id> -->`` comment that the service
                    reads automatically and echoes as ``metadata.doc_id``.
                  title: Markdown
                markdown_url:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: >-
                    URL to fetch the markdown from. Must be a public http(s)
                    URL; private/loopback IPs are rejected at submit time.
                  title: Markdown Url
                model:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: >-
                    The version of the model to use for extraction. Use
                    ``extract-latest`` to use the latest version.
                  title: Model
                options:
                  anyOf:
                    - $ref: '#/components/schemas/V2ExtractOptions'
                    - type: 'null'
                  default: null
                  description: Extraction options (``strict``). Omit for defaults.
                service_tier:
                  anyOf:
                    - enum:
                        - standard
                        - priority
                      type: string
                    - type: 'null'
                  description: >-
                    Async service tier. ``priority`` runs in the fast lane at
                    the sync billing rate; absent → ``standard``.
              required:
                - schema
              title: V2ExtractRequest
              type: object
          multipart/form-data:
            schema:
              type: object
              properties:
                schema:
                  additionalProperties: true
                  description: >-
                    JSON Schema describing the fields to extract. The schema
                    must be an object type with a ``properties`` map of field
                    names to their types and descriptions. JSON-serialized
                    string in form data.
                  example:
                    properties:
                      revenue:
                        description: Q1 revenue figure
                        type: string
                      summary:
                        description: Executive summary
                        type: string
                    type: object
                  title: Schema
                  type: object
                markdown:
                  anyOf:
                    - type: string
                      description: >-
                        Markdown string to extract from, or a multipart FILE
                        part carrying the markdown (large inputs — uploads are
                        staged by the gateway). Can come from any source —
                        LandingAI parse output, a third-party parser, or
                        hand-authored text. When the markdown was produced by
                        ``POST /v2/parse``, it ends with a ``<!-- doc_id=<id>
                        -->`` comment that the service reads automatically and
                        echoes as ``metadata.doc_id``.
                    - type: string
                      format: binary
                      description: File upload.
                markdown_url:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: >-
                    URL to fetch the markdown from. Must be a public http(s)
                    URL; private/loopback IPs are rejected at submit time.
                    JSON-serialized string in form data.
                  title: Markdown Url
                model:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: >-
                    The version of the model to use for extraction. Use
                    ``extract-latest`` to use the latest version.
                    JSON-serialized string in form data.
                  title: Model
                options:
                  anyOf:
                    - $ref: '#/components/schemas/V2ExtractOptions'
                    - type: 'null'
                  default: null
                  description: >-
                    Extraction options (``strict``). Omit for defaults.
                    JSON-serialized string in form data.
                service_tier:
                  anyOf:
                    - enum:
                        - standard
                        - priority
                      type: string
                    - type: 'null'
                  description: >-
                    Async service tier. ``priority`` runs in the fast lane at
                    the sync billing rate; absent → ``standard``.
              required:
                - schema
      responses:
        '202':
          description: Job created
          content:
            application/json:
              schema:
                type: object
                properties:
                  job_id:
                    type: string
                  status:
                    type: string
                    enum:
                      - pending
                      - processing
                      - completed
                      - failed
                  created_at:
                    type:
                      - string
                      - 'null'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            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"}}}'
        - lang: Python
          label: Python
          source: >-
            import json

            import requests


            url = 'https://api.ade.landing.ai/v2/extract/jobs'

            headers = {'Authorization': 'Bearer YOUR_API_KEY'}


            files = {'markdown': open('parse-output.md', 'rb')}

            data = {
                'schema': json.dumps({
                    'type': 'object',
                    'properties': {
                        'revenue': {'type': 'string', 'description': 'Q1 2024 revenue'}
                    }
                })
            }


            response = requests.post(url, headers=headers, files=files,
            data=data)

            print(response.json())
        - lang: JavaScript
          label: Node.js
          source: |-
            const axios = require('axios');
            const FormData = require('form-data');
            const fs = require('fs');

            const form = new FormData();
            form.append('markdown', fs.createReadStream('parse-output.md'));
            form.append('schema', JSON.stringify({
              type: 'object',
              properties: {
                revenue: { type: 'string', description: 'Q1 2024 revenue' }
              }
            }));

            axios.post('https://api.ade.landing.ai/v2/extract/jobs', form, {
              headers: { 'Authorization': 'Bearer YOUR_API_KEY', ...form.getHeaders() }
            })
              .then(response => console.log(response.data))
              .catch(error => console.error(error));
components:
  schemas:
    V2ExtractOptions:
      description: Extraction options (``docs/extract-v2-proposal.md`` → Options).
      properties:
        strict:
          default: false
          description: >-
            When ``true``, returns HTTP 422 if the schema contains fields the
            model cannot extract. When ``false`` (default), unsupported fields
            are skipped and extraction continues.
          title: Strict
          type: boolean
      title: V2ExtractOptions
      type: object

````