docling vs langextract
Two of the top projects in Data and scraping for AI, side by side: who leads on each score part and who each one suits, then setup, license, activity and what each review found.
docling
Python library and CLI that converts PDFs, Office files and more into structured text
langextract
Python library that extracts source-grounded structured data from text using LLMs
Verdict
docling ranks higher, 72 to 57. Of the 5 score parts we measure for both, docling leads on 3, langextract on 1 and 1 is even.
- Adoptiondocling leads by 22 points, 61 to 39: a wide gap.
- FreshnessEven at 100.
- Maintenancelangextract leads by 1 point, 82 to 81: close to even.
- Easy to rundocling leads by 17 points, 50 to 33: a wide gap.
- Agent-readydocling leads by 85 points, 85 to 0: a wide gap.
Pick docling if you are
Developers preparing documents for RAG and LLM pipelines
- Wide input coverage: PDF, Office, ODF, EPUB, email, Apple iWork, XBRL, audio, video
- Local execution suits sensitive data and air-gapped environments
Pick langextract if you are
Python developers extracting structured data from long documents
- Each extraction is grounded to a character span; ungrounded results get char_interval = None
- Chunking, parallel workers and multiple passes for long documents (max_workers, extraction_passes)
| What we compare | docling | langextract |
|---|---|---|
| Score parts, out of 100 | ||
| Adoption | 61, popular | 39, known |
| Freshness | 100, active | 100, active |
| Maintenance | 81, healthy | 82, healthy |
| Easy to run | 50, easy | 33, some setup |
| Agent-ready | 85, ready | 0, none |
| Facts from GitHub and the README | ||
| Stars | 68.8k | 38.9k |
| License | MIT (permissive) | Apache-2.0 (permissive) |
| Last commit | Oct 2026 | Oct 2026 |
| Last release | Oct 2026 | Oct 2026 |
| Language | Python | Python |
| Docker | Yes | Yes |
| GPU | Optional | Optional |
| arm64 or Apple Silicon | Mentioned | Not stated |
docling
Docling parses PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, audio and other formats into a unified DoclingDocument, with PDF layout, reading order, table structure, code and formula recognition. It exports to Markdown, HTML, DocLang, DocTags and lossless JSON. It runs locally via a CLI or Python API, with OCR, VLM support (GraniteDocling), an MCP server and a docling-serve API server.
Who it is for: Developers preparing documents for RAG and LLM pipelines
Strengths
- Wide input coverage: PDF, Office, ODF, EPUB, email, Apple iWork, XBRL, audio, video
- Local execution suits sensitive data and air-gapped environments
- Integrations with LangChain, LlamaIndex, Crew AI and Haystack
- Ships a CLI, Python API, MCP server and docling-serve HTTP server
Weaknesses
- Hardware requirements (RAM, GPU) are not stated in the README
- Individual models carry their own licenses, separate from the MIT codebase
- Metadata extraction and chemistry understanding are listed as coming soon
- Requires Python 3.10 or higher; 3.9 support was dropped in 2.70.0
- GPU optional
- Docker
- Models: GraniteDocling, VLMs, OCR engines, ASR models
langextract
LangExtract is a Python library that takes a prompt and few-shot examples, runs an LLM over unstructured text, and returns structured extractions mapped to exact character spans in the source. Long documents are handled by chunking, parallel workers and multiple passes. Results save to JSONL and render as an interactive HTML review page. Backends include Gemini, OpenAI and local Ollama models.
Who it is for: Python developers extracting structured data from long documents
Strengths
- Each extraction is grounded to a character span; ungrounded results get char_interval = None
- Chunking, parallel workers and multiple passes for long documents (max_workers, extraction_passes)
- Gemini, OpenAI and Ollama supported, plus a plugin system for custom providers
- Generates a self-contained interactive HTML view of extractions in context
Weaknesses
- Output schema is driven by few-shot examples; poor examples cause alignment warnings and weaker results
- Ollama provider does not support output_schema
- Controlled generation is documented mainly for Gemini; cloud models need an API key
- Library only, with no server or UI beyond the HTML visualization
- GPU optional
- Docker
- Needs Gemini, OpenAI or Vertex AI API key for cloud models, Ollama for local models
- Models: Gemini, OpenAI, Ollama, Vertex AI, OpenAI-compatible endpoints
More in Data and scraping for AI
Building with these?
We help teams pick an open-source AI stack and run it in production. Client work never changes a rank.