Skip to main content
The extract.run() method pulls specific fields from documents as structured JSON. You define a JSON schema with the fields you need, and Extract returns values matching that schema.

Basic Usage


Method Signatures

Synchronous Extract

Asynchronous Extract

The runJob method returns a job_id that you can use with client.job.retrieve() to retrieve results.

Schema Definition

The instructions parameter requires a schema field with a JSON schema:

Array Extraction

For documents with repeating data (line items, transactions), enable array extraction:

Citations

Enable citations to get source locations for each extracted value:

Complete Example


Next Steps