--- id: langchain-unstructured version: "1.0.1" license: MIT license_treatment: permissive maintenance: active --- # langchain-unstructured — An integration package connecting Unstructured and LangChain License: permissive · Maintenance: active · Downloads: 297.1K/mo ## 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 above — 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 pip install langchain-unstructured uv add langchain-unstructured poetry add langchain-unstructured ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 297.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags document loader langchain, unstructured file parsing, pdf extraction langchain, document chunking rag, file partitioning api, langchain document integration, unstructured integration, document-loading, rag-pipeline, langchain-integration [View on SkillFed](https://skillfed.io/packages/langchain-unstructured) · [View on PyPI](https://pypi.org/project/langchain-unstructured/)