Skip to content

Extract

Create Extract Job
client.Extract.New(ctx, params) (*ExtractV2Job, error)
POST/api/v2/extract
List Extract Jobs
client.Extract.List(ctx, query) (*PaginatedCursor[ExtractV2Job], error)
GET/api/v2/extract
Get Extract Job
client.Extract.Get(ctx, jobID, query) (*ExtractV2Job, error)
GET/api/v2/extract/{job_id}
Delete Extract Job
client.Extract.Delete(ctx, jobID, body) (*ExtractDeleteResponse, error)
DELETE/api/v2/extract/{job_id}
Cancel Extract Job
client.Extract.Cancel(ctx, jobID, body) (*ExtractV2Job, error)
POST/api/v2/extract/{job_id}/cancel
Validate Extraction Schema
client.Extract.ValidateSchema(ctx, body) (*ExtractV2SchemaValidateResponse, error)
POST/api/v2/extract/schema/validation
Generate Extraction Schema
client.Extract.GenerateSchema(ctx, params) (*ConfigurationCreate, error)
POST/api/v2/extract/schema/generate
ModelsExpand Collapse
type ExtractConfiguration struct{…}

Extract configuration combining parse and extract settings.

DataSchema map[string, *ExtractConfigurationDataSchemaUnion]

JSON Schema defining the fields to extract. Validate with the /schema/validate endpoint first.

One of the following:
type ExtractConfigurationDataSchemaMap map[string, any]
type ExtractConfigurationDataSchemaArray []any
string
float64
bool
CiteSources boolOptional

Include citations in results. Returned under extract_metadata (auto-included when set). Text-level on turbo (no bounding boxes).

ConfidenceScores boolOptional

Include confidence scores in results. Returned under extract_metadata (auto-included when set).

DisableCache boolOptional

Disable reuse and storage of Extract results

ExtractionTarget ExtractConfigurationExtractionTargetOptional

Granularity of extraction: per_doc returns one object per document, per_page returns one object per page, per_table_row returns one object per table row

One of the following:
const ExtractConfigurationExtractionTargetPerDoc ExtractConfigurationExtractionTarget = "per_doc"
const ExtractConfigurationExtractionTargetPerPage ExtractConfigurationExtractionTarget = "per_page"
const ExtractConfigurationExtractionTargetPerTableRow ExtractConfigurationExtractionTarget = "per_table_row"
MaxPages int64Optional

Maximum number of pages to process. Omit for no limit.

minimum1
ParseConfigID stringOptional

Saved parse configuration ID to control how the document is parsed before extraction. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.

ParseTier ExtractConfigurationParseTierOptional

Parse tier to use before extraction. Defaults to the extract tier if not specified. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.

One of the following:
const ExtractConfigurationParseTierAgentic ExtractConfigurationParseTier = "agentic"
const ExtractConfigurationParseTierAgenticPlus ExtractConfigurationParseTier = "agentic_plus"
const ExtractConfigurationParseTierCostEffective ExtractConfigurationParseTier = "cost_effective"
const ExtractConfigurationParseTierFast ExtractConfigurationParseTier = "fast"
SheetNames []stringOptional

Optional worksheet names to extract when spreadsheet_mode is on. Overrides target_pages for spreadsheets; omit to extract every sheet. Names are matched exactly (case-sensitive) — pass them as a list, e.g. [“Sheet 1”, “My Sheet”].

SpreadsheetMode boolOptional

Beta. When true, extract structured data directly from a spreadsheet workbook (.xlsx/.xls/.csv) — the agent reads cells straight from the workbook instead of the standard document path. Off by default (spreadsheets keep the standard path). Requires the agentic_plus tier. Billed on the standard per-page extract rate, against a page count derived from workbook size. Citations and confidence scores are not available in this mode.

SystemPrompt stringOptional

Custom system prompt to guide extraction behavior

TargetPages stringOptional

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

Tier ExtractConfigurationTierOptional

Extract tier: cost_effective (5 credits/page), agentic (15 credits/page), agentic_plus (50 credits/page), or turbo (35 credits/page)

One of the following:
const ExtractConfigurationTierAgentic ExtractConfigurationTier = "agentic"
const ExtractConfigurationTierAgenticPlus ExtractConfigurationTier = "agentic_plus"
const ExtractConfigurationTierCostEffective ExtractConfigurationTier = "cost_effective"
const ExtractConfigurationTierTurbo ExtractConfigurationTier = "turbo"
Version stringOptional

Use ‘latest’ for the latest release for the selected tier or a date string (YYYY-MM-DD format) to pin to the nearest release at or before that date. Job responses always report the concrete resolved version the job runs, fixed at job creation; saved configurations keep the value as provided.

type ExtractJobMetadata struct{…}

Extraction metadata.

FieldMetadata ExtractedFieldMetadataOptional

Metadata for extracted fields including document, page, and row level info.

DocumentMetadata map[string, *ExtractedFieldMetadataDocumentMetadataUnion]Optional

Per-field metadata keyed by field name from your schema. Scalar fields (e.g. vendor) map to a FieldMetadataEntry with citation and confidence. Array fields (e.g. items) map to a list where each element contains per-sub-field FieldMetadataEntry objects, indexed by array position. Nested objects contain sub-field entries recursively.

One of the following:
type ExtractedFieldMetadataDocumentMetadataMap map[string, any]
type ExtractedFieldMetadataDocumentMetadataArray []any
string
float64
bool
PageMetadata []map[string, *ExtractedFieldMetadataPageMetadataUnion]Optional

Per-page metadata when extraction_target is per_page

One of the following:
type ExtractedFieldMetadataPageMetadataMap map[string, any]
type ExtractedFieldMetadataPageMetadataArray []any
string
float64
bool
RowMetadata []map[string, *ExtractedFieldMetadataRowMetadataUnion]Optional

Per-row metadata when extraction_target is per_table_row

One of the following:
type ExtractedFieldMetadataRowMetadataMap map[string, any]
type ExtractedFieldMetadataRowMetadataArray []any
string
float64
bool
ParseJobID stringOptional

Reference to the ParseJob ID used for parsing

ParseTier stringOptional

Parse tier used for parsing the document

type ExtractJobUsage struct{…}

Extraction usage metrics.

NumPagesBilled int64Optional

Number of effective pages billed

NumPagesExtracted int64Optional

Number of pages extracted

type ExtractV2Job struct{…}

An extraction job.

ID string

Unique job identifier (job_id)

CreatedAt Time

Creation timestamp

formatdate-time
FileInput string

File ID or parse job ID that was extracted

ProjectID string

Project this job belongs to

Status string

Current job status.

  • PENDING — queued, not yet started
  • RUNNING — actively processing
  • COMPLETED — finished successfully
  • FAILED — terminated with an error
  • CANCELLED — cancelled by user
UpdatedAt Time

Last update timestamp

formatdate-time
Configuration ExtractConfigurationOptional

Extract configuration combining parse and extract settings.

DataSchema map[string, *ExtractConfigurationDataSchemaUnion]

JSON Schema defining the fields to extract. Validate with the /schema/validate endpoint first.

One of the following:
type ExtractConfigurationDataSchemaMap map[string, any]
type ExtractConfigurationDataSchemaArray []any
string
float64
bool
CiteSources boolOptional

Include citations in results. Returned under extract_metadata (auto-included when set). Text-level on turbo (no bounding boxes).

ConfidenceScores boolOptional

Include confidence scores in results. Returned under extract_metadata (auto-included when set).

DisableCache boolOptional

Disable reuse and storage of Extract results

ExtractionTarget ExtractConfigurationExtractionTargetOptional

Granularity of extraction: per_doc returns one object per document, per_page returns one object per page, per_table_row returns one object per table row

One of the following:
const ExtractConfigurationExtractionTargetPerDoc ExtractConfigurationExtractionTarget = "per_doc"
const ExtractConfigurationExtractionTargetPerPage ExtractConfigurationExtractionTarget = "per_page"
const ExtractConfigurationExtractionTargetPerTableRow ExtractConfigurationExtractionTarget = "per_table_row"
MaxPages int64Optional

Maximum number of pages to process. Omit for no limit.

minimum1
ParseConfigID stringOptional

Saved parse configuration ID to control how the document is parsed before extraction. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.

ParseTier ExtractConfigurationParseTierOptional

Parse tier to use before extraction. Defaults to the extract tier if not specified. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.

One of the following:
const ExtractConfigurationParseTierAgentic ExtractConfigurationParseTier = "agentic"
const ExtractConfigurationParseTierAgenticPlus ExtractConfigurationParseTier = "agentic_plus"
const ExtractConfigurationParseTierCostEffective ExtractConfigurationParseTier = "cost_effective"
const ExtractConfigurationParseTierFast ExtractConfigurationParseTier = "fast"
SheetNames []stringOptional

Optional worksheet names to extract when spreadsheet_mode is on. Overrides target_pages for spreadsheets; omit to extract every sheet. Names are matched exactly (case-sensitive) — pass them as a list, e.g. [“Sheet 1”, “My Sheet”].

SpreadsheetMode boolOptional

Beta. When true, extract structured data directly from a spreadsheet workbook (.xlsx/.xls/.csv) — the agent reads cells straight from the workbook instead of the standard document path. Off by default (spreadsheets keep the standard path). Requires the agentic_plus tier. Billed on the standard per-page extract rate, against a page count derived from workbook size. Citations and confidence scores are not available in this mode.

SystemPrompt stringOptional

Custom system prompt to guide extraction behavior

TargetPages stringOptional

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

Tier ExtractConfigurationTierOptional

Extract tier: cost_effective (5 credits/page), agentic (15 credits/page), agentic_plus (50 credits/page), or turbo (35 credits/page)

One of the following:
const ExtractConfigurationTierAgentic ExtractConfigurationTier = "agentic"
const ExtractConfigurationTierAgenticPlus ExtractConfigurationTier = "agentic_plus"
const ExtractConfigurationTierCostEffective ExtractConfigurationTier = "cost_effective"
const ExtractConfigurationTierTurbo ExtractConfigurationTier = "turbo"
Version stringOptional

Use ‘latest’ for the latest release for the selected tier or a date string (YYYY-MM-DD format) to pin to the nearest release at or before that date. Job responses always report the concrete resolved version the job runs, fixed at job creation; saved configurations keep the value as provided.

ConfigurationID stringOptional

Saved extract configuration ID used for this job, if any

ErrorMessage stringOptional

Error details when status is FAILED

ExtractMetadata ExtractJobMetadataOptional

Extraction metadata.

FieldMetadata ExtractedFieldMetadataOptional

Metadata for extracted fields including document, page, and row level info.

DocumentMetadata map[string, *ExtractedFieldMetadataDocumentMetadataUnion]Optional

Per-field metadata keyed by field name from your schema. Scalar fields (e.g. vendor) map to a FieldMetadataEntry with citation and confidence. Array fields (e.g. items) map to a list where each element contains per-sub-field FieldMetadataEntry objects, indexed by array position. Nested objects contain sub-field entries recursively.

One of the following:
type ExtractedFieldMetadataDocumentMetadataMap map[string, any]
type ExtractedFieldMetadataDocumentMetadataArray []any
string
float64
bool
PageMetadata []map[string, *ExtractedFieldMetadataPageMetadataUnion]Optional

Per-page metadata when extraction_target is per_page

One of the following:
type ExtractedFieldMetadataPageMetadataMap map[string, any]
type ExtractedFieldMetadataPageMetadataArray []any
string
float64
bool
RowMetadata []map[string, *ExtractedFieldMetadataRowMetadataUnion]Optional

Per-row metadata when extraction_target is per_table_row

One of the following:
type ExtractedFieldMetadataRowMetadataMap map[string, any]
type ExtractedFieldMetadataRowMetadataArray []any
string
float64
bool
ParseJobID stringOptional

Reference to the ParseJob ID used for parsing

ParseTier stringOptional

Parse tier used for parsing the document

ExtractResult ExtractV2JobExtractResultUnionOptional

Extracted data conforming to the data_schema. Returns a single object for per_doc, or an array for per_page / per_table_row.

One of the following:
type ExtractV2JobExtractResultMap map[string, ExtractV2JobExtractResultMapItemUnion]
One of the following:
type ExtractV2JobExtractResultMapItemMap map[string, any]
type ExtractV2JobExtractResultMapItemArray []any
string
float64
bool
type ExtractV2JobExtractResultArray []map[string, *ExtractV2JobExtractResultArrayItemUnion]
One of the following:
type ExtractV2JobExtractResultArrayItemMap map[string, any]
type ExtractV2JobExtractResultArrayItemArray []any
string
float64
bool
Metadata ExtractV2JobMetadataOptional

Job-level metadata.

Usage ExtractJobUsageOptional

Extraction usage metrics.

NumPagesBilled int64Optional

Number of effective pages billed

NumPagesExtracted int64Optional

Number of pages extracted

Usage ExtractV2JobUsageOptional

Usage recorded against an extract job.

A parse job can back several extract jobs, so each of them reports that same parse cost in its total.

Credits float64Optional

Total credits billed against this job. Null until billing has recorded it.

ExtractCredits float64Optional

Credits billed for the extraction itself

ParseCredits float64Optional

Credits billed against the parse job backing this extract job

type ExtractV2JobCreate struct{…}

Request to create an extraction job. Provide configuration_id or inline configuration.

FileInput string

File ID or parse job ID to extract from

maxLength200
Configuration ExtractConfigurationOptional

Extract configuration combining parse and extract settings.

DataSchema map[string, *ExtractConfigurationDataSchemaUnion]

JSON Schema defining the fields to extract. Validate with the /schema/validate endpoint first.

One of the following:
type ExtractConfigurationDataSchemaMap map[string, any]
type ExtractConfigurationDataSchemaArray []any
string
float64
bool
CiteSources boolOptional

Include citations in results. Returned under extract_metadata (auto-included when set). Text-level on turbo (no bounding boxes).

ConfidenceScores boolOptional

Include confidence scores in results. Returned under extract_metadata (auto-included when set).

DisableCache boolOptional

Disable reuse and storage of Extract results

ExtractionTarget ExtractConfigurationExtractionTargetOptional

Granularity of extraction: per_doc returns one object per document, per_page returns one object per page, per_table_row returns one object per table row

One of the following:
const ExtractConfigurationExtractionTargetPerDoc ExtractConfigurationExtractionTarget = "per_doc"
const ExtractConfigurationExtractionTargetPerPage ExtractConfigurationExtractionTarget = "per_page"
const ExtractConfigurationExtractionTargetPerTableRow ExtractConfigurationExtractionTarget = "per_table_row"
MaxPages int64Optional

Maximum number of pages to process. Omit for no limit.

minimum1
ParseConfigID stringOptional

Saved parse configuration ID to control how the document is parsed before extraction. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.

ParseTier ExtractConfigurationParseTierOptional

Parse tier to use before extraction. Defaults to the extract tier if not specified. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.

One of the following:
const ExtractConfigurationParseTierAgentic ExtractConfigurationParseTier = "agentic"
const ExtractConfigurationParseTierAgenticPlus ExtractConfigurationParseTier = "agentic_plus"
const ExtractConfigurationParseTierCostEffective ExtractConfigurationParseTier = "cost_effective"
const ExtractConfigurationParseTierFast ExtractConfigurationParseTier = "fast"
SheetNames []stringOptional

Optional worksheet names to extract when spreadsheet_mode is on. Overrides target_pages for spreadsheets; omit to extract every sheet. Names are matched exactly (case-sensitive) — pass them as a list, e.g. [“Sheet 1”, “My Sheet”].

SpreadsheetMode boolOptional

Beta. When true, extract structured data directly from a spreadsheet workbook (.xlsx/.xls/.csv) — the agent reads cells straight from the workbook instead of the standard document path. Off by default (spreadsheets keep the standard path). Requires the agentic_plus tier. Billed on the standard per-page extract rate, against a page count derived from workbook size. Citations and confidence scores are not available in this mode.

SystemPrompt stringOptional

Custom system prompt to guide extraction behavior

TargetPages stringOptional

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

Tier ExtractConfigurationTierOptional

Extract tier: cost_effective (5 credits/page), agentic (15 credits/page), agentic_plus (50 credits/page), or turbo (35 credits/page)

One of the following:
const ExtractConfigurationTierAgentic ExtractConfigurationTier = "agentic"
const ExtractConfigurationTierAgenticPlus ExtractConfigurationTier = "agentic_plus"
const ExtractConfigurationTierCostEffective ExtractConfigurationTier = "cost_effective"
const ExtractConfigurationTierTurbo ExtractConfigurationTier = "turbo"
Version stringOptional

Use ‘latest’ for the latest release for the selected tier or a date string (YYYY-MM-DD format) to pin to the nearest release at or before that date. Job responses always report the concrete resolved version the job runs, fixed at job creation; saved configurations keep the value as provided.

ConfigurationID stringOptional

Saved configuration ID

WebhookConfigurationIDs []stringOptional

IDs of saved webhook configurations to notify for this job.

WebhookConfigurations []ExtractV2JobCreateWebhookConfigurationOptional

Outbound webhook endpoints to notify on job status changes

WebhookEvents []stringOptional

Events to subscribe to (e.g. ‘parse.success’, ‘extract.error’). If null, all events are delivered.

One of the following:
const ExtractV2JobCreateWebhookConfigurationWebhookEventBatchCancelled ExtractV2JobCreateWebhookConfigurationWebhookEvent = "batch.cancelled"
const ExtractV2JobCreateWebhookConfigurationWebhookEventBatchError ExtractV2JobCreateWebhookConfigurationWebhookEvent = "batch.error"
const ExtractV2JobCreateWebhookConfigurationWebhookEventBatchPending ExtractV2JobCreateWebhookConfigurationWebhookEvent = "batch.pending"
const ExtractV2JobCreateWebhookConfigurationWebhookEventBatchRunning ExtractV2JobCreateWebhookConfigurationWebhookEvent = "batch.running"
const ExtractV2JobCreateWebhookConfigurationWebhookEventBatchSuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "batch.success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventClassifyCancelled ExtractV2JobCreateWebhookConfigurationWebhookEvent = "classify.cancelled"
const ExtractV2JobCreateWebhookConfigurationWebhookEventClassifyError ExtractV2JobCreateWebhookConfigurationWebhookEvent = "classify.error"
const ExtractV2JobCreateWebhookConfigurationWebhookEventClassifyPartialSuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "classify.partial_success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventClassifyPending ExtractV2JobCreateWebhookConfigurationWebhookEvent = "classify.pending"
const ExtractV2JobCreateWebhookConfigurationWebhookEventClassifyRunning ExtractV2JobCreateWebhookConfigurationWebhookEvent = "classify.running"
const ExtractV2JobCreateWebhookConfigurationWebhookEventClassifySuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "classify.success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventExtractCancelled ExtractV2JobCreateWebhookConfigurationWebhookEvent = "extract.cancelled"
const ExtractV2JobCreateWebhookConfigurationWebhookEventExtractError ExtractV2JobCreateWebhookConfigurationWebhookEvent = "extract.error"
const ExtractV2JobCreateWebhookConfigurationWebhookEventExtractPartialSuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "extract.partial_success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventExtractPending ExtractV2JobCreateWebhookConfigurationWebhookEvent = "extract.pending"
const ExtractV2JobCreateWebhookConfigurationWebhookEventExtractSuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "extract.success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventParseCancelled ExtractV2JobCreateWebhookConfigurationWebhookEvent = "parse.cancelled"
const ExtractV2JobCreateWebhookConfigurationWebhookEventParseError ExtractV2JobCreateWebhookConfigurationWebhookEvent = "parse.error"
const ExtractV2JobCreateWebhookConfigurationWebhookEventParsePartialSuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "parse.partial_success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventParsePending ExtractV2JobCreateWebhookConfigurationWebhookEvent = "parse.pending"
const ExtractV2JobCreateWebhookConfigurationWebhookEventParseRunning ExtractV2JobCreateWebhookConfigurationWebhookEvent = "parse.running"
const ExtractV2JobCreateWebhookConfigurationWebhookEventParseSuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "parse.success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSheetsCancelled ExtractV2JobCreateWebhookConfigurationWebhookEvent = "sheets.cancelled"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSheetsError ExtractV2JobCreateWebhookConfigurationWebhookEvent = "sheets.error"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSheetsPartialSuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "sheets.partial_success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSheetsPending ExtractV2JobCreateWebhookConfigurationWebhookEvent = "sheets.pending"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSheetsSuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "sheets.success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSplitCancelled ExtractV2JobCreateWebhookConfigurationWebhookEvent = "split.cancelled"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSplitError ExtractV2JobCreateWebhookConfigurationWebhookEvent = "split.error"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSplitPending ExtractV2JobCreateWebhookConfigurationWebhookEvent = "split.pending"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSplitProcessing ExtractV2JobCreateWebhookConfigurationWebhookEvent = "split.processing"
const ExtractV2JobCreateWebhookConfigurationWebhookEventSplitSuccess ExtractV2JobCreateWebhookConfigurationWebhookEvent = "split.success"
const ExtractV2JobCreateWebhookConfigurationWebhookEventUnmappedEvent ExtractV2JobCreateWebhookConfigurationWebhookEvent = "unmapped_event"
WebhookHeaders map[string, string]Optional

Custom HTTP headers sent with each webhook request (e.g. auth tokens)

WebhookOutputFormat stringOptional

Response format sent to the webhook: ‘string’ (default) or ‘json’

WebhookSigningSecret stringOptional

Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the ‘LC-Signature’ header (value ‘sha256=’). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

WebhookURL stringOptional

URL to receive webhook POST notifications

type ExtractV2JobQueryResponse struct{…}

Paginated list of extraction jobs.

Items []ExtractV2Job

The list of items.

ID string

Unique job identifier (job_id)

CreatedAt Time

Creation timestamp

formatdate-time
FileInput string

File ID or parse job ID that was extracted

ProjectID string

Project this job belongs to

Status string

Current job status.

  • PENDING — queued, not yet started
  • RUNNING — actively processing
  • COMPLETED — finished successfully
  • FAILED — terminated with an error
  • CANCELLED — cancelled by user
UpdatedAt Time

Last update timestamp

formatdate-time
Configuration ExtractConfigurationOptional

Extract configuration combining parse and extract settings.

DataSchema map[string, *ExtractConfigurationDataSchemaUnion]

JSON Schema defining the fields to extract. Validate with the /schema/validate endpoint first.

One of the following:
type ExtractConfigurationDataSchemaMap map[string, any]
type ExtractConfigurationDataSchemaArray []any
string
float64
bool
CiteSources boolOptional

Include citations in results. Returned under extract_metadata (auto-included when set). Text-level on turbo (no bounding boxes).

ConfidenceScores boolOptional

Include confidence scores in results. Returned under extract_metadata (auto-included when set).

DisableCache boolOptional

Disable reuse and storage of Extract results

ExtractionTarget ExtractConfigurationExtractionTargetOptional

Granularity of extraction: per_doc returns one object per document, per_page returns one object per page, per_table_row returns one object per table row

One of the following:
const ExtractConfigurationExtractionTargetPerDoc ExtractConfigurationExtractionTarget = "per_doc"
const ExtractConfigurationExtractionTargetPerPage ExtractConfigurationExtractionTarget = "per_page"
const ExtractConfigurationExtractionTargetPerTableRow ExtractConfigurationExtractionTarget = "per_table_row"
MaxPages int64Optional

Maximum number of pages to process. Omit for no limit.

minimum1
ParseConfigID stringOptional

Saved parse configuration ID to control how the document is parsed before extraction. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.

ParseTier ExtractConfigurationParseTierOptional

Parse tier to use before extraction. Defaults to the extract tier if not specified. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.

One of the following:
const ExtractConfigurationParseTierAgentic ExtractConfigurationParseTier = "agentic"
const ExtractConfigurationParseTierAgenticPlus ExtractConfigurationParseTier = "agentic_plus"
const ExtractConfigurationParseTierCostEffective ExtractConfigurationParseTier = "cost_effective"
const ExtractConfigurationParseTierFast ExtractConfigurationParseTier = "fast"
SheetNames []stringOptional

Optional worksheet names to extract when spreadsheet_mode is on. Overrides target_pages for spreadsheets; omit to extract every sheet. Names are matched exactly (case-sensitive) — pass them as a list, e.g. [“Sheet 1”, “My Sheet”].

SpreadsheetMode boolOptional

Beta. When true, extract structured data directly from a spreadsheet workbook (.xlsx/.xls/.csv) — the agent reads cells straight from the workbook instead of the standard document path. Off by default (spreadsheets keep the standard path). Requires the agentic_plus tier. Billed on the standard per-page extract rate, against a page count derived from workbook size. Citations and confidence scores are not available in this mode.

SystemPrompt stringOptional

Custom system prompt to guide extraction behavior

TargetPages stringOptional

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

Tier ExtractConfigurationTierOptional

Extract tier: cost_effective (5 credits/page), agentic (15 credits/page), agentic_plus (50 credits/page), or turbo (35 credits/page)

One of the following:
const ExtractConfigurationTierAgentic ExtractConfigurationTier = "agentic"
const ExtractConfigurationTierAgenticPlus ExtractConfigurationTier = "agentic_plus"
const ExtractConfigurationTierCostEffective ExtractConfigurationTier = "cost_effective"
const ExtractConfigurationTierTurbo ExtractConfigurationTier = "turbo"
Version stringOptional

Use ‘latest’ for the latest release for the selected tier or a date string (YYYY-MM-DD format) to pin to the nearest release at or before that date. Job responses always report the concrete resolved version the job runs, fixed at job creation; saved configurations keep the value as provided.

ConfigurationID stringOptional

Saved extract configuration ID used for this job, if any

ErrorMessage stringOptional

Error details when status is FAILED

ExtractMetadata ExtractJobMetadataOptional

Extraction metadata.

FieldMetadata ExtractedFieldMetadataOptional

Metadata for extracted fields including document, page, and row level info.

DocumentMetadata map[string, *ExtractedFieldMetadataDocumentMetadataUnion]Optional

Per-field metadata keyed by field name from your schema. Scalar fields (e.g. vendor) map to a FieldMetadataEntry with citation and confidence. Array fields (e.g. items) map to a list where each element contains per-sub-field FieldMetadataEntry objects, indexed by array position. Nested objects contain sub-field entries recursively.

One of the following:
type ExtractedFieldMetadataDocumentMetadataMap map[string, any]
type ExtractedFieldMetadataDocumentMetadataArray []any
string
float64
bool
PageMetadata []map[string, *ExtractedFieldMetadataPageMetadataUnion]Optional

Per-page metadata when extraction_target is per_page

One of the following:
type ExtractedFieldMetadataPageMetadataMap map[string, any]
type ExtractedFieldMetadataPageMetadataArray []any
string
float64
bool
RowMetadata []map[string, *ExtractedFieldMetadataRowMetadataUnion]Optional

Per-row metadata when extraction_target is per_table_row

One of the following:
type ExtractedFieldMetadataRowMetadataMap map[string, any]
type ExtractedFieldMetadataRowMetadataArray []any
string
float64
bool
ParseJobID stringOptional

Reference to the ParseJob ID used for parsing

ParseTier stringOptional

Parse tier used for parsing the document

ExtractResult ExtractV2JobExtractResultUnionOptional

Extracted data conforming to the data_schema. Returns a single object for per_doc, or an array for per_page / per_table_row.

One of the following:
type ExtractV2JobExtractResultMap map[string, ExtractV2JobExtractResultMapItemUnion]
One of the following:
type ExtractV2JobExtractResultMapItemMap map[string, any]
type ExtractV2JobExtractResultMapItemArray []any
string
float64
bool
type ExtractV2JobExtractResultArray []map[string, *ExtractV2JobExtractResultArrayItemUnion]
One of the following:
type ExtractV2JobExtractResultArrayItemMap map[string, any]
type ExtractV2JobExtractResultArrayItemArray []any
string
float64
bool
Metadata ExtractV2JobMetadataOptional

Job-level metadata.

Usage ExtractJobUsageOptional

Extraction usage metrics.

NumPagesBilled int64Optional

Number of effective pages billed

NumPagesExtracted int64Optional

Number of pages extracted

Usage ExtractV2JobUsageOptional

Usage recorded against an extract job.

A parse job can back several extract jobs, so each of them reports that same parse cost in its total.

Credits float64Optional

Total credits billed against this job. Null until billing has recorded it.

ExtractCredits float64Optional

Credits billed for the extraction itself

ParseCredits float64Optional

Credits billed against the parse job backing this extract job

NextPageToken stringOptional

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

TotalSize int64Optional

The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

type ExtractV2SchemaGenerateRequest struct{…}

Request schema for generating an extraction schema.

DataSchema map[string, *ExtractV2SchemaGenerateRequestDataSchemaUnion]Optional

Optional schema to validate, refine, or extend

One of the following:
map[string, any]
[]any
string
float64
bool
FileID stringOptional

Optional file ID to analyze for schema generation

Name stringOptional

Name for the generated configuration (auto-generated if omitted)

maxLength255
Prompt stringOptional

Natural language description of the data structure to extract

type ExtractV2SchemaValidateRequest struct{…}

Request schema for validating an extraction schema.

DataSchema map[string, *ExtractV2SchemaValidateRequestDataSchemaUnion]

JSON Schema to validate for use with extract jobs

One of the following:
map[string, any]
[]any
string
float64
bool
type ExtractV2SchemaValidateResponse struct{…}

Response schema for schema validation.

DataSchema map[string, *ExtractV2SchemaValidateResponseDataSchemaUnion]

Validated JSON Schema, ready for use in extract jobs

One of the following:
type ExtractV2SchemaValidateResponseDataSchemaMap map[string, any]
type ExtractV2SchemaValidateResponseDataSchemaArray []any
string
float64
bool
type ExtractedFieldMetadata struct{…}

Metadata for extracted fields including document, page, and row level info.

DocumentMetadata map[string, *ExtractedFieldMetadataDocumentMetadataUnion]Optional

Per-field metadata keyed by field name from your schema. Scalar fields (e.g. vendor) map to a FieldMetadataEntry with citation and confidence. Array fields (e.g. items) map to a list where each element contains per-sub-field FieldMetadataEntry objects, indexed by array position. Nested objects contain sub-field entries recursively.

One of the following:
type ExtractedFieldMetadataDocumentMetadataMap map[string, any]
type ExtractedFieldMetadataDocumentMetadataArray []any
string
float64
bool
PageMetadata []map[string, *ExtractedFieldMetadataPageMetadataUnion]Optional

Per-page metadata when extraction_target is per_page

One of the following:
type ExtractedFieldMetadataPageMetadataMap map[string, any]
type ExtractedFieldMetadataPageMetadataArray []any
string
float64
bool
RowMetadata []map[string, *ExtractedFieldMetadataRowMetadataUnion]Optional

Per-row metadata when extraction_target is per_table_row

One of the following:
type ExtractedFieldMetadataRowMetadataMap map[string, any]
type ExtractedFieldMetadataRowMetadataArray []any
string
float64
bool
Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/