eyecite
Tool for extracting legal citations from text strings.
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 eyeciteuv
uv add eyecitepoetry
poetry add eyeciteInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
reporters-dbProvides a comprehensive database of U.S. court…
permissive · top 15,000 on PyPI
courts-dbProvides a searchable database of current and…
permissive · top 15,000 on PyPI
textractExtracts text from documents in multiple…
permissive · top 15,000 on PyPI
citeproc-pyciteproc-py processes Citation Style Language…
permissive · top 15,000 on PyPI
sphinxcontrib-bibtexA Sphinx extension that enables BibTeX-style…
permissive · top 5,000 on PyPI
pdfminer.sixExtracts text, images, and layout information…
permissive · top 1,000 on PyPI
goose3Extracts article text, metadata, images, and…
permissive · top 15,000 on PyPI
cohere-melodyParses and renders templated text for Cohere…
permissive · top 15,000 on PyPI
langextractLangExtract uses LLMs to extract and ground…
permissive · top 15,000 on PyPI
wikitextparserParses and manipulates MediaWiki wikitext…
copyleft · top 15,000 on PyPI