CourtListener API: Search case law
Searches CourtListener US court opinions by keywords or case name, with optional court, decision dates and sorting.
Unofficial. Not affiliated with or endorsed by CourtListener.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Page optional
page Result page to start with, for example 2. Each page contains up to 20 cases.
2
Whole number 1 or more. Default
1.- Sort optional
sort Order results by relevance, newest, oldest, or most cited; for example newest.
newest
One of
relevance,newest,oldest,most_cited. Defaultrelevance.- Court optional
court Court name, such as Supreme Court, 9th Circuit, or California; leave blank for all courts.
9th Circuit
Default
.- Query, required
query Keywords or a case name, for example Miranda v. Arizona.
fair use software
- Max Results optional
max_results Maximum cases to return, for example 20 (up to 50).
22
Whole number from 1 to 50. Default
20.- Decided After optional
decided_after Earliest decision date, for example 2015-01-01.
Not set
- Decided Before optional
decided_before Latest decision date, for example 2020-12-31.
Not set
Input as JSON
{ "page": 2, "sort": "newest", "court": "9th Circuit", "query": "fair use software", "max_results": 22}Output
{ "cases": [ { "link": "https://www.courtlistener.com/opinion/10660890/popa-v-microsoft-corporation/" , "court": "Court of Appeals for the Ninth Circuit", "judges": null, "snippet": "action against Microsoft Corporation concerning the use of session-replay technology. Session-replay", "case_name": "Popa v. Microsoft Corporation", "citations": [], "cluster_id": 10660890, "times_cited": 0, "date_decided": "2025-08-26", "docket_number": "24-14", "precedential_status": "Published" }, { "link": "https://www.courtlistener.com/opinion/10658061/island-industries-inc-v-sigma-corporation/" , "court": "Court of Appeals for the Ninth Circuit", "judges": null, "snippet": "exported to the United States at less than their fair value. 19 U.S.C. § 1673. Commerce issues antidumping", "case_name": "Island Industries, Inc. v. Sigma Corporation", "citations": [], "cluster_id": 10658061, "times_cited": 0, "date_decided": "2025-08-21", "docket_number": "22-55063", "precedential_status": "Published" }, { "link": "https://www.courtlistener.com/opinion/10646240/doe-1-v-twitter-inc/" , "court": "Court of Appeals for the Ninth Circuit", "judges": null, "snippet": "230(a)–(b) (enumerating Congress’s objectives); Fair Hous. Council of San Fernando Valley v. Roommates", "case_name": "Doe 1 v. Twitter, Inc.", "citations": [], "cluster_id": 10646240, "times_cited": 0, "date_decided": "2025-08-01", "docket_number": "24-177", "precedential_status": "Published" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"courtlistener.com/search_case_law","input":{"page":2,"sort":"newest","court":"9th Circuit","query":"fair use software","max_results":22}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "courtlistener.com/search_case_law" , "input": { "page": 2, "sort": "newest", "court": "9th Circuit", "query": "fair use software", "max_results": 22 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "courtlistener.com/search_case_law" , "input": { "page": 2, "sort": "newest", "court": "9th Circuit", "query": "fair use software", "max_results": 22 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run courtlistener.com/search_case_law# with {"page":2,"sort":"newest","court":"9th Circuit","query":"fair use software","max_results":22}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "query" ], "properties": { "page": { "type": "integer", "default": 1, "minimum": 1, "description": "Result page to start with, for example 2. Each page contains up to 20 cases." }, "sort": { "enum": [ "relevance", "newest", "oldest", "most_cited" ], "type": "string", "default": "relevance", "description": "Order results by relevance, newest, oldest, or most cited; for example newest." }, "court": { "type": "string", "default": "", "description": "Court name, such as Supreme Court, 9th Circuit, or California; leave blank for all courts." }, "query": { "type": "string", "description": "Keywords or a case name, for example Miranda v. Arizona." }, "max_results": { "type": "integer", "default": 20, "maximum": 50, "minimum": 1, "description": "Maximum cases to return, for example 20 (up to 50)." }, "decided_after": { "type": "string", "description": "Earliest decision date, for example 2015-01-01." }, "decided_before": { "type": "string", "description": "Latest decision date, for example 2020-12-31." } }}Output schema
{ "type": "object", "required": [ "cases" ], "properties": { "cases": { "type": "array", "items": { "type": "object", "required": [ "case_name", "court", "date_decided", "citations", "docket_number", "judges", "snippet", "times_cited", "precedential_status", "link", "cluster_id" ], "properties": { "link": { "type": "string", "description": "CourtListener case page." }, "court": { "type": [ "string", "null" ], "description": "Deciding court." }, "judges": { "type": [ "string", "null" ], "description": "Judges as listed in the opinion." }, "snippet": { "type": [ "string", "null" ], "description": "Plain-text excerpt of matching opinion text." }, "case_name": { "type": [ "string", "null" ], "description": "Name of the case." }, "citations": { "type": "array", "items": { "type": "string" }, "description": "Reported citations." }, "cluster_id": { "type": [ "integer", "null" ], "description": "CourtListener opinion cluster ID." }, "times_cited": { "type": [ "integer", "null" ], "description": "Number of citations by other opinions." }, "date_decided": { "type": [ "string", "null" ], "description": "Decision date (YYYY-MM-DD)." }, "docket_number": { "type": [ "string", "null" ], "description": "Docket number." }, "precedential_status": { "type": [ "string", "null" ], "description": "Published or other status reported for this opinion." } } }, "description": "Matching court opinions." } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
courtlistener.com/search_case_law- Returns
- case name, court, decision date, citations, docket number, judges, snippet, times cited, status, link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method courtlistener.com/search_case_law with the inputs above.
Ask your agent
- Find federal appellate opinions about qualified immunity decided after 2018-01-01, sorted by most cited
- Look up Miranda v. Arizona and show the most cited cases citing it
- Search Supreme Court opinions on the Fourth Amendment warrantless cell phone searches, newest first
- Show 9th Circuit cases from 2010-06-01 to 2014-12-31 mentioning wrongful termination retaliation, page 2
- Find California court opinions on tenant eviction and security deposit disputes, oldest first, up to 35 results
See more
All CourtListener methodsFinds a US court opinion on CourtListener by case name, citation, or opinion link, and returns its metadata, opinions, judges, citing-case count and the lead opinion's full text from its PDF.
courtlistener.com/get_court_opinionFinds federal RECAP dockets involving a named person or company, newest filed first. Only dockets in the RECAP Archive appear.
courtlistener.com/search_federal_docketsSearches UK court judgments and tribunal decisions on Find Case Law by keywords or party names. Results can be filtered by court and by judgment date.
caselaw.nationalarchives.gov.uk/search_judgmentsLists Oyez Supreme Court cases for a term, sorted by argument date then name. Decision dates and vote splits are blank where Oyez does not provide them.
oyez.org/list_term_casesFinds an Oyez Supreme Court case by name or case link and returns its summary, decision, justice votes and argument audio links.
oyez.org/get_supreme_court_caseSearches Library of Congress digital collections by keywords, material format and date range, in Library search relevance order. Rights notes may be unavailable for some records.
loc.gov/search_collectionsSearches historic U.S. newspaper pages (Chronicling America) by text, with optional state and issue-year filters. Returns relevance-ranked page records with snippets and image links; newspaper OCR may contain transcription errors.
loc.gov/search_historic_newspapersSearches NPR-published articles by keyword, newest first or by best match, with optional publication dates, and returns each article's date, authors, section and summary.
npr.org/search_news