Short answer: A US court opinion arrives as two linked JSON records. The case record holds the name, court, decision date, citations and the list of opinions the decision contains. Each opinion record holds the text of one opinion, as HTML or plain text. Fetch the case by its id, read the opinion ids off it, then fetch the opinions you want. Store both ids and the decision date next to the text, so you can refetch a record later and delete it if it is withdrawn.
Written and checked on 23 November 2026. This is general information, not legal advice; check the cited opinion before relying on it.
TL;DR
- Two records, two reads. The case holds metadata and opinion ids. The opinion holds the text. A decision with a majority and a dissent can have two opinion records under one case.
- Keep the ids. A saved copy with only text cannot be refreshed, matched to a sync feed or deleted when the record is withdrawn.
- Dates carry a precision. A decision known only to the month or the year says so in a field next to the date.
- The responses below were fetched on 23 November 2026 and trimmed. This run had no API key, so the curl lines are request shapes from the docs, not output.
Opinion text, as of 23 November 2026
The example is Brown v. Board of Education, 347 U.S. 483 (1954). One opinion record holds the Court's opinion by Chief Justice Warren, which covers four consolidated cases from Kansas, South Carolina, Virginia and Delaware. On page 495 it says: "We conclude that in the field of public education the doctrine of “separate but equal” has no place. Separate educational facilities are inherently unequal." We read that text in the API on 23 November 2026 and checked the passage against the copy on Cornell's Legal Information Institute. The record's decision date, 1954-05-17, matches the "Decided May 17, 1954" line in the same record's headmatter.
You are saving Supreme Court opinions for a research tool. A teammate suggests using the case name plus the docket number as each record's key, since lawyers recognise both. What is the problem?
Who this is for and what you need
This is for an engineer or data person who stores or shows US opinions and wants to know what the records hold before writing a schema. You need an API key from your dashboard, described in the authentication docs, sent as Authorization: Bearer <key>. The base URL is https://api.vaquill.ai/api/v1/us.
How the responses here were obtained: the Vaquill MCP tools read the same case and opinion records, and their field names match the REST examples in the case law quickstart, the opinion text page and the change feed page. Those responses are shown trimmed. The curl blocks are request shapes copied from the docs and were not run. The one curl request that was run, with no key, is under "What goes wrong".
The two records
A case is one decision. An opinion is one written opinion inside it: a majority, a concurrence, a dissent. Both ids have a fixed shape: USCASE_ or USOP_ followed by 20 uppercase hex characters.
The case record, with the values from Brown as read on 23 November 2026:
| Field | Value for Brown | What it is | Store it? |
|---|---|---|---|
caseId | USCASE_33D41ED22367502543CB | Id of the decision | Yes, as your key |
caseName, caseNameFull | Brown v. Board of Education, and the full caption in capitals | Short name and the caption as printed | Yes, for display |
court | an object: courtId US_FED_SCOTUS, name, level, stateCode | The court | Store courtId |
decisionDate, decisionDatePrecision | 1954-05-17, day | The date and how much of it is known | Both |
docketNumber | NO. 1 | Docket number as text | As text, never as a key |
citations, citationDetails | five citations, including 347 U.S. 483 | Reporter citations, and the same split into volume, reporter and page | Yes |
publicationStatus | published | Whether the court published the opinion | Yes |
citedByCount | 3086 | Other cases in the data that cite this one | Refetch it, do not freeze it |
leadOpinionId | USOP_FD875FE2008EAAA71841 | The main opinion | Yes |
opinions | a list of one | Each opinion's id, order, kind, author and scan flag | Yes |
headmatter, counsel, judgesText, otherDates | HTML above the opinion, the counsel list, Warren, the argued and reargued dates | What the reporter prints around the opinion | Optional |
addedAt, updatedAt | timestamps | When the record entered the data and last changed | Optional |
qualityFlags | [] | Text checks the record failed, if any | Yes, it is small |
The opinion record:
| Field | Value for Brown | What it is | Store it? |
|---|---|---|---|
opinionId | USOP_FD875FE2008EAAA71841 | Id of the opinion | Yes |
caseId | USCASE_33D41ED22367502543CB | The case it belongs to | Yes |
ordinal, kind, isPerCuriam, authorName | 1, combined, false, Warren | Position, type and author | Yes |
format, body | text, the opinion | The whole opinion in one string, no paging | Yes, with the format |
textFromOcr | false | true when the text was read from page images and can hold recognition errors | Yes |
bodyUnavailable | false | true when body is empty and the rest of the record is still returned | Yes |
The docs list these kinds: combined, lead, plurality, concurrence, concurrence_in_part, dissent, addendum, remittitur, rehearing, on_the_merits, on_motion_to_strike, trial_court and unknown. Brown has a single opinion, its kind is combined, and leadOpinionId points at it. For a decision with several, read leadOpinionId instead of guessing which one is the main opinion.
Try it
Four calls take you from a citation to the text and then to a sync loop.
| Step | You send | You get | You keep |
|---|---|---|---|
| 1 | A reporter citation | A status and, when resolved, one case | caseId |
| 2 | The caseId | The case record and its opinions | opinionId values |
| 3 | An opinionId and a format | The opinion text | The text, with its format |
| 4 | A since timestamp | Ids of cases added, changed or removed | asOf for the next run |
1. Citation to caseId
Request shape from the docs, not run:
curl -X POST https://api.vaquill.ai/api/v1/us/cases/resolve \
-H "Authorization: Bearer $VAQUILL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"citations": ["347 U.S. 483"]}'
Response from the resolve_citations MCP tool on 23 November 2026, trimmed:
{
"results": [{
"index": 0,
"status": "resolved",
"case": {
"caseId": "USCASE_33D41ED22367502543CB",
"caseName": "Brown v. Board of Education",
"court": { "courtId": "US_FED_SCOTUS", "name": "Supreme Court of the United States", "level": "supreme" },
"decisionDate": "1954-05-17",
"decisionDatePrecision": "day",
"publicationStatus": "published",
"citations": ["98 L. Ed. 873", "74 S. Ct. 686", "347 U.S. 483", "38 A.L.R. 2d 1180", "53 Ohio Op. 326"],
"citedByCount": 3086,
"leadOpinionId": "USOP_FD875FE2008EAAA71841"
}
}],
"count": 1,
"resolved": 1,
"distinctCitations": 1
}
resolved means one case in the data carries that citation. It does not check that the name, the quote or the pinpoint in your brief is right, and not_found does not mean a case is fake. Only resolved has a single case; ambiguous lists candidates instead. Send the citation without a case name.
2. The case record
Request shape from the docs, not run:
curl https://api.vaquill.ai/api/v1/us/cases/USCASE_33D41ED22367502543CB \
-H "Authorization: Bearer $VAQUILL_API_KEY"
Response from the get_case MCP tool on 23 November 2026, trimmed to most of the fields in the table above (citationDetails is left out and the long counsel and headmatter values are cut):
{
"case": {
"caseId": "USCASE_33D41ED22367502543CB",
"caseName": "Brown v. Board of Education",
"caseNameFull": "BROWN Et Al. v. BOARD OF EDUCATION OF TOPEKA Et Al.",
"docketNumber": "NO. 1",
"court": { "courtId": "US_FED_SCOTUS", "name": "Supreme Court of the United States", "shortName": "Supreme Court", "level": "supreme", "stateCode": null },
"decisionDate": "1954-05-17",
"decisionDatePrecision": "day",
"publicationStatus": "published",
"citations": ["98 L. Ed. 873", "74 S. Ct. 686", "347 U.S. 483", "38 A.L.R. 2d 1180", "53 Ohio Op. 326"],
"citedByCount": 3086,
"addedAt": "2026-11-21T11:39:36.746892Z",
"updatedAt": "2026-11-21T17:10:49.539110Z",
"leadOpinionId": "USOP_FD875FE2008EAAA71841",
"judgesText": "Warren",
"counsel": "Robert L. Carter argued the cause for appellants in No. 1 ...",
"headmatter": "<p>BROWN et al. <em>v.</em> BOARD OF EDUCATION OF TOPEKA et al.</p> ...",
"otherDates": "Argued December 9, 1952., Reargued December 8, 1953.",
"opinions": [{
"opinionId": "USOP_FD875FE2008EAAA71841",
"ordinal": 1,
"kind": "combined",
"isPerCuriam": false,
"authorName": "Warren",
"textFromOcr": false
}],
"qualityFlags": []
}
}
The docket number is NO. 1. That is a number from inside a group of consolidated cases, so it cannot identify the decision on its own.
3. The opinion text
Request shape from the docs, not run:
curl "https://api.vaquill.ai/api/v1/us/opinions/USOP_FD875FE2008EAAA71841?format=text" \
-H "Authorization: Bearer $VAQUILL_API_KEY"
Response from the get_opinion MCP tool on 23 November 2026, trimmed. The body is cut a few lines in; the full opinion comes back in the same string with no paging:
{
"opinionId": "USOP_FD875FE2008EAAA71841",
"caseId": "USCASE_33D41ED22367502543CB",
"caseName": "Brown v. Board of Education",
"courtId": "US_FED_SCOTUS",
"decisionDate": "1954-05-17",
"ordinal": 1,
"kind": "combined",
"isPerCuriam": false,
"authorName": "Warren",
"textFromOcr": false,
"qualityFlags": [],
"bodyUnavailable": false,
"format": "text",
"body": "Mr. Chief Justice Warren\ndelivered the opinion of the Court.\nThese cases come to us from the States of Kansas, South Carolina, Virginia, and Delaware. They are premised on different facts and different local conditions, but a common legal question justifies their consideration together in this consolidated opinion. 1\n*487 In each of the cases, ..."
}
Three things in that string matter to a builder. A star page such as *487 marks where page 487 of the printed volume begins, so you can check a pinpoint. A marker can land inside a word: this opinion contains "sup *490 ported" and "Any lan *495 guage". And in text format the footnote markers are bare digits (the first paragraph ends "consolidated opinion. 1"), with the footnote paragraphs placed after the closing "It is so ordered." and without their numbers.
Ask for format=html when you need the footnotes tied to their markers or the citations as links. The same opinion in HTML (also fetched on 23 November 2026), excerpted:
<p>... consolidated opinion. <sup><a href="#fn1">1</a></sup></p>
...
the so-called “separate but equal” doctrine announced by this Court in <em>Plessy</em> v. <em>Ferguson,</em> <cite data-case-id="USCASE_3171FC8EB22245AB9AEA">163 U. S. 537</cite>.
...
<aside id="fn1"><p>In the Kansas case, <em>Brown</em> v. <em>Board of</em> Education, the plaintiffs are ...
A cite element carries the caseId of a case in the data. That id is the one the resolve call returns: resolving 163 U.S. 537 on the same day gave USCASE_3171FC8EB22245AB9AEA, Plessy v. Ferguson. A citation to a case the data does not hold stays plain text. In the same HTML, 87 A. 2d 862 in the first footnote has no cite element. So a cite is a link you can follow, and its absence does not mean the citation is wrong.
4. The change feed
Request shape from the docs, not run:
curl "https://api.vaquill.ai/api/v1/us/cases/changes?since=2026-11-22T00:00:00Z&courtId=US_FED_SCOTUS&limit=3" \
-H "Authorization: Bearer $VAQUILL_API_KEY"
Response from the list_case_changes MCP tool on 23 November 2026, trimmed (the cursor is cut):
{
"results": [
{ "caseId": "USCASE_00058D580B9AEBCF2353", "changeType": "upsert", "change": "updated",
"updatedAt": "2026-11-22T02:10:08.442542Z", "courtId": "US_FED_SCOTUS",
"caseName": "Schell v. Cochran", "decisionDate": "1883-05-18", "decisionDatePrecision": "day" },
{ "caseId": "USCASE_0006D47E4B94522A9178", "changeType": "upsert", "change": "updated",
"updatedAt": "2026-11-22T02:10:08.442542Z", "courtId": "US_FED_SCOTUS",
"caseName": "Mining Co. v. Anglo-Californian Bank", "decisionDate": "1881-11-21", "decisionDatePrecision": "day" },
{ "caseId": "USCASE_0007047D35371FE4EB77", "changeType": "upsert", "change": "updated",
"updatedAt": "2026-11-22T02:10:08.442542Z", "courtId": "US_FED_SCOTUS",
"caseName": "Carpenter v. Strange", "decisionDate": "1891-05-25", "decisionDatePrecision": "day" }
],
"count": 3,
"since": "2026-11-22T00:00:00Z",
"asOf": "2026-11-23T07:36:11.211302Z",
"dataVersion": "20261122T063017Z+20261123T074034Z",
"hasMore": true,
"nextCursor": "MjAyNi0xMS0yMlQwMjoxMDowOC40NDI1NDIrMDA6MDB8..."
}
The three rows are a dated sample, and asOf and dataVersion move as the data does, so yours will differ. The feed lists ids and a few identifying fields, not full records. upsert means the case was added or changed, and change says which. A row can appear only because a derived figure such as citedByCount moved, so the record may look the same as your copy. Page with nextCursor, keeping the same since and courtId, until hasMore is false; then store asOf and send it as the next run's since. A removed row, which this page did not contain, carries only caseId, changeType and updatedAt. Start since at a recent date and narrow with courtId: a walk from an early date lists every case, 100 to a page.
The same calls in Python
This sketch follows the docs' quickstart and change feed samples. The HTTP calls were not run, because this run had no key. keep and apply_changes were run offline against the case record above and the three feed rows plus one hand-made removed row. The 410 branch comes from the docs and was not exercised.
import os
import requests
API = "https://api.vaquill.ai/api/v1/us"
HEADERS = {"Authorization": f"Bearer {os.environ['VAQUILL_API_KEY']}"}
def call(method, path, **kwargs):
resp = requests.request(method, f"{API}{path}", headers=HEADERS, timeout=60, **kwargs)
resp.raise_for_status()
return resp.json()
def resolve(citation):
"""Citation string to caseId, or None when it is not a single match."""
row = call("POST", "/cases/resolve", json={"citations": [citation]})["results"][0]
return row["case"]["caseId"] if row["status"] == "resolved" else None
def get_case(case_id):
return call("GET", f"/cases/{case_id}")["case"]
def opinion_text(opinion_id):
return call("GET", f"/opinions/{opinion_id}", params={"format": "text"})["body"]
def keep(case):
"""The fields of a case record worth storing."""
return {
"case_id": case["caseId"],
"name": case["caseName"],
"court_id": case["court"]["courtId"],
"decision_date": case["decisionDate"],
"date_precision": case["decisionDatePrecision"],
"citations": case["citations"],
"lead_opinion_id": case["leadOpinionId"],
"opinion_ids": [o["opinionId"] for o in case["opinions"]],
}
def apply_changes(rows, store):
"""Apply one page of change rows to a dict of stored cases."""
for row in rows:
case_id = row["caseId"]
if row["changeType"] == "removed":
store.pop(case_id, None)
continue
try:
store[case_id] = keep(get_case(case_id))
except requests.HTTPError as err:
if err.response.status_code != 410:
raise
store.pop(case_id, None)
def sync(since, store):
"""Walk the change feed from `since`. Returns the `since` for the next run."""
params = {"since": since, "limit": 100}
while True:
page = call("GET", "/cases/changes", params=params)
apply_changes(page["results"], store)
if not page["hasMore"]:
return page["asOf"]
params["cursor"] = page["nextCursor"]
case_id = resolve("347 U.S. 483")
if case_id:
case = get_case(case_id)
text = opinion_text(case["leadOpinionId"])
For many cases or opinions at once, the docs list batch reads: up to 50 cases or 20 opinions per call.
Storing it
- Keep both ids.
caseIdis your key andopinionIdis how you refetch text. The citation list is useful for lookups, and a case can carry several. - Keep the date with its precision. The search date filters count a decision known only to the month or year as the first day of that period. The precision field tells you which kind you hold, so show a month-only date as a month.
- Keep the text as returned, and say which format. Make a cleaned copy for search or a model if you want one. Because a star-page marker can sit inside a word, a plain find-and-replace on the markers can glue or split words, so strip them in a copy and keep the original.
- Keep the scan flags. When
textFromOcristrue, check a quote against the court's own copy before you rely on it. WhenbodyUnavailableistrue, the body is empty and the rest of the record is still valid. - Refetch derived numbers.
citedByCountcounts only citations to cases in the data and moves as the data grows. It is a floor, not a final figure. - Delete on
removedand on410. Aremovedrow in the feed means the case was withdrawn or taken out of search, and a410 Goneon a read means it was withdrawn, for example for privacy, a sealed record or a court order. Drop your copy and stop showing it. - Date your copies. Store the day you fetched the record. Checks like "was this still in the data when we showed it" need it.
One sentence on rights: the rights and licensing page says you may cache, index and show case law inside your own product, with a credit line unless your plan waives it, and may not redistribute it as a dataset or API, so read it before you cache or display opinion text.
Limits
- Search is keyword search. Every word must appear in one opinion, up to three quoted phrases are allowed, and
OR,NOT, wildcards and proximity operators are refused. If you know the citation, resolve it instead of searching for it. - Many records have no reporter citation, so they do not resolve by citation. In a sample of 20,000 random visible records measured on 22 November 2026, about 96% of cases from supreme-level courts, 82% of appellate cases and 45% of trial-court cases had at least one reporter citation. A district-court slip opinion often has none. Find those by name, court and date with search or listing instead.
- A case can appear as more than one record. Match on citation and docket number before you count or display cases.
- Some cases are held but kept out of search. They stay readable by id and resolvable by citation.
- Old dates can be wrong. Check
decisionDateagainst the citation. For Brown the record date and the "Decided May 17, 1954" line agree. - Scans can have errors. That is what
textFromOcris for. - Check quotes before you file. Read a quotation against the court's own copy first.
What goes wrong
- Keying on the docket number. Brown's is
NO. 1. - Storing only the text. You then cannot refetch it, match it to the feed or delete it when it is withdrawn.
- Ignoring
removed. Your copy keeps showing a case the provider took down. - Treating
resolvedas proof. It means one case has that citation. The case name, the quote and the pinpoint in a brief still need reading. - Stripping star pages with a blanket replace. In this opinion that turns "sup *490 ported" into a broken word or glues two words together.
- Calling without a key. The one curl request run for this post,
GETon the Brown case id with no key, answered HTTP 401 and this body (trimmed):
{
"detail": "Missing API key. Send it as `Authorization: Bearer vq_key_...` (preferred) or in the `X-API-Key` header. ...",
"code": "authentication_required",
"title": "Authentication required",
"status": 401,
"retryable": false
}
CourtListener, run by Free Law Project, lists a Case Law API on its REST API overview, read on 23 November 2026. Our guide to the CourtListener API covers tokens and limits, and the complete guide to US law data maps the other sources.
For US case law, statutes and regulations through one API key, see the US case law API.
FAQ
Can I get a US court opinion as JSON?
Yes. Read a case by its id, then read each opinion it lists by that opinion's id. Both come back as JSON, with the opinion text in a body field as HTML or plain text. Start from a citation if you do not have the id: a resolve call turns 347 U.S. 483 into a caseId.
What is the difference between a case and an opinion?
A case is one decision, with its name, court, date and citations. An opinion is one written opinion inside it, such as the majority or a dissent. A decision with a dissent can have a separate opinion record for it, so check the opinions list rather than assuming one.
Should I fetch HTML or plain text?
Use HTML to render the opinion or follow its citations: footnotes are linked to their markers and a cite element carries the caseId of a cited case the data holds. Use plain text to feed a model or an index. In plain text the footnote paragraphs follow the body without their numbers.
How do I keep a stored copy up to date?
Poll the change feed from the asOf you saved on the last run. Refetch every upsert row, delete every removed row, and treat a 410 on a refetch the same way. Page with nextCursor until hasMore is false, and narrow by court if you only follow some courts.
Can I cache and show opinions in my own product?
The rights page says yes for your own product, with a credit line unless your plan waives it, and no for redistributing the case law or its change feed as a dataset or API without a separate agreement. Read the rights and licensing page before you build on it, including its section on withdrawn cases.
Why did my citation not resolve?
not_found means the data holds no case with that citation. It does not mean the case is fake. Trial-court slip opinions often have no reporter citation at all, so search by name, court and date instead. An unparsed result means the string was not a volume reporter page citation, and ambiguous means several records match.
New legal AI guides, weekly.
Further Reading
- Case Law MCP Server: Connect Claude to US Case Law
- Free Case Law Databases Compared: What Each One Holds
- How Complete Is US Case Law Data? We Measured Ours Field by Field
- How to Find a Case by Its Citation (and Confirm It Is the Right One)
- Legal Connectors for Claude: Add Vaquill AI Primary Law
- ChatGPT Legal Research Plugin: Vaquill AI Primary Law

Co-Founder & CTO
Priyansh leads engineering and AI at Vaquill AI: the pipelines that pull statutes, regulations and court rules from every US jurisdiction's official publisher, and the REST API, MCP server and open dataset that serve them.
