unstructured 0.22.12


pip install unstructured

  Latest version

Released: Apr 02, 2026

Project Links

Meta
Author: Unstructured Technologies
Requires Python: <3.14,>=3.11

Classifiers

Development Status
  • 4 - Beta

Intended Audience
  • Developers
  • Education
  • Science/Research

License
  • OSI Approved :: Apache Software License

Operating System
  • OS Independent

Programming Language
  • Python :: 3
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Scientific/Engineering :: Artificial Intelligence

Open-Source Pre-Processing Tools for Unstructured Data

The unstructured library provides open-source components for ingesting and pre-processing images and text documents, such as PDFs, HTML, Word docs, and many more. The use cases of unstructured revolve around streamlining and optimizing the data processing workflow for LLMs. unstructured modular functions and connectors form a cohesive system that simplifies data ingestion and pre-processing, making it adaptable to different platforms and efficient in transforming unstructured data into structured outputs.

Try the Unstructured Platform Product

Ready to move your data processing pipeline to production, and take advantage of advanced features? Check out Unstructured Platform. In addition to better processing performance, take advantage of chunking, embedding, and image and table enrichment generation, all from a low code UI or an API. Request a demo from our sales team to learn more about how to get started.

:eight_pointed_black_star: Quick Start

There are several ways to use the unstructured library:

Run the library in a container

The following instructions are intended to help you get up and running using Docker to interact with unstructured. See here if you don't already have docker installed on your machine.

NOTE: we build multi-platform images to support both x86_64 and Apple silicon hardware. docker pull should download the corresponding image for your architecture, but you can specify with --platform (e.g. --platform linux/amd64) if needed.

We build Docker images for all pushes to main. We tag each image with the corresponding short commit hash (e.g. fbc7a69) and the application version (e.g. 0.5.5-dev1). We also tag the most recent image with latest. To leverage this, docker pull from our image repository.

docker pull downloads.unstructured.io/unstructured-io/unstructured:latest

Once pulled, you can create a container from this image and shell to it.

# create the container
docker run -dt --name unstructured downloads.unstructured.io/unstructured-io/unstructured:latest

# this will drop you into a bash shell where the Docker image is running
docker exec -it unstructured bash

You can also build your own Docker image. Note that the base image is wolfi-base, which is updated regularly. If you are building the image locally, it is possible docker-build could fail due to upstream changes in wolfi-base.

If you only plan on parsing one type of data you can speed up building the image by commenting out some of the packages/requirements necessary for other data types. See Dockerfile to know which lines are necessary for your use case.

make docker-build

# this will drop you into a bash shell where the Docker image is running
make docker-start-bash

Once in the running container, you can try things directly in Python interpreter's interactive mode.

# this will drop you into a python console so you can run the below partition functions
python3

>>> from unstructured.partition.pdf import partition_pdf
>>> elements = partition_pdf(filename="example-docs/layout-parser-paper-fast.pdf")

>>> from unstructured.partition.text import partition_text
>>> elements = partition_text(filename="example-docs/fake-text.txt")

Installing the library

Use the following instructions to get up and running with unstructured and test your installation.

  • Install the Python SDK to support all document types with pip install "unstructured[all-docs]"

    • For plain text files, HTML, XML, JSON and Emails that do not require any extra dependencies, you can run pip install unstructured
    • To process other doc types, you can install the extras required for those documents, such as pip install "unstructured[docx,pptx]"
  • Install the following system dependencies if they are not already available on your system. Depending on what document types you're parsing, you may not need all of these.

    • libmagic-dev (filetype detection)
    • poppler-utils (images and PDFs)
    • tesseract-ocr (images and PDFs, install tesseract-lang for additional language support)
    • libreoffice (MS Office docs)
    • pandoc is bundled automatically via the pypandoc-binary Python package (no system install needed)
  • For suggestions on how to install on the Windows and to learn about dependencies for other features, see the installation documentation here.

At this point, you should be able to run the following code:

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]))

Installation Instructions for Local Development

The following instructions are intended to help you get up and running with unstructured locally if you are planning to contribute to the project.

This project uses uv for dependency management. Install it first:

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

Then install all dependencies (base, extras, dev, test, and lint groups):

make install

This runs uv sync --locked --all-extras --all-groups, which creates a virtual environment and installs everything in one step. No need to manually create or activate a virtualenv.

To install only specific document-type extras:

uv sync --extra pdf
uv sync --extra csv --extra docx

To update the lock file after changing dependencies in pyproject.toml:

make lock
  • Optional:
    • To install extras for processing images and PDFs locally, run uv sync --extra pdf --extra image.
    • For processing image files, tesseract is required. See here for installation instructions.
    • For processing PDF files, tesseract and poppler are required. The pdf2image docs have instructions on installing poppler across various platforms.

Additionally, if you're planning to contribute to unstructured, we provide you an optional pre-commit configuration file to ensure your code matches the formatting and linting standards used in unstructured. If you'd prefer not to have code changes auto-tidied before every commit, you can use make check to see whether any linting or formatting changes should be applied, and make tidy to apply them.

If using the optional pre-commit, you'll just need to install the hooks with pre-commit install since the pre-commit package is installed as part of make install mentioned above. Finally, if you decided to use pre-commit you can also uninstall the hooks with pre-commit uninstall.

In addition to develop in your local OS we also provide a helper to use docker providing a development environment:

make docker-start-dev

This starts a docker container with your local repo mounted to /mnt/local_unstructured. This docker image allows you to develop without worrying about your OS's compatibility with the repo and its dependencies.

:clap: Quick Tour

Documentation

For more comprehensive documentation, visit https://docs.unstructured.io . You can also learn more about our other products on the documentation page, including our SaaS API.

Here are a few pages from the Open Source documentation page that are helpful for new users to review:

PDF Document Parsing Example

The following examples show how to get started with the unstructured library. The easiest way to parse a document in unstructured is to use the partition function. If you use partition function, unstructured will detect the file type and route it to the appropriate file-specific partitioning function. If you are using the partition function, you may need to install additional dependencies per doc type. For example, to install docx dependencies you need to run pip install "unstructured[docx]". See our installation guide for more details.

from unstructured.partition.auto import partition

elements = partition("example-docs/layout-parser-paper.pdf")

Run print("\n\n".join([str(el) for el in elements])) to get a string representation of the output, which looks like:


LayoutParser : A Unified Toolkit for Deep Learning Based Document Image Analysis

Zejiang Shen 1 ( (cid:0) ), Ruochen Zhang 2 , Melissa Dell 3 , Benjamin Charles Germain Lee 4 , Jacob Carlson 3 , and
Weining Li 5

Abstract. Recent advances in document image analysis (DIA) have been primarily driven by the application of neural
networks. Ideally, research outcomes could be easily deployed in production and extended for further investigation.
However, various factors like loosely organized codebases and sophisticated model configurations complicate the easy
reuse of important innovations by a wide audience. Though there have been ongoing efforts to improve reusability and
simplify deep learning (DL) model development in disciplines like natural language processing and computer vision, none
of them are optimized for challenges in the domain of DIA. This represents a major gap in the existing toolkit, as DIA
is central to academic research across a wide range of disciplines in the social sciences and humanities. This paper
introduces LayoutParser, an open-source library for streamlining the usage of DL in DIA research and applications.
The core LayoutParser library comes with a set of simple and intuitive interfaces for applying and customizing DL models
for layout detection, character recognition, and many other document processing tasks. To promote extensibility,
LayoutParser also incorporates a community platform for sharing both pre-trained models and full document digitization
pipelines. We demonstrate that LayoutParser is helpful for both lightweight and large-scale digitization pipelines in
real-word use cases. The library is publicly available at https://layout-parser.github.io

Keywords: Document Image Analysis · Deep Learning · Layout Analysis · Character Recognition · Open Source library ·
Toolkit.

Introduction

Deep Learning(DL)-based approaches are the state-of-the-art for a wide range of document image analysis (DIA) tasks
including document image classification [11,

See the partitioning section in our documentation for a full list of options and instructions on how to use file-specific partitioning functions.

:guardsman: Security Policy

See our security policy for information on how to report security vulnerabilities.

:bug: Reporting Bugs

Encountered a bug? Please create a new GitHub issue and use our bug report template to describe the problem. To help us diagnose the issue, use the python scripts/collect_env.py command to gather your system's environment information and include it in your report. Your assistance helps us continuously improve our software - thank you!

:books: Learn more

Section Description
Company Website Unstructured.io product and company info
Documentation Full API documentation
Batch Processing Ingesting batches of documents through Unstructured

:chart_with_upwards_trend: Analytics

Telemetry is off by default. To opt in, set UNSTRUCTURED_TELEMETRY_ENABLED=true (or =1) before importing unstructured. To opt out, set DO_NOT_TRACK or SCARF_NO_ANALYTICS to any non-empty value (e.g. true, 1, yes, false, 0—any non-empty string opts out); opt-out takes precedence. Unset the variable or leave it empty if you do not want to opt out. See our Privacy Policy.

0.22.12 Apr 02, 2026
0.22.10 Mar 31, 2026
0.22.6 Mar 26, 2026
0.21.5 Feb 24, 2026
0.21.2 Feb 23, 2026
0.21.1 Feb 22, 2026
0.21.0 Feb 22, 2026
0.20.8 Feb 20, 2026
0.20.6 Feb 19, 2026
0.20.2 Feb 13, 2026
0.18.32 Feb 10, 2026
0.18.31 Jan 27, 2026
0.18.27 Jan 09, 2026
0.18.26 Jan 05, 2026
0.18.24 Dec 30, 2025
0.18.21 Nov 24, 2025
0.18.20 Nov 15, 2025
0.18.18 Nov 07, 2025
0.18.15 Sep 17, 2025
0.18.14 Aug 26, 2025
0.18.13 Aug 14, 2025
0.18.11 Jul 23, 2025
0.18.9 Jul 16, 2025
0.18.7 Jul 15, 2025
0.18.6 Jul 15, 2025
0.18.5 Jul 11, 2025
0.18.3 Jul 05, 2025
0.18.2 Jul 01, 2025
0.18.1 Jun 24, 2025
0.17.2 Mar 20, 2025
0.17.0 Mar 12, 2025
0.16.25 Mar 07, 2025
0.16.24 Mar 07, 2025
0.16.23 Feb 20, 2025
0.16.22 Feb 20, 2025
0.16.21 Feb 17, 2025
0.16.20 Feb 06, 2025
0.16.19 Feb 05, 2025
0.16.17 Jan 29, 2025
0.16.16 Jan 27, 2025
0.16.15 Jan 23, 2025
0.16.14 Jan 20, 2025
0.16.13 Jan 13, 2025
0.16.12 Jan 05, 2025
0.16.11 Dec 10, 2024
0.16.10 Dec 07, 2024
0.16.9 Dec 02, 2024
0.16.8 Nov 26, 2024
0.16.7 Nov 26, 2024
0.16.6 Nov 22, 2024
0.16.5 Nov 07, 2024
0.16.4 Oct 31, 2024
0.16.3 Oct 25, 2024
0.16.2 Oct 24, 2024
0.16.1 Oct 23, 2024
0.16.0 Oct 17, 2024
0.15.14 Oct 10, 2024
0.15.13 Sep 20, 2024
0.15.12 Sep 13, 2024
0.15.10 Sep 10, 2024
0.15.9 Aug 30, 2024
0.15.8 Aug 27, 2024
0.15.7 Aug 20, 2024
0.15.6 Aug 20, 2024
0.15.5 Aug 16, 2024
0.15.3 Aug 14, 2024
0.15.1 Aug 05, 2024
0.15.0 Jul 19, 2024
0.14.10 Jul 09, 2024
0.14.9 Jun 27, 2024
0.14.8 Jun 24, 2024
0.14.7 Jun 20, 2024
0.14.6 Jun 14, 2024
0.14.5 Jun 07, 2024
0.14.4 Jun 03, 2024
0.14.3 May 29, 2024
0.14.2 May 22, 2024
0.14.2.dev1 May 21, 2024
0.14.0 May 17, 2024
0.13.7 May 08, 2024
0.13.6 Apr 30, 2024
0.13.5 Apr 29, 2024
0.13.4 Apr 26, 2024
0.13.3 Apr 21, 2024
0.13.2 Apr 05, 2024
0.13.1 Apr 04, 2024
0.13.0 Apr 01, 2024
0.12.6 Mar 08, 2024
0.12.5 Feb 28, 2024
0.12.4 Feb 08, 2024
0.12.3 Jan 29, 2024
0.12.2 Jan 21, 2024
0.12.0 Jan 10, 2024
0.11.8 Jan 03, 2024
0.11.7 Jan 03, 2024
0.11.6 Dec 20, 2023
0.11.5 Dec 17, 2023
0.11.4 Dec 15, 2023
0.11.2 Nov 30, 2023
0.11.1 Nov 29, 2023
0.11.0 Nov 20, 2023
0.10.30 Nov 10, 2023
0.10.29 Nov 07, 2023
0.10.28 Oct 31, 2023
0.10.27 Oct 26, 2023
0.10.26 Oct 25, 2023
0.10.25 Oct 21, 2023
0.10.24 Oct 17, 2023
0.10.23 Oct 16, 2023
0.10.22 Oct 13, 2023
0.10.21 Oct 11, 2023
0.10.20 Oct 11, 2023
0.10.19 Oct 05, 2023
0.10.19.dev18 Sep 30, 2023
0.10.18 Sep 29, 2023
0.10.16 Sep 20, 2023
0.10.15 Sep 16, 2023
0.10.14 Sep 11, 2023
0.10.13 Sep 11, 2023
0.10.12 Sep 04, 2023
0.10.11 Sep 01, 2023
0.10.10 Aug 31, 2023
0.10.9 Aug 30, 2023
0.10.8 Aug 28, 2023
0.10.7 Aug 27, 2023
0.10.6 Aug 26, 2023
0.10.5 Aug 22, 2023
0.10.4 Aug 18, 2023
0.10.2 Aug 17, 2023
0.10.1 Aug 17, 2023
0.10.0 Aug 16, 2023
0.9.3 Aug 15, 2023
0.9.2 Aug 11, 2023
0.9.1 Aug 09, 2023
0.9.0 Aug 01, 2023
0.8.8 Aug 01, 2023
0.8.7 Jul 28, 2023
0.8.6 Jul 28, 2023
0.8.5 Jul 27, 2023
0.8.4 Jul 26, 2023
0.8.3 Jul 26, 2023
0.8.1 Jul 11, 2023
0.8.0 Jul 07, 2023
0.7.12 Jul 01, 2023
0.7.11 Jun 30, 2023
0.7.10 Jun 28, 2023
0.7.9 Jun 26, 2023
0.7.8 Jun 23, 2023
0.7.7 Jun 20, 2023
0.7.6 Jun 16, 2023
0.7.5 Jun 14, 2023
0.7.4 Jun 12, 2023
0.7.3 Jun 09, 2023
0.7.2 Jun 07, 2023
0.7.1 Jun 01, 2023
0.7.0 May 31, 2023
0.6.11 May 30, 2023
0.6.10 May 26, 2023
0.6.9 May 24, 2023
0.6.8 May 19, 2023
0.6.7 May 19, 2023
0.6.6 May 12, 2023
0.6.5 May 10, 2023
0.6.4 May 08, 2023
0.6.3 May 04, 2023
0.6.2 Apr 26, 2023
0.6.1 Apr 21, 2023
0.6.0 Apr 21, 2023
0.5.13 Apr 19, 2023
0.5.12 Apr 12, 2023
0.5.11 Apr 05, 2023
0.5.10 Apr 05, 2023
0.5.9 Apr 03, 2023
0.5.8 Mar 30, 2023
0.5.7 Mar 25, 2023
0.5.6 Mar 21, 2023
0.5.4 Mar 14, 2023
0.5.3 Mar 09, 2023
0.5.2 Mar 02, 2023
0.5.1 Mar 01, 2023
0.5.0 Feb 28, 2023
0.4.16 Feb 28, 2023
0.4.15 Feb 23, 2023
0.4.14 Feb 23, 2023
0.4.13 Feb 23, 2023
0.4.12 Feb 23, 2023
0.4.11 Feb 17, 2023
0.4.10 Feb 16, 2023
0.4.9 Feb 15, 2023
0.4.8 Feb 10, 2023
0.4.7 Feb 10, 2023
0.4.6 Feb 03, 2023
0.4.4 Jan 25, 2023
0.4.3 Jan 18, 2023
0.4.2 Jan 17, 2023
0.4.1 Jan 13, 2023
0.4.0 Jan 11, 2023
0.3.5 Jan 05, 2023
0.3.4 Dec 21, 2022
0.3.3 Dec 20, 2022
0.3.2 Dec 15, 2022
0.3.1 Dec 14, 2022
0.3.0 Dec 14, 2022
0.2.6.dev1 Nov 23, 2022
0.2.5 Nov 11, 2022
0.2.4 Nov 11, 2022
0.2.3 Nov 10, 2022
0.2.2 Nov 08, 2022
0.2.1 Oct 21, 2022
0.2.0 Sep 26, 2022
0.0.1.dev0 Sep 06, 2022

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
beautifulsoup4 (<5.0.0,>=4.14.3)
charset-normalizer (<4.0.0,>=3.4.4)
emoji (<3.0.0,>=2.15.0)
filelock (<4.0.0,>=3.12.0)
filetype (<2.0.0,>=1.2.0)
html5lib (<2.0.0,>=1.1)
installer (<1.0.0,>=0.7.0)
langdetect (<2.0.0,>=1.0.9)
lxml (<7.0.0,>=5.0.0)
numba (<1.0.0,>=0.60.0)
numpy (<3.0.0,>=1.26.0)
psutil (<8.0.0,>=7.2.2)
python-iso639 (<2027.0.0,>=2026.1.31)
python-magic (<1.0.0,>=0.4.27)
python-oxmsg (<1.0.0,>=0.0.2)
rapidfuzz (<4.0.0,>=3.14.3)
regex (<2027.0.0,>=2024.0.0)
requests (<3.0.0,>=2.32.5)
spacy (<4.0.0,>=3.7.0)
tqdm (<5.0.0,>=4.67.3)
typing-extensions (<5.0.0,>=4.15.0)
unstructured-client (<1.0.0,>=0.25.9)
wrapt (<3.0.0,>=2.1.1)