Skip to main content
A completed request can return success=False and error without raising an SDK exception. Check result.success before reading the output.SDK 0.6.0 and later downloads signed regional results automatically. Upgrade older SDKs or use the REST polling and download flow.

Basic Usage

Extract Options

Use ExtractOptions to configure extraction behavior:
Since SDK 0.6.0, ExtractOptions.mode defaults to None and is omitted from the request. The API uses accurate parsing for balanced and accurate extraction, and fast parsing for fast extraction; Turbo skips parsing. Set extraction_mode explicitly when you need repeatable behavior across teams. See Balanced and Accurate Extraction 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:
extraction_schema_json is JSON text on this result. A pipeline’s extract step result (get_step_result()) is a dict, and there extraction_schema_json is already a dict. extract() reuses a checkpoint only when you pass checkpoint_id, so its checkpoint_reused is always None. Only segment() reuses one on its own.

Confidence Scores

Only extraction_mode="fast" produces confidence scores, and they arrive after the extraction itself. extract() returns as soon as the extraction is complete, so extraction_score_average is usually still None. To wait for the scores, poll the same request again with get_result():
extraction_score_average can be set only when the status is complete. A complete status with no scored fields, such as when every field came back empty, has no average. With partial, some fields have a _score in extraction_schema_json but there’s no average; with failed, there are no scores. A missing score means no score, not zero confidence. See Confidence scoring for the _score 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.