Skip to main content
POST
Extract Structured Data

Authorizations

X-API-Key
string
header
required

Cookies

wos-session
string
datalab_active_team
string

Body

multipart/form-data
file_url
string | null

Optional file URL. Provide either file/file_url or checkpoint_id.

checkpoint_id
string | null

Checkpoint ID from a previous /convert request (with save_checkpoint=true). Skips re-parsing when provided.

page_schema
string | null

The JSON schema for structured extraction. Generate with Pydantic .model_dump_json() or write manually. Must contain a 'properties' key. Mutually exclusive with schema_id.

schema_id
string | null

ID of a saved extraction schema (e.g. sch_k8Hx9mP2nQ4v). Mutually exclusive with page_schema.

schema_version
integer | null

Version number of the schema to use. Only valid with schema_id. If omitted, the latest version is used.

mode
string | null

Output mode for parsing (only used when providing a file, not a checkpoint). Defaults to 'accurate' for balanced and accurate extraction, and 'fast' for fast extraction. Turbo skips parsing.

max_pages
integer | null

The maximum number of pages to process.

page_range
string | null

The page range to process, comma separated like 0,5-10,20.

output_format
string | null

The output format for the parsed text alongside extraction results. Defaults to 'markdown'.

save_checkpoint
boolean
default:false

Save a checkpoint after processing for future extraction/segmentation calls.

skip_cache
boolean
default:false

Skip the cache and re-run.

webhook_url
string | null

Optional webhook URL to call when the request is complete.

processing_location
string | null

Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile.

extraction_mode
string | null

Extraction mode: 'turbo' (fastest; image-only, no OCR/citations/verification, returns JSON only), 'fast' (low latency and cost), 'balanced' (high accuracy with per-field verification, reasoning, and citations; slower), or 'accurate' (highest accuracy — same as balanced but runs the strongest extraction model; slowest and most expensive). Defaults to 'balanced'.

word_bboxes
boolean | null

Return per-word bounding boxes and confidences from the parse. Billed as an add-on when the pass runs. Ignored when reusing a checkpoint — the parse has already happened, so enable it on the request that created the checkpoint.

citation_granularity
string | null

Granularity of the citations attached to each extracted field. 'block' (default) returns block ids ('/page/0/Text/5'). 'phrase' (open beta; the format may change) returns an object per citation: block, page, the matching text, its offset and length within that block's text, the match score (1.0 when the text matches up to case, spacing, number or date format, lower for a close match), and a bbox in page pixels (the same space as block bboxes) when the phrase has a box of its own. A value that cannot be located in its block keeps an object with only block and page. Phrase citations cost nothing extra. Not available in turbo mode, which produces no citations.

file
file | null

Input PDF, word document, powerpoint, or image file, uploaded as multipart form data. Images must be png, jpg, or webp format.

Response

Successful Response

request_id
string
required

The ID of the request. This ID can be used to check the status of the request.

request_check_url
string
required

The URL to check the status of the request and get results.

success
boolean
default:true

Whether the request was successful.

error
string | null

If the request was not successful, this will contain an error message.

versions

A dictionary of the versions of the libraries used in the request.

checkpoint_reused
boolean | null

True when this run automatically reused a checkpoint from a previous run of the same file, so the conversion step is not re-billed. Absent/None otherwise.