eyecite — Legal Citation Extractor
Extracts and resolves legal citations (case law, statutes, law journals) from any block of text, built by the Free Law Project.
eyecite
eyecite is an open-source Python library from the Free Law Project (the team behind CourtListener) that finds and parses legal citations in arbitrary text. It recognizes full case citations, short-form citations, id./supra references, statutory citations, and law-journal citations, then resolves them into structured objects you can link and cross-reference. It has been battle-tested extracting citations across tens of millions of U.S. court opinions.
Key features
- Detects full, short-form, supra, and id. citations, plus statutes and law-journal cites
- Resolves ambiguous short citations back to their antecedents
- Annotates source text with markup while preserving original character spans
- Proven at scale on the CourtListener corpus of court opinions
- Pure-Python and pip-installable, with an optional hyperscan backend for speed
A typical call runs get_citations(clean_text(text)) to return structured citation objects ready for downstream linking, analytics, or knowledge-graph building.
Curated mirror of the open-source eyecite (BSD-2-Clause). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/eyecite-legal-citation-extractor/check). Click a policy:
Consume eyecite — Legal Citation Extractor programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/eyecite-legal-citation-extractor
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/eyecite-legal-citation-extractor/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add eyecite-legal-citation-extractor
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/eyecite-legal-citation-extractor/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "eyecite-legal-citation-extractor" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.