Unstructured
Unstructured is an open-source library for ingesting and pre-processing unstructured data like PDFs, HTML, Word docs, and images. It provides modular functions and connectors to transform raw data into structured outputs, streamlining data processing workflows for LLMs. It is for developers building data pipelines for AI applications.
✨ Key features
- Supports 60+ file types including PDFs, emails, images.
- Modular partition functions for file-type-specific parsing.
- Auto-detects file type and routes to appropriate parser.
- Docker images for easy deployment and development.
- MCP server for agent-based document processing.
- Extras for optional dependencies per document type.
🎯 Use cases
- Parsing PDFs for text extraction in RAG pipelines.
- Pre-processing documents for LLM ingestion.
- Converting emails and HTML into structured data.
- Building document processing workflows for agents.
- Chunking and embedding files for vector databases.
📦 Installation
🧰 Requirements: Python 3.9+ (implied), system dependencies like libmagic-dev, poppler-utils, tesseract-ocr, libreoffice for certain file types; Docker optional.
pip install "unstructured[all-docs]"
For plain text files, HTML, XML, JSON, and Emails: pip install unstructured
For specific doc types, install extras like pip install "unstructured[docx,pptx]"
System dependencies: libmagic-dev, poppler-utils, tesseract-ocr, libreoffice (as needed).
For local development, use uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
make install
🚀 Usage
from unstructured.partition.auto import partition
elements = partition(filename="example-docs/eml/fake-email.eml")
print("\n\n".join([str(el) for el in elements]))
❓ FAQ
How do I install the library for all document types?
Run pip install "unstructured[all-docs]" to install the Python SDK with support for all document types.
Can I run unstructured in a container?
Yes, you can pull a Docker image with docker pull downloads.unstructured.io/unstructured-io/unstructured:latest and run it.
What is the easiest way to parse a document?
Use the partition function from unstructured.partition.auto; it auto-detects the file type and routes to the appropriate parser.
What system dependencies are needed?
Depending on document types, you may need libmagic-dev, poppler-utils, tesseract-ocr, and libreoffice.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.