Search CourtListener opinions via GET https://www.courtlistener.com/api/rest/v3/opinions/?search={query}&court={court_id}&filed_after={date} to find relevant case law; obtain a free API token for higher rate limits.
Retrieve full opinion text (HTML or plain text) via the absolute_url or download_url field in the opinion object; parse citation strings from the citation field.
Use the Caselaw Access Project (CAP) API at https://api.case.law/v1/cases/?search={query}&jurisdiction={slug} for historical state and federal cases; note that full text access requires a registered account with a confirmed research use case for some collections.
Extract citations from retrieved opinion text using a citation parser library (e.g., eyecite in Python) to build a citation network for a given legal issue.
For each retrieved case, record: case name, citation, court, decision date, jurisdiction, and a summary or headnotes for downstream retrieval-augmented generation (RAG) workflows.
Always present retrieved case law to a qualified attorney for legal interpretation; automated retrieval does not constitute legal research and citations must be verified for current validity (e.g., via Westlaw/Lexis Shepardizing).
Known gotchas
CourtListener's full-text search index may not include the most recent opinions; always supplement with direct court website monitoring for cutting-edge issues.
Case citations can be ambiguous (short form, parallel citations, unofficial reporters); use a structured citation parser rather than regex to resolve them accurately.
The Caselaw Access Project has data through 2018 for most jurisdictions; it does not contain current case law and should not be used as the sole source for recent legal research.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp