This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/csharp/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.

using Nutrient;

The SDK creates this class through factory methods or other SDK objects.

Methods

Extract

public ExtractResult Extract()

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. Throws: NutrientException - Thrown when this instance has been disposed.

Throws: NutrientException - Thrown when the license does not cover a capability this call runs.

Throws: NutrientException - Thrown when a setting is rejected as invalid input.

Throws: NutrientException - Thrown when the run fails; the message ends with the failure code.

Parse

public ParseResult Parse()

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. Throws: NutrientException - Thrown when this instance has been disposed.

Throws: NutrientException - Thrown when the license does not cover a capability this call runs.

Throws: NutrientException - Thrown when a setting is rejected as invalid input.

Throws: NutrientException - Thrown when the run fails; the message ends with the failure code.

Set

public static DataExtraction Set(Document document)

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. Throws: NutrientException - Thrown when document is null.

Resource management

public void Dispose()

DataExtraction implements IDisposable and owns native resources. Always call Dispose() or use a C# using declaration: it is not released automatically.