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())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"}}}'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));{
"job_id": "<string>",
"status": "pending",
"created_at": "<string>"
}{
"code": "<string>",
"message": "<string>"
}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.
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())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"}}}'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));{
"job_id": "<string>",
"status": "pending",
"created_at": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Body
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.
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.
{
"properties": {
"revenue": {
"description": "Q1 revenue figure",
"type": "string"
},
"summary": {
"description": "Executive summary",
"type": "string"
}
},
"type": "object"
}
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.
URL to fetch the markdown from. Must be a public http(s) URL; private/loopback IPs are rejected at submit time.
The version of the model to use for extraction. Use extract-latest to use the latest version.
Extraction options (strict). Omit for defaults.
Show child attributes
Show child attributes
URL to save the result to — e.g. a presigned S3 PUT URL. Async jobs only. When set, the finished result is delivered (HTTP PUT) to this URL and the completed job reports output_url instead of an inline result. Must be a public http(s) URL; private/loopback IPs are rejected at submit time. A presigned URL must stay valid until the job COMPLETES, not just past submit — an already-expired presign, or one with less than 15 minutes of validity remaining (the default floor; the 422 names the exact window required), is rejected at submit. Sign with credentials that outlive the expected job duration: a URL signed with temporary (assumed-role/session) credentials dies when that session expires, regardless of the URL's stated expiry.
Async service tier. priority runs in the fast lane at the sync billing rate; absent → standard.
standard, priority Response
Job created
The unique identifier for this v2-extract job. Format: extract-<26-character Crockford base32 ULID> ([0-9a-hjkmnp-tv-z]{26} tail). Opaque, server-minted, and stable for the life of the job — the same id is returned on the sync response, the async 202, and every poll. Treat it as opaque; older id formats remain accepted indefinitely and are never re-issued.
pending, processing, completed, failed Was this page helpful?