kreuzberg
High-performance document intelligence library for Python. Extract text, metadata, and structured data from PDFs, Office documents, images, and 88+ formats. Powered by Rust core for 10-50x speed improvements.
What it is and what it does
Kreuzberg is a document extraction library that reads text, tables, images, and metadata from a wide range of file formats—PDFs, Office documents, images, code files, and structured data formats. It wraps a Rust core with Python bindings and provides async/await support for non-blocking processing. The library handles 91+ formats across office documents, images with OCR, web markup, email, archives, and academic/scientific formats, plus code intelligence for 248 programming languages with structure extraction and docstring parsing.
You use it to automate document processing pipelines: feed it a file path, optionally configure extraction behavior (OCR backend, caching, quality processing), and receive structured output with content, tables, detected languages, and metadata. It's designed for batch processing, content indexing, and data extraction workflows where you need to handle heterogeneous document types without format-specific parsing code.
Use it for:
- Extract text and tables from mixed document types (PDFs, Word, Excel) in a single pipeline.
- Process scanned documents with OCR using configurable backends (Tesseract, EasyOCR, PaddleOCR).
- Batch-extract code structure and docstrings from repositories for documentation or analysis.
- Build document indexing systems that preserve table structure and embedded metadata.
- Generate embeddings from document content using ONNX Runtime models for semantic search.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extracts text, tables, images, and metadata from 91+ file formats including PDFs, Office documents, and images, with native async/await support and multiple OCR backends.
Yes, if you need multi-format document extraction with async support and don't mind the Python 3.10+ requirement. The library is actively maintained (v4 LTS through end of 2026), has no known vulnerabilities, and covers a broad format range. Install friction is moderate due to compiled bindings, but wheels are available for common platforms. Best suited for document processing pipelines where format heterogeneity is a pain point.
Install
kreuzberg on PyPI
pip
pip install kreuzberguv
uv add kreuzbergpoetry
poetry add kreuzbergInstalling kreuzberg
Before you install
Medium install friction due to compiled Rust bindings; wheels available for modern Python (3.10+) on common platforms. Active maintenance with recent releases; v4 is long-term-support line receiving critical fixes through end of 2026.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects without licensing concerns.
Quickstart
pip install kreuzberg
import asyncio
from kreuzberg import extract_file
async def main():
result = await extract_file("document.pdf")
print(result.content)
asyncio.run(main())
Requires Python 3.10+; optional Tesseract OCR or ONNX Runtime 1.22.x for full feature support.
Verify before relying
- Performance improvement claims (10-50x speed) relative to other Python document extraction libraries.
- Actual number of supported programming languages for code intelligence (stated as 248).
- Completeness of OCR backend support (Tesseract, EasyOCR, PaddleOCR) and their integration maturity.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 33 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 215,433/month — #9,401 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kreuzberg-4.10.2-cp310-abi3-macosx_14_0_arm64.whl; kreuzberg-4.10.2-cp310-abi3-manylinux_2_28_aarch64.whl; kreuzberg-4.10.2-cp310-abi3-manylinux_2_28_x86_64.whl; kreuzberg-4.10.2-cp310-abi3-win_amd64.whl
Keywords: document-extraction, document-intelligence, document-parsing, document-processing, docx, easyocr, email-parsing, html, markdown, metadata-extraction, ocr, office-documents, pdf, pdf-extraction, performance, pptx, rust, table-extraction, tesseract, text-extraction, xlsx, xml
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
img2tableIdentifies and extracts tables from images and…
permissive · top 15,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
aurelio-sdkClient library for the Aurelio Platform that…
unclear · top 15,000 on PyPI
pdf-oxideExtracts text, images, and metadata from PDFs…
permissive · top 15,000 on PyPI
paddleocrPaddleOCR extracts text, tables, and structured…
permissive · top 5,000 on PyPI
textractExtracts text from documents in multiple…
permissive · top 15,000 on PyPI
unPDFExtracts individual characters and metadata…
permissive · top 15,000 on PyPI
marker-pdfMarker converts PDFs, images, and other…
permissive · top 15,000 on PyPI
tikaTika-python provides Python access to Apache…
permissive · top 15,000 on PyPI
factur-xGenerates, validates, and extracts Factur-X,…
permissive · top 15,000 on PyPI