Skip to main content

Basic Usage

Extract Options

Use ExtractOptions to configure extraction behavior:
OptionTypeDefaultDescription
page_schemastrRequiredJSON schema defining the fields to extract. Mutually exclusive with schema_id.
schema_idstrNoneID of a saved extraction schema (e.g. sch_k8Hx9mP2nQ4v). Mutually exclusive with page_schema.
schema_versionintNoneSchema version to pin to. Only valid with schema_id.
checkpoint_idstrNoneCheckpoint ID from a previous convert() call
modestr"fast"Parse mode: "fast", "balanced", "accurate". Controls document parsing quality.
output_formatstr"markdown"Output format: "markdown", "html", "json", "chunks"
save_checkpointboolFalseSave checkpoint for reuse with subsequent calls
max_pagesintNoneMaximum number of pages to process
page_rangestrNoneSpecific pages to process (e.g., "0-5,10"). For spreadsheets, filters by sheet index.
skip_cacheboolFalseSkip cached results, force reprocessing
webhook_urlstrNoneWebhook URL for completion notification
To control the extraction pipeline mode (fast vs. balanced), pass extraction_mode as a form field via the REST API directly — it is not yet exposed in ExtractOptions. See Balanced Extraction Mode for details on the two modes.

Checkpoint Reuse

Use checkpoints to avoid re-parsing a document when running extraction after conversion. First convert with save_checkpoint=True, then extract using the returned checkpoint_id:

Extraction Result

The result object contains the extracted data alongside standard conversion fields:

Async Usage

Next Steps

Extraction Recipe

Learn more about structured extraction patterns and best practices.

Document Segmentation

Segment documents into logical sections using schemas.

Document Conversion

Convert documents to Markdown, HTML, JSON, or chunks.

Batch Processing

Process multiple documents efficiently in parallel.