v1

latestOpenAPI 3.1.02026-07-222064110.7 KB
Extract

ADE Extract

Extract structured data from a Markdown document according to a JSON schema, with character-span grounding into the source Markdown. Runs synchronously and returns the result inline.

post/v2/extract

Request body

schemaobject required

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.

markdownstring nullable

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.

markdown_urlstring nullable

URL to fetch the markdown from. Must be a public http(s) URL; private/loopback IPs are rejected at submit time.

modelstring nullable

The version of the model to use for extraction. Use extract-latest to use the latest version.

Example request

{
  "schema": {
    "properties": {
      "revenue": {
        "description": "Q1 revenue figure",
        "type": "string"
      },
      "summary": {
        "description": "Executive summary",
        "type": "string"
      }
    },
    "type": "object"
  }
}

Response

v2-extract result

extractionobject required

Extracted values conforming to the request schema.

extraction_metadataobject required

Per-field metadata, mirroring extraction with leaf values replaced by {value, ranges} objects.

markdownstring required

Echoed input markdown.

schema_violation_errorstring nullable

Set when options.strict is false and the schema contained fields the model could not extract — the extraction is partial.

warningsobject[]

Non-fatal warnings emitted during extraction.