Skip to content

Kreuzberg

Document intelligence with a Rust core and polyglot SDKs. Extract text, tables, metadata, and audio transcripts from 96 formats with optional OCR — usable as an SDK, CLI, REST API, MCP server, or Docker image.


Why Kreuzberg

  • High Performance

Rust core with pdf_oxide PDF extraction, SIMD optimizations, and full parallelism. Process thousands of documents per minute without a GPU.

  • 96 File Formats

PDF, DOCX, XLSX, PPTX, images, HTML, XML, emails, archives, academic formats, and audio/video transcription when enabled.

  • Multi-Engine OCR

Tesseract works across native and Wasm targets. PaddleOCR is available on native ONNX Runtime builds; EasyOCR is Python-only.

  • Polyglot SDKs

SDKs for Python, TypeScript, Rust, Go, Java, Kotlin Android, C#, Ruby, PHP, Elixir, R, Dart, Swift, Zig, C, and WebAssembly. Kotlin/JVM consumers use the Java artifact.

  • Code Intelligence

Extract functions, classes, imports, symbols, and docstrings from 306 programming languages. Results in the code_intelligence field with semantic chunking.

  • Plugin System

Register custom extractors, OCR backends, reranker backends, validators, post-processors, and renderers.

See all features


Language Support

Language Package Docs
Python pip install kreuzberg API Reference
TypeScript (Native) npm install @kreuzberg/node API Reference
TypeScript (WASM) npm install @kreuzberg/wasm API Reference
Rust cargo add kreuzberg API Reference
Go go get github.com/kreuzberg-dev/kreuzberg/v5 API Reference
Java / Kotlin JVM Maven Central dev.kreuzberg:kreuzberg API Reference
Kotlin Android Maven Central dev.kreuzberg:kreuzberg-android API Reference
C# dotnet add package Kreuzberg API Reference
Ruby gem install kreuzberg API Reference
PHP composer require kreuzberg-dev/kreuzberg API Reference
Elixir {:kreuzberg, "~> 5.0.0-rc.17"} API Reference
R r-universe kreuzberg API Reference
Dart / Flutter dart pub add kreuzberg API Reference
Swift Swift Package Manager API Reference
Zig zig fetch --save from GitHub API Reference
C (FFI) Shared library + header API Reference
CLI brew install kreuzberg-dev/tap/kreuzberg CLI Guide
Docker ghcr.io/kreuzberg-dev/kreuzberg Docker Guide

Homebrew 6.0+ requires explicit trust for third-party taps. Run brew trust kreuzberg-dev/tap once before installing the CLI from kreuzberg-dev/tap.

Choosing Between TypeScript Packages

@kreuzberg/node — Use for Node.js servers and CLI tools. Native performance (100% speed).

@kreuzberg/wasm — Use for browsers, Cloudflare Workers, Deno, Bun, and serverless environments (60-80% speed, cross-platform).


Quick Example

Python
from kreuzberg import extract_file_sync, ExtractionConfig

result = extract_file_sync("document.pdf", config=ExtractionConfig())

print(result.content[:200])
print(f"Tables: {len(result.tables)}")
print(f"Format: {result.metadata.format_type}")
TypeScript
import { extractFileSync } from "@kreuzberg/node";

const result = extractFileSync("document.pdf");

console.log(result.content);
console.log(`Tables: ${result.tables.length}`);
console.log(`Metadata: ${JSON.stringify(result.metadata)}`);
Rust
use kreuzberg::{extract_file_sync, ExtractionConfig};

fn main() -> kreuzberg::Result<()> {
    let config = ExtractionConfig::default();
    let result = extract_file_sync("document.pdf", None, &config)?;

    println!("{}", result.content);
    println!("MIME type: {}", result.mime_type);
    println!("Tables: {}", result.tables.len());
    Ok(())
}

Part of Kreuzberg.dev

Kreuzberg is the document intelligence core in the Kreuzberg.dev ecosystem.

Managed extraction API with SDKs, dashboards, and observability.

Web crawling and scraping with HTML to Markdown and headless-Chrome fallback.

Fast, lossless HTML to Markdown engine.

Universal LLM API client with native bindings for 14 languages and 143 providers.

Tree-sitter grammars and code-intelligence primitives.

Community chat for Kreuzberg.dev users and contributors.


Explore the Docs

  • Getting Started

Install Kreuzberg and extract your first document in minutes.

Quick Start

  • Guides

Configuration, OCR setup, Docker deployment, plugins, and more.

All Guides

  • Concepts

Architecture, extraction pipeline, MIME detection, and performance.

Architecture

  • API Reference

Complete API docs for every language binding, types, and errors.

References

  • CLI & Servers

Command-line tool, REST API server, and MCP server for AI agents.

CLI Usage

  • Migration

Migrate from Unstructured or other document extraction libraries, including the v5 image-index change.

Migration Guides v5 Image Indices


Getting Help

Edit this page on GitHub