CourtListener API: Get court opinion
Finds 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.
Unofficial. Not affiliated with or endorsed by CourtListener.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Case, required
case Case name, citation, or CourtListener opinion link. Example: Obergefell v. Hodges.
576 U.S. 644
- Court optional
court Court name to distinguish matching cases. Example: Supreme Court of the United States.
(default)
Input as JSON
{ "case": "576 U.S. 644"}Output
{ "court": "Supreme Court of the United States", "opinions": [ { "type": "majority", "author": "Kennedy" }, { "type": "dissent", "author": "Roberts" }, { "type": "dissent", "author": "Scalia" } ], "case_name": "Obergefell v. Hodges", "citations": [ "192 L. Ed. 2d 609", "135 S. Ct. 2584", "2015 U.S. LEXIS 4250" ], "truncated": false, "author_judge": "Kennedy", "date_decided": "2015-06-26", "other_judges": [ "Ginsburg", "Breyer", "Sotomayor" ], "docket_number": "14-556", "lead_opinion_text": "_________________\n_________________\n1 Cite as: 576 U. S. ____ (2015)\nOpinion of the Court\nNOTICE: This opinion is subject to formal revision before publication in the\npreliminary print of the United States Reports. Readers are requested to\nnotify the Reporter of Decisions, Supreme Court of the Unite…", "original_pdf_link": "https://www.supremecourt.gov/opinions/14pdf/14-556_3204.pdf" , "citing_cases_count": 964, "courtlistener_link": "https://www.courtlistener.com/opinion/2812209/obergefell-v-hodges/" }Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"courtlistener.com/get_court_opinion","input":{"case":"576 U.S. 644"}}' # 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/get_court_opinion" , "input": { "case": "576 U.S. 644" }})# 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/get_court_opinion" , "input": { "case": "576 U.S. 644" } }), 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/get_court_opinion# with {"case":"576 U.S. 644"}"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": [ "case" ], "properties": { "case": { "type": "string", "description": "Case name, citation, or CourtListener opinion link. Example: Obergefell v. Hodges." }, "court": { "type": "string", "default": "", "description": "Court name to distinguish matching cases. Example: Supreme Court of the United States." } }}Output schema
{ "type": "object", "required": [ "case_name", "court", "date_decided", "citations", "docket_number", "author_judge", "other_judges", "opinions", "lead_opinion_text", "truncated", "citing_cases_count", "courtlistener_link", "original_pdf_link" ], "properties": { "court": { "type": [ "string", "null" ] }, "opinions": { "type": "array", "items": { "type": "object", "required": [ "type", "author" ], "properties": { "type": { "type": "string" }, "author": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "case_name": { "type": "string" }, "citations": { "type": "array", "items": { "type": "string" } }, "truncated": { "type": "boolean" }, "author_judge": { "type": [ "string", "null" ] }, "date_decided": { "type": [ "string", "null" ], "format": "date" }, "other_judges": { "type": "array", "items": { "type": "string" } }, "docket_number": { "type": [ "string", "null" ] }, "lead_opinion_text": { "type": "string" }, "original_pdf_link": { "type": [ "string", "null" ] }, "citing_cases_count": { "type": "integer" }, "courtlistener_link": { "type": "string" } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
courtlistener.com/get_court_opinion- Returns
- case name, court, date, citations, docket, judges, opinions, lead opinion text, citing-case count, links
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/get_court_opinion with the inputs above.
Ask your agent
- Pull up the full text of Miranda v. Arizona and tell me how many later cases have cited it.
- I need the lead opinion text and judges for 410 U.S. 113 — can you find it on CourtListener?
- Get the Ninth Circuit's opinion in Oracle America v. Google, including the docket number and decision date.
- What citations, judges, and concurring or dissenting opinions are listed for New York Times Co. v. Sullivan?
- Here's a link: https://www.courtlistener.com/opinion/2812209/obergefell-v-hodges/ — fetch the case metadata and the majority opinion's text.
See more
All CourtListener methodsSearches CourtListener US court opinions by keywords or case name, with optional court, decision dates and sorting.
courtlistener.com/search_case_lawFinds federal RECAP dockets involving a named person or company, newest filed first. Only dockets in the RECAP Archive appear.
courtlistener.com/search_federal_docketsFinds 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_caseLists 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_casesSearches 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_judgmentsFinds a game, movie or TV show on Metacritic by name and returns critic and user scores with title details.
metacritic.com/get_scoresReads a CNN article by link or headline and returns its headline, summary, authors, dates, section, tags, main image and public paragraphs. Subscriber stories return only a brief public preview; live blogs include their entries.
cnn.com/read_articleGets the public details of a Craigslist listing from its link. Deleted or expired listings are not returned, and hidden contact details are not included.
craigslist.org/get_listing