← All projects
Developer building blocks

LangExtract

Pulls key facts out of long text, like clinical notes or reports, and shows exactly where each one came from.

What it does

LangExtract is a Python library that uses AI language models to pick out specific information from messy text. You describe what you want with instructions and a few examples, such as medication names and doses in a doctor's note.

Each fact it finds is linked to its exact spot in the original text, so you can check it. It can create an interactive web page that highlights everything it found, and it is designed to handle very long documents.

It works with Google's Gemini models, other cloud models and local models through Ollama. Its makers note that accuracy depends on the model, the task and how clearly you write the instructions.

Who it's for

Developers and researchers who need to turn large amounts of text into organised data.

Can I use it without coding?

Developers only. A Python library used from code. There is an online demo to try it in your browser. New to this? Start here.

Can I run it?

Cost
Free, but needs an AI accountThe software is free, but it uses an online AI service (like OpenAI or Anthropic), which usually charges for use.
Computer
An ordinary computer is fine
Privacy
Your choice: run it on your device or use an online service
API key
Not needed

Try it

Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?

Before you install

  • Only download from the official GitHub page. Copies with similar names exist for many popular projects.
  • License (Apache-2.0): Permissive: free to use, change and share, including for business.
  • More on staying safe

Where people are talking about it