LibreAI / Dev Tools / langextract
// devtools · google/langextract

langextract

Google's Python library for extracting structured data from unstructured text with LLMs, with grounding

★ 38.9k stars⑂ 2.7k forksApache-2.0updated 2026-10
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

langextract is an open-source dev tools project by google (google/langextract on GitHub). It has 38,930 GitHub stars and 2,720 forks, is released under the Apache-2.0 license, and was last updated on GitHub on 6 October 2026.

GitHub stars
38,930
Forks
2,720
License
Apache-2.0
Last updated on GitHub
6 October 2026
Category
Dev Tools
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Clarify your goal

    Decide what you want from langextract and check the README and requirements to confirm it fits your setup and Python environment.

  2. Get the code

    Clone the repository from GitHub (github.com/google/langextract) or use the documented install channel if you do not need the source.

  3. Install and configure

    Follow the README quickstart to install dependencies and set any required configuration or credentials.

  4. Run your first task

    Work through the README's first example end to end, then adapt it to your own project or data.

// features

Why people love it

Structured extraction

Extracts structured information from unstructured text using LLMs.

Precise source grounding

Every extraction is grounded to its exact source span in the document.

Interactive visualization

Visualize extraction results interactively to verify quality.

Long documents

Scales to longer documents beyond a single context window.

Vertex AI batch

Supports Vertex AI batch processing for large jobs.

Model flexible

Works with Gemini models and other providers as documented.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Start by getting the source and entering the project directory.

    git clone https://github.com/google/langextract.git
    cd langextract
  2. Install from PyPI

    Install the langextract package.

    pip install langextract  # see README Installation section
  3. Define and run an extraction

    Define your extraction task with examples, run it on text, then visualize the grounded results.

    # see README Quick Start for the example code
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains langextract?

It is maintained by google and contributors on GitHub, where the repository github.com/google/langextract is the canonical home for code, issues and releases.

Is langextract free to use?

Yes — it is open source under the Apache-2.0 license. Read the license in the repository for what is permitted, including any conditions on redistribution or commercial use.

Does it need a paid API key?

Yes for cloud models — for example a Gemini API key; setup for cloud models is documented in the README.

How does langextract compare to alternatives?

Compared with hand-written regex or plain prompting: LangExtract adds few-shot task definition, exact source grounding and visualization on top of raw LLM prompting.

How do I get started?

Clone github.com/google/langextract, follow the README quickstart to install it, and run the documented first example before adapting it to your own work.

// keep exploring

Similar tools

Dev Tools

mediapipe

Google's cross-platform framework for on-device ML perception: vision, text and audio pipelines

★ 37.2k starsApache-2.0
View guide →
Dev Tools

trafilatura

Trafilatura — a Python and CLI tool to crawl the web and extract clean text and metadata for corpora and RAG.

★ 6.9k starsApache-2.0
View guide →
Dev Tools

AnyCrawl

A Node.js crawler that turns websites into LLM-ready data and extracts structured SERP results.

★ 3.5k starsMIT
View guide →
Dev Tools

ddgs

A Python metasearch library aggregating many web search services — plus CLI, API and MCP server

★ 3.0k starsMIT
View guide →
Dev Tools

datasets

Hugging Face's library for loading and processing datasets for AI models in one line

★ 22.0k starsApache-2.0
View guide →
Dev Tools

WrenAI

GenBI for AI agents - governed text-to-SQL and dashboards through an open context layer

★ 17.8k starsNOASSERTION
View guide →
// alternatives

Alternatives in Dev Tools

The most-starred other Dev Tools projects in the LibreAI catalogue — the realistic shortlist if langextract is not the right fit.

Get langextract

Free and open — grab the source, star the repo, and start creating.