google/langextract

A Python library for extracting structured information from unstructured text using LLMs with precise source grounding and interactive visualization.

79
/ 100
Verified

Supports multiple LLM providers (Google Gemini, OpenAI, local Ollama models) with pluggable custom providers, and uses optimized chunking and parallel processing to handle long documents efficiently. Enforces schema-compliant outputs through controlled generation on supported models, while automatically detecting hallucinated extractions that don't ground to source text. Generates interactive HTML visualizations that map each extracted entity back to its precise character position in the original document for verification and review.

34,668 stars and 173,955 monthly downloads. Actively maintained with 8 commits in the last 30 days. Available on PyPI.

Maintenance 17 / 25
Adoption 20 / 25
Maturity 24 / 25
Community 18 / 25

How are scores calculated?

Stars

34,668

Forks

2,330

Language

Python

License

Apache-2.0

Last pushed

Feb 25, 2026

Monthly downloads

173,955

Commits (30d)

8

Dependencies

17

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/nlp/google/langextract"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.