skillfed

unstructured

A library that prepares raw documents for downstream ML tasks.

unstructured v0.25.2 5.5M downloads/30d#2,084 on PyPI15,312
Permissive license Apache-2.0 Active released

What it is and what it does

Unstructured is a document processing library that converts raw files in many formats into structured, machine-readable elements. It handles PDFs, Word documents, HTML, emails, images, and dozens of other formats, extracting text and metadata while preserving document structure. The library is designed to prepare unstructured data for downstream machine learning tasks, particularly for large language models.

The package works by partitioning documents into semantic elements (paragraphs, tables, headers, etc.), then optionally enriching and chunking them for vector databases or other ML workflows. It ships with 24 runtime dependencies including parsing libraries (beautifulsoup4, lxml, html5lib), NLP tools (spacy, langdetect), and numerical computing (numpy, numba). Installation requires system-level dependencies for full format support, though a minimal install handles text and markup formats without them.

Use it for:

  • Extract and structure text from PDFs and scanned documents for ingestion into vector databases or RAG systems
  • Parse email messages and attachments to prepare them for LLM analysis or archival processing
  • Convert Word documents, PowerPoint slides, and other office formats into structured text for batch processing
  • Chunk long documents into semantically meaningful segments for embedding and retrieval workflows
  • Detect and extract tables from PDFs and images for structured data extraction pipelines

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Ingests and pre-processes unstructured documents (PDFs, HTML, Word, emails, images) into structured elements for machine learning pipelines, supporting 60+ file types with parsing, chunking, and enrichment.

Yes, with conditions. Install if you need to process multiple document formats and can manage the 24 runtime dependencies and system-level tools. The active maintenance, permissive license, and broad format support make it a solid choice for LLM data preparation pipelines. Skip if you only need to parse a single format (use a lighter, format-specific library instead) or if your environment cannot accommodate the dependency footprint.

Install

unstructured on PyPI

pip

pip install unstructured

uv

uv add unstructured

poetry

poetry add unstructured

Installing unstructured

Before you install

Low friction installation with a pure Python wheel. Active maintenance with a release 11 days ago and 15312 GitHub stars. Requires 24 runtime dependencies including heavy libraries (spacy, numba, numpy, lxml), so initial install may take time despite the wheel format.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most production and proprietary projects.

Quickstart

pip install unstructured

from unstructured.partition.auto import partition
elements = partition(filename="document.pdf")
for el in elements:
    print(el)

System dependencies required for full functionality: libmagic-dev (filetype detection), poppler-utils (PDFs/images), tesseract-ocr (OCR), libreoffice (MS Office). Minimal install works for text, HTML, XML, JSON, emails only.

Verify before relying

  • Whether all 60+ file types mentioned in the description are fully supported in version 0.25.2 or if some require paid/enterprise features
  • Performance characteristics and memory footprint when processing large documents or batches
  • Whether the MCP server integration mentioned in the description is included in the PyPI package or requires separate installation

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<3.14,>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 24 — beautifulsoup4, charset-normalizer, emoji, filelock, filetype, html5lib, installer, langdetect, lxml, nh3, numba, numpy, psutil, python-iso639, python-magic, python-oxmsg, rapidfuzz, regex, requests, spacy, tqdm, typing-extensions, unstructured-client, wrapt
Maintenance actively maintained — 11 days since the last release
Last repo commit
First released
Downloads 5,518,206/month — #2,084 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: unstructured-0.25.2-py3-none-any.whl

Keywords: CV, HTML, NLP, PDF, XML, parsing, preprocessing

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Artificial Intelligence

Tags

document parsing and preprocessingpdf text extractionunstructured data ingestionllm document preparationmulti-format file parsingdocument chunking and enrichmenthtml and email parsing
document-processingdata-preparationllm-pipeline

More Artificial Intelligence packages