Extract structured data from a completed job using a typed schema. Define fields with types (string, number, boolean, date, array, object) and get back values with confidence scores and page citations.
This is the most powerful endpoint for agents — define what you want, and OkraPDF extracts it with citations.
vendor_name (string), total_amount (number), due_date (date) — and OkraPDF extracts structured values with confidence scores and page-level citations.The job must be completed before running schema extraction. Use GET /api/v1/jobs/{id} to check status first.| Type | Description | Example value |
|---|---|---|
string | Text value | "Acme Corporation" |
number | Numeric value | 1234.56 |
boolean | True/false | true |
date | Date string | "2025-12-31" |
array | List of values | ["item1", "item2"] |
object | Nested structure | {"name": "...", "amount": 100} |
best (default) — Returns the single best citation per field. Fast and concise.all — Returns every matching citation. Use when you need to verify or cross-reference.API key as Bearer token: Authorization: Bearer okra_xxx
Schema extraction results
completed Key-value map of extracted data (e.g. {"vendor_name": "Acme Corp", "total_amount": 1234.56})
Detailed results per field with confidence and citations