Nutrient Python SDK
Nutrient Data Extraction SDK for Python runs on your own servers. It parses PDFs and images into JSON with bounding boxes and confidence scores, extracts fields into your JSON Schema, classifies documents, and splits merged files. It’s sold separately from the cloud Nutrient Data Extraction API.
Need pricing or implementation help? Talk to Sales.
ICR EXTRACTION
from nutrient_sdk import Document, Vision, VisionEngine
with Document.open("scan.png") as document: # Local AI — offline after the first model download document.settings.vision_settings.engine = VisionEngine.ICR
vision = Vision.set(document) content_json = vision.extract_content() # Structured JSON: text, tables, key-value # pairs, equations, bounding boxesDetect tables automatically and extract individual cell contents with row and column structure. Handles complex layouts with merged cells, irregular borders, and nested tables.
Identify form-like key-value regions in invoices, receipts, and structured documents. No predefined templates required — the AI adapts to any document layout.
ICR runs on your infrastructure, with no external API calls once its models have downloaded. Documents and results stay on your servers, which helps teams meet requirements such as HIPAA and GDPR. Preload the models to run in air-gapped environments.
Every extraction returns classified elements with bounding boxes, confidence scores, and hierarchical reading order. Parse results programmatically without post-processing.
High-speed text extraction with word-level bounding boxes for search indexing and digitization.
Extract tables, equations, and key-value regions with offline AI that understands document layout.
Maximize accuracy on complex documents by combining local AI with vision language models.
Generate natural language descriptions and WCAG-compliant alt text from document images.
Generate alt text and visual summaries through OpenAI’s managed API, with no local model to host.
Run vision language models on your own infrastructure for complete data privacy.
Data Extraction detects and classifies document elements automatically. Each element comes with bounding boxes, confidence scores, and its position in the document reading order.
OCR ICR VLM-enhanced ICR JSON Bounding boxes Confidence scores Element types INTELLIGENT DOCUMENT PROCESSING
Traditional extraction tools parse text line by line. Nutrient Data Extraction sees the full document layout — tables, columns, headers, reading order — and returns classified, structured data ready for your Python application to consume.
Detect tables with or without visible borders. Extract cell contents with row and column positions, even from scanned documents with irregular layouts.
Identify form-like key-value pairs without predefined templates. The AI learns document structure on the fly, adapting to invoices, receipts, and forms.
Detect and extract equations with LaTeX representations from scientific papers, textbooks, and technical documentation.
Every extracted element includes a confidence score. Set quality thresholds to filter results and flag documents that need manual review.
This is Data Extraction in the Python SDK: self-hosted, with no network required once the models have downloaded. The same engine is also available as the hosted cloud Data Extraction API. To try it before writing code, use Nutrient Extract Studio, a Mac app with this SDK built in (sign-in required).
The ICR and VLM-enhanced ICR engines analyze document layout using AI to detect table regions, identify row and column boundaries, and extract individual cell contents. This works on both native PDFs and scanned documents, including tables without visible borders. The output is structured JSON with each cell mapped to its row and column position, making it straightforward to convert to CSV, database records, or any structured format your application needs.
No. Data Extraction analyzes document structure on the fly using AI. It detects tables, key-value pairs, headings, and other elements without predefined templates or training data. This means it works on invoices from any vendor, receipts in any format, and forms with any layout. The AI adapts to each document individually, eliminating the setup and maintenance cost of template-based extraction systems.
Yes. All three engines process both native PDFs and scanned documents. The OCR engine extracts text with bounding boxes from scanned images. The ICR engine goes further, applying AI to understand document structure and extract tables, key-value pairs, and semantic elements from scans. The VLM-enhanced engine adds vision language model processing for maximum accuracy on challenging scanned documents with poor quality or complex layouts.
Data Extraction returns structured JSON containing classified document elements. Each element includes its type (table, paragraph, heading, equation, key-value region, figure), text content, bounding box coordinates, and confidence score. Tables include cell-level data with row and column positions. The JSON also includes the document reading order so you can reconstruct the logical flow of content. You can save output directly to a JSON file or process it in memory.
OCR provides fast, reliable text extraction and is best for simple documents where you need raw text and positions. ICR adds AI-powered structural analysis and significantly improves results on documents with tables, mixed layouts, and form-like content — all while running locally. VLM-enhanced ICR combines local AI with a vision language model for higher extraction accuracy on complex documents, such as pages with irregular table structures.
Yes. The OCR and ICR engines run on your infrastructure, with no external API calls once the required models have downloaded on first use. Documents and results stay on your servers, which helps teams meet requirements such as HIPAA and GDPR. VLM-enhanced extraction also runs on your servers by default: The local provider runs a model in the SDK process with `llama.cpp`, downloads approximately 6.2 GB of model files on first use, and needs at least 10 GB of available GPU memory (VRAM), or available unified memory on Apple silicon. Connecting a separately managed OpenAI-compatible server, such as Ollama, LM Studio, or vLLM, is optional.
Python 3.8 or later and Nutrient Python SDK. The layout analysis models download automatically on first use and are cached for later runs. The default local model for VLM-enhanced extraction downloads approximately 6.2 GB on first use and needs at least 10 GB of available VRAM, or available unified memory on Apple silicon. Some features need options in your license: Structured extraction requires the vision data extraction feature, classification requires the vision image classification feature, and document splitting requires the document split feature. To skip local hardware entirely, use the cloud Nutrient Data Extraction API.
Camelot and pdfplumber are popular open source Python libraries for extracting tables from native PDFs. They parse the underlying text layer and work well on digitally created documents with clear table borders. However, they cannot process scanned documents and struggle with borderless or irregular tables. Nutrient Data Extraction uses AI to detect tables, regardless of borders; works on both scanned and native documents; and also extracts key-value pairs, equations, and full document structure — returning everything as classified JSON with confidence scores.
Data Extraction processes PDFs (both native and scanned) and common image formats, including PNG, JPEG, and TIFF. You open a PDF directly, so there’s no separate conversion step. All three engines accept the same input formats, making it easy to switch between them based on your accuracy and performance needs.
Yes. The ICR and VLM-enhanced engines are well suited for invoice and financial document processing. They detect tables with line items and totals; identify key-value pairs like vendor names, dates, and amounts; and understand the hierarchical structure of a document. Because the extraction is template-free, it works across different invoice formats and vendors without per-vendor configuration. Use VLM-enhanced mode for the highest accuracy on complex financial layouts.
Install Nutrient Python SDK with pip and follow the getting started guide. For data extraction, open a document, create a vision instance, select your engine (OCR, ICR, or VLM-enhanced), and call the extraction method. The SDK returns structured JSON that you can parse with standard Python tools. The extraction guides include step-by-step examples for each engine and use case.
Yes. Nutrient Extract Studio is a desktop app for Apple silicon Macs that ships with its own Python runtime and the Nutrient Python SDK, so there’s no environment to set up. Run parse, extract, or classify on a sample document, and then view the code in the app to copy Python code for the Data Extraction SDK into your project.
Extraction uses an AI model you connect. One running locally through Ollama or LM Studio keeps documents on your Mac. Your own OpenAI or Anthropic key also works, and it sends page images and your schema to that provider. The app needs a free Nutrient account, and runs are paid from your account’s balance at Data Extraction rates. Learn about Extract Studio for macOS.
Also available for
More Python SDK capabilities