langchain-unstructured
An integration package connecting Unstructured and LangChain
What it is and what it does
langchain-unstructured is a LangChain integration that bridges document loading with Unstructured's file partitioning capabilities. It wraps the UnstructuredLoader class to extract and chunk content from files—PDFs, documents, and other formats—either by calling the hosted Unstructured API (with an API key) or by using local partitioning. The loader automatically detects file types and supports post-processing parameters like chunking strategies (e.g., "by_title") to segment documents into text chunks suitable for retrieval-augmented generation (RAG) and other LLM workflows.
The package depends on langchain-core for the LangChain framework integration and unstructured-client for API communication. It requires Python 3.10 or later and is actively maintained. Users configure it by setting an environment variable or passing credentials directly, then instantiate the loader with file paths and optional partitioning parameters, and call load() to retrieve a list of document objects with content and metadata.
Use it for:
- Extract and chunk PDF documents for RAG pipelines in LangChain applications.
- Batch load multiple document files with automatic format detection and structured partitioning.
- Preprocess documents with configurable chunking strategies before feeding them to language models.
- Integrate document parsing into LangChain workflows without writing custom file-handling code.
- Process documents either via a remote API or locally, depending on infrastructure and latency requirements.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates LangChain with Unstructured to partition and load documents from files, supporting both API-based and local processing with configurable chunking strategies.
Yes. Low install friction, active maintenance, permissive MIT license, and no known vulnerabilities make this a straightforward choice for LangChain users needing document loading and partitioning. Install it if you are building RAG systems or document-processing pipelines with LangChain and want Unstructured's file handling without custom integration code.
Install
langchain-unstructured on PyPI
pip
pip install langchain-unstructureduv
uv add langchain-unstructuredpoetry
poetry add langchain-unstructuredInstalling langchain-unstructured
Before you install
Low friction install with just two runtime dependencies. Actively maintained as of August 2026, with recent commits and no archived status.
License in practice
MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install langchain-unstructured unstructured-client
export UNSTRUCTURED_API_KEY="your-api-key"
from langchain_unstructured import UnstructuredLoader
loader = UnstructuredLoader(
file_path=["example.pdf"],
api_key="your-api-key",
partition_via_api=True
)
docs = loader.load()
print(docs[0].page_content)
Requires UNSTRUCTURED_API_KEY environment variable or explicit api_key parameter for API-based partitioning; local partitioning may require additional unstructured library installation.
Verify before relying
- Whether local partitioning mode (without API) requires separate unstructured package installation beyond what is listed as runtime deps.
- Performance characteristics and latency when processing large files or batches via the Unstructured API.
- Supported file formats beyond PDF mentioned in the excerpt.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0.0,>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — langchain-core, unstructured-client |
| Maintenance | actively maintained — 230 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 297,077/month — #7,890 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langchain_unstructured-1.0.1-py3-none-any.whl
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
langchain-doclingIntegrates Docling document conversion with…
permissive · top 15,000 on PyPI
unstructured-ingestUnstructured Ingest is a local ETL pipeline…
permissive · top 15,000 on PyPI
unstructuredIngests and pre-processes unstructured…
permissive · top 5,000 on PyPI
langchain-text-splittersSplits text documents into chunks using a…
permissive · top 1,000 on PyPI
unstructured-clientHTTP client SDK for the Unstructured Platform…
permissive · top 5,000 on PyPI
embedchainEmbedchain is a framework for building…
permissive · top 15,000 on PyPI
langchain-oracledbIntegrates Oracle Database with LangChain to…
unclear · top 15,000 on PyPI
langchain-chromaConnects LangChain applications to Chroma, a…
permissive · top 5,000 on PyPI
langchain-cohereConnects LangChain applications to Cohere's…
permissive · top 5,000 on PyPI
langchain-qdrantConnects LangChain applications to Qdrant…
permissive · top 5,000 on PyPI