Unstructured-IO/unstructured
Python document ETL for turning mixed files into structured RAG inputs
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Unstructured is a Python document ETL library at the front of a RAG stack, not a database. The unstructured.partition.auto.partition entry point detects the input type and dispatches it to a format-specific parser. Callers can also import a parser directly, such as unstructured.partition.pdf.partition_pdf or unstructured.partition.text.partition_text. Both paths return structured document elements; the calling application decides how to chunk, embed, and index them.
The modular boundary is the format-specific partitioner, with optional dependencies selected through Python extras and native tools for particular jobs. The container includes libmagic for type detection, Poppler for PDF processing, Tesseract for OCR, and LibreOffice for Office conversions. Batch ingestion and connectors are a separate integration concern: unstructured-ingest is the companion project for batch processing, while this library can run inside an existing worker without taking ownership of storage or retrieval.
Key Capabilities & Differentiators
The base Python install covers plain text, HTML, XML, JSON, and email. Add extras for formats such as DOCX and PPTX, or install unstructured[all-docs] for broad format coverage. PDF and image processing can use OCR, with Tesseract language data needed for the languages you intend to recognize. Preserve the element list rather than flattening it early if downstream chunking depends on document structure.
For PDFs, treat fast and hi_res as different processing paths, not interchangeable settings. Start by evaluating fast on documents that already have a text layer, and test hi_res where layout fidelity justifies the extra work. Release 0.27.37 fixed a case where vector-heavy PDFs returned no elements on the fast path; 0.27.38 made empty CSV and TSV inputs produce no elements. Validate scanned pages, layout-heavy pages, and legitimately empty results separately rather than using nonempty output as the sole ingestion check.
Trade-offs & Limitations
Use a dedicated PDF-to-text tool when nearly all inputs have a usable text layer and flattened output is enough. Unstructured earns its additional setup when mixed formats would otherwise require separate parsers and custom normalization. That flexibility comes with more dependencies and uneven job costs: track peak worker memory and throughput by page count, strategy, and concurrency, rather than sizing workers from an average document.
Apache-2.0 allows local commercial integration, but operators still own dependency maintenance and extraction quality checks. The hosted Transform v2 API is a different option when table quality is a priority and sending documents to a hosted service is acceptable. Published OSS and hosted benchmark figures use different evaluation sets, so they are not a controlled head-to-head comparison. Score both on the same representative pages before trading local control for hosted processing.
Hardware & Deployment Guide
Install with PyPI on Python 3.11–3.14, or run the published Docker image at downloads.unstructured.io/unstructured-io/unstructured on x86_64 or Apple silicon. The supplied Dockerfile uses Python 3.12 on Wolfi and includes native parsing tools and Tesseract language data. The container quick start opens a shell to run the Python library; plan your own worker or service wrapper if you need a managed endpoint. Pin a concrete image version for repeatable deployments rather than relying on latest.
Self-hosting does not automatically make the runtime offline. Before import, set DO_NOT_TRACK or SCARF_NO_ANALYTICS to a nonblank value to disable both the default import ping and per-partition telemetry. Stage required model and OCR assets and test the actual workflow with outbound access blocked. Release 0.27.38 avoids rendering a PDF separately for each hi_res stage, and 0.27.39 adds support for disabling runtime spaCy model downloads. Neither change removes the need to test the selected parsing paths in the intended environment.
unstructured.partition.auto.partition detects file types and routes inputs to format-specific parsers.fast and hi_res support different extraction needs; release 0.27.38 reuses a single PDF render across hi_res stages.DO_NOT_TRACK or SCARF_NO_ANALYTICS disables both startup and partition telemetry when set to a nonblank value.Teams that need self-hosted parsing for mixed PDF, Office, HTML, email, or scanned documents and already have a downstream indexing pipeline.
You need a turnkey retrieval database or hosted parsing endpoint, or a dedicated extractor already handles your text-native PDF corpus.
Quick Start & Installation
docker pull downloads.unstructured.io/unstructured-io/unstructured:latestComparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| unstructured ★ | 15.8k | +25 | HTML | Apache-2.0 | Python document ETL for turning mixed files into structured RAG inputs |
| marker | 41.2k | +103 | Python | Apache-2.0 | Hybrid OCR and layout parsing for document ingestion in RAG pipelines |
| MinerU | 84.7k | +326 | Python | — | Local document parser and library for structured RAG ingestion and page-level ci |
| docling | 71.4k | +285 | Python | MIT | Local-first document parser for structure-aware RAG ingestion |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/Unstructured-IO/unstructured.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about unstructured
Where does Unstructured fit in a RAG pipeline?
unstructured.partition.auto.partition for a mixed-format feed, or use a format-specific entry point such as unstructured.partition.pdf.partition_pdf when you know the input type. Pass the returned elements to your chunking and embedding stages, then write to a separate retrieval store. Keep element boundaries if downstream chunking needs them; joining every element into a single string discards those boundaries.Do I need a GPU, and how should I size the workers?
hi_res layout analysis at the intended concurrency. If you plan to use an accelerator, validate the chosen model and execution path before committing to a hardware profile.Can we use it commercially and keep parsing on our own infrastructure?
DO_NOT_TRACK=1 or SCARF_NO_ANALYTICS=1 before import and verify that required models and OCR language data are present locally. The hosted Transform v2 API is a separate offering.When is a dedicated PDF parser or a hosted API a better choice?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy