skillfed

eyecite

Tool for extracting legal citations from text strings.

eyecite v2.7.8 381.4K downloads/30d#7,095 on PyPI268
Permissive license BSD-2-Clause Active released

What it is and what it does

eyecite is a citation extraction tool designed to recognize and parse legal citations from American legal text. It identifies full case citations (e.g., "Bush v. Gore, 531 U.S. 98"), statutory references, law journal citations, and reference forms like "supra" and "Id." The package is built on a database trained against over 55 million existing citations and is used by CourtListener and Harvard's Caselaw Access Project to process millions of legal documents.

The package provides four core functions: extraction (finding citations in text), aggregation (linking related citations like "supra" to their antecedents), annotation (marking up citations with custom markup), and text cleaning. It depends on courts-db and reporters-db for citation pattern databases, plus lxml, pyahocorasick, regex, and fast-diff-match-patch for text processing. It requires Python 3.10 or later.

Use it for:

  • Extract citations from court opinions or legal briefs for indexing or linking to case databases
  • Identify statutory references in legal documents to cross-reference legislation
  • Resolve short-form citations like "Id." and "supra" back to their original case references
  • Annotate legal text with markup around each citation for downstream processing or display
  • Preprocess and clean legal text before analysis or machine learning workflows

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Extracts legal citations from text, recognizing case names, statutory references, law journal citations, and other citation patterns common in American legal documents.

Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and solves a specific and well-defined problem for legal text processing. It is production-stable and already proven at scale by major legal research projects. Install it if you need to extract or parse legal citations from American legal documents.

Install

eyecite on PyPI

pip

pip install eyecite

uv

uv add eyecite

poetry

poetry add eyecite

Installing eyecite

Before you install

Low friction install with six runtime dependencies. Actively maintained with a recent release; last commit was 2026-08-14 and the project has been in active development since 2021.

License in practice

BSD-2-Clause permissive license allows use in most projects, including commercial ones, with minimal restrictions beyond attribution.

Quickstart

pip install eyecite

from eyecite import get_citations

text = "Foo v. Bar, 1 U.S. 2, 3-4 (1999). Id. at 5."
citations = get_citations(text)
for citation in citations:
    print(citation)

Requires Python 3.10 or later; depends on courts-db and reporters-db databases which are installed as dependencies.

Verify before relying

  • Whether the package handles citations from non-U.S. legal systems or only American law
  • Performance characteristics when processing very large documents or batches
  • Accuracy rates or benchmarks against real-world legal corpora

Package facts

License BSD-2-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 6 — courts-db, fast-diff-match-patch, lxml, pyahocorasick, regex, reporters-db
Maintenance actively maintained — 44 days since the last release
Last repo commit
First released
Downloads 381,356/month — #7,095 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: eyecite-2.7.8-py3-none-any.whl

Keywords: legal, courts, citations, extraction, cites

Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Tags

legal citation extractionparse court case citationsextract legal references from textcase law citation parserstatutory citation recognitionlegal document citation finderAmerican legal citation tool
legal-techcitation-parsingnlp

More Python Modules packages