This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/data-extraction.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. DataExtraction

Extracts data from a document with the same operations, the same option names and the same output files as the hosted Nutrient data extraction service, so code and knowledge carry over between the two. Like every SDK operation, each one reads its options from the document’s settings: ParseSettings and ExtractSettings, generated from the hosted service’s parameters, and the canonical settings they alias. Options left unset keep the default the pipeline or the SDK-wide settings provide.

from nutrient_sdk import DataExtraction

Construction

DataExtraction cannot be instantiated directly. Obtain instances through static factory methods or via other SDK classes.

Class Methods

set

@classmethod
def set(cls, document: Document) -> DataExtraction

Creates a DataExtraction instance for the specified document.

Parameters:

NameTypeDescription
documentDocumentThe open document to extract data from.

Returns: DataExtraction - A DataExtraction instance bound to the document. Raises:


Methods

extract

def extract(self) -> ExtractResult

Extracts structured data from the document with an AI model, shaped by the JSON Schema you supply.

Returns: ExtractResult - The artifacts the run produced, under the same names the hosted service uses. Raises:


parse

def parse(self) -> ParseResult

Parses the document into structured content (paragraphs, tables, figures, key-value regions and more) and exports it as JSON, Markdown or both.

Returns: ParseResult - The artifacts the run produced, under the same names the hosted service uses. Raises: