Enterprise
How to point Claude Managed Agents, or any other system, at the LawDiver database, and how each function is formed, what it accepts, and what comes back.
Contact us at [email protected] for a credential. The product overview is on /products/enterprise. The database index lists caselaw years, statute edition years, and which authorities are stored for search.
Enterprise uses its own key. It begins with ld_agent_. Send it as Authorization: Bearer ld_agent_… or as the X-API-Key header. A regular LawDiver API key, and the sign-in used by the conversational connector at /products/mcp, are rejected here.
The endpoint URL is issued with the credential and is not published on this site. The samples below write it as <enterprise endpoint URL>, or $LAWDIVER_ENTERPRISE_URL in a shell. Transport is Streamable HTTP. Each tool returns one JSON text block. A failed tool returns that same text channel with an error flag and a short correction, not a stack trace. A missing key is HTTP 401. A suspended account is HTTP 403. More than 2,000 calls in a minute is HTTP 429 with Retry-After.
GET <enterprise endpoint URL>/info and GET <enterprise endpoint URL>/toolspec.json list the server and the tool names without a key. Calling a tool requires the key.
Anthropic splits this into two steps. The agent definition names the server and does not contain the key. A vault holds the key, and each session points at that vault. The vault URL must be the same path as the agent URL. Host casing and a trailing slash are ignored. A different path is a different server, and the session then connects with no credential.
Create the agent with the Managed Agents beta header managed-agents-2026-04-01. Every declared server needs a matching mcp_toolset. Use a model your account is allowed to call. The toolset defaults to always_ask, which waits for approval before each call. Set the toolset permission policy when the agent should query without a person confirming each call.
curl https://api.anthropic.com/v1/agents \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "content-type: application/json" \
-d '{
"name": "LawDiver research",
"model": "claude-opus-5-5",
"mcp_servers": [
{
"type": "url",
"name": "lawdiver",
"url": "<enterprise endpoint URL>"
}
],
"tools": [
{ "type": "agent_toolset_20260401" },
{ "type": "mcp_toolset", "mcp_server_name": "lawdiver" }
]
}'Register the key in a vault. mcp_server_url is the Enterprise URL, and token is the ld_agent_ key with no Bearer prefix. Anthropic adds the scheme when it connects.
curl "https://api.anthropic.com/v1/vaults/$VAULT_ID/credentials" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "content-type: application/json" \
-d '{
"display_name": "LawDiver Enterprise",
"auth": {
"type": "static_bearer",
"mcp_server_url": "<enterprise endpoint URL>",
"token": "ld_agent_…"
}
}'Start a session with POST https://api.anthropic.com/v1/sessions and the same headers. The body names the agent, the environment, and the vault. A limited environment blocks MCP unless networking sets allow_mcp_servers: true or lists the endpoint’s host in allowed_hosts.
{
"agent": "agent_…",
"environment_id": "env_…",
"vault_ids": ["vault_…"]
}Session creation does not test the key. If the key is wrong, the session still starts and a session.error event arrives with mcp_authentication_failed_error and mcp_server_name lawdiver. A network failure is mcp_connection_failed_error. Tool output longer than about 100,000 characters is written to a file in the agent workspace. The model gets a preview and the path.
Tell the agent to call describe_schema before the first SQL, to count and join with query_corpus, and to open the opinions behind a number with search_cases and get_opinion_text. Cite only authorities those tools returned.
Any client that speaks Streamable HTTP MCP uses the same URL and the same bearer key. The conversational Claude.ai connector is a different server. Do not paste an Enterprise key into that connector, and do not point a Managed Agent at https://lawdiver.com/mcp.
Add the server once. The header value includes the word Bearer and a space.
claude mcp add --transport http lawdiver-enterprise \
$LAWDIVER_ENTERPRISE_URL \
--header "Authorization: Bearer ld_agent_…"The same entry in a project .mcp.json can read the URL and the key from the environment:
{
"mcpServers": {
"lawdiver-enterprise": {
"type": "http",
"url": "${LAWDIVER_ENTERPRISE_URL}",
"headers": {
"Authorization": "Bearer ${LAWDIVER_ENTERPRISE_KEY}"
}
}
}
}The Responses API takes a remote MCP tool. Send the header on every request. OpenAI does not store it.
{
"type": "mcp",
"server_label": "lawdiver",
"server_url": "<enterprise endpoint URL>",
"headers": {
"Authorization": "Bearer ld_agent_…"
},
"require_approval": "never"
}Initialize, list tools, then call one. The body is JSON-RPC. Accept should include both application/json and text/event-stream.
curl -X POST $LAWDIVER_ENTERPRISE_URL \
-H "Authorization: Bearer ld_agent_…" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe_schema",
"arguments": {}
}
}'Every tool is read-only. A SQL statement may run for up to five minutes. If it does not finish, the error says to filter on opinion_id, court_id, or year and try again. Counts, sums, and other bigint or numeric columns come back as numbers when they fit in a safe integer; larger integers stay strings. columns is filled from the result metadata, so an empty result still names its columns. Long-running calls stream: the connection carries keep-alive comments while the statement runs, so a client that reads server-sent events sees no idle gap.
Case rankings and citation lookup use the decisions table. A citing-side join uses opinions, because a concurrence and a dissent are their own rows. citation_key is the lookup form of a reporter cite: 556 U.S. 662 is 556us662. Filter on that column. The display citation is for reading the result.
Call this before the first query_corpus. It returns every published table, with each column’s type, description, and example values.
| Argument | Form | What it does |
|---|---|---|
| table | Optional string | One table name. Omit it for every table. |
| includeSamples | Boolean, default true | When true, each column includes example values. |
The result is { tables: [{ name, oneRowPer, columns: [{ name, type, description, samples }] }] }. An unknown table name is an error that lists the real names.
One PostgreSQL SELECT or WITH … SELECT. Joins, subqueries, UNION, GROUP BY, aggregates, and window functions are allowed. The agent is expected to issue many small queries: a count, then a filter, then a lookup of the rows behind the count. A worked example, twelve circuits and four motions in one call, is on /products/enterprise/example.
| Argument | Form | What it does |
|---|---|---|
| sql | String, required, up to 20,000 characters | The statement. A trailing semicolon is stripped. A second statement is rejected. |
| params | Up to 32 values: string, number, boolean, or null | Bound as $1, $2, in order. Put values here instead of interpolating them into the SQL. |
| maxRows | Integer 1–5000, default 1000 | Rows returned inline. One extra row is read so truncated can be true. |
The statement is rejected when it:
A bad column comes back as text the agent can rerun, for example column cite does not exist; did you mean citation on decisions?
A successful result:
{
"columns": ["year", "circuit", "opinions"],
"rows": [{ "year": 2010, "circuit": "11", "opinions": 42 }],
"rowCount": 1,
"truncated": false,
"elapsedMs": 840
}truncated: true means more rows matched than maxRows. Raise the cap, add a filter, or call export_results for a file.
SELECT o.year, c.circuit, count(DISTINCT o.opinion_id) AS opinions
FROM citations x
JOIN opinions o ON o.opinion_id = x.citing_opinion_id
JOIN courts c ON c.court_id = o.court_id
WHERE x.cited_opinion_id = (
SELECT opinion_id FROM decisions WHERE citation_key = '556us662'
)
AND o.year >= 2010
GROUP BY o.year, c.circuit
ORDER BY o.year, c.circuitopinion_id is the LawDiver id of an opinion. decision_id is the LawDiver id of the decision, shared by the majority, concurrences, and dissents. describe_schema returns this same list, including types and example values. Query case_names and reporter_cites in their own statements. Filter opinion_text by opinion_id.
Lead opinion of one decision. For court_id = scotus this includes orders and certiorari dispositions as well as argued decisions; no published flag separates them. Filter citation IS NOT NULL or cited_by_count > 0 for decisions that were reported.
| Column | Type | Meaning |
|---|---|---|
| opinion_id | bigint | LawDiver id of the lead opinion. This is the id in a case URL and the id every other table uses. |
| decision_id | bigint | LawDiver id of the decision. The majority, concurrences, and dissents share it. |
| case_name | text | Full case name. |
| case_name_short | text | Short caption. |
| citation | text | Reporter citation, for display. The canonical cite when it is a real reporter; otherwise the best official or parallel reporter cite in the cluster. Never a WL, LEXIS, BL, Fla. L. Weekly, or U.S.L.W. cite. Empty when the decision has no reporter cite. |
| citation_key | text | Lookup form of the canonical citation. 556 U.S. 662 is 556us662. Filter on this column; it is indexed. Null when the only canonical cite is a vendor cite, in which case look the case up through reporter_cites, which holds every reporter cite including parallels. |
| parallel_citations | text[] | Other reporter citations for the same decision. |
| court_id | text | Court id, the same value as courts.court_id. Examples: scotus, ca11, flsd. fladistctapp is the undivided Florida DCA bucket. The districts are fladistctapp1 through fladistctapp6. |
| decided_on | date | Decision date. |
| year | smallint | Decision year. |
| docket_number | text | Docket number. |
| precedential_status | text | Precedential status as recorded for the decision, such as Published or Unpublished. |
| published | boolean | True when the decision is published. |
| cited_by_count | integer | Number of other decisions that cite this one. |
| good_law_status | text | good (confirmed good law), caution (limited, or negative treatment below the threshold), negative (overruled, overruled in part, vacated, vacated in part, superseded, abrogated, or questioned), no_negative (no analysis has run and no negative treatment is recorded), or unknown (not computed). Orders and cert dispositions are no_negative or unknown; that is expected. |
| negative_treatment_count | integer | Number of negative treatments counted for the good-law status. |
| good_law_basis | text | Written explanation of the good-law status. |
| nature_of_suit | text | Federal nature of suit, when the decision has one. |
| cause | text | Cause of action, when the decision has one. |
| syllabus | text | Court syllabus, when the decision has one. |
| disposition | text | Court disposition, when the decision has one. |
One writing: majority, concurrence, dissent, or the only opinion. For the Supreme Court from about 2015 onward the lead row is often one combined writing that holds the majority and every separate opinion, so opinion_type and author_judge are not reliable for those rows and dissent or concurrence counts undercount. The text of the separate writings is inside that lead.
| Column | Type | Meaning |
|---|---|---|
| opinion_id | bigint | LawDiver id of this writing. Join citations.citing_opinion_id here. |
| decision_id | bigint | LawDiver id of the decision. Shared with the other writings in the same case. |
| case_name | text | Full case name. |
| court_id | text | Court id from courts. fladistctapp is the undivided Florida DCA bucket. Districts are fladistctapp1 through fladistctapp6. |
| decided_on | date | Decision date. |
| year | smallint | Decision year. |
| docket_number | text | Docket number. |
| author_judge | text | Author name as printed on the opinion. Often empty on Supreme Court rows from about 2015 onward, where one combined lead writing holds every opinion. |
| joined_by | text | Names of judges who joined, as printed. |
| precedential_status | text | Precedential status as recorded, such as Published or Unpublished. |
| published | boolean | True when the decision is published. |
| char_count | integer | Length of this writing in characters. |
| is_lead | boolean | True when this writing speaks for the court. |
| opinion_type | text | majority, plurality, concurrence, dissent, concur_dissent, per_curiam, other, or unknown. Not reliable for Supreme Court rows from about 2015 onward: those are usually one combined majority row that also contains the dissents and concurrences. |
The text of one opinion. Filter by opinion_id when fetching known bodies. Corpus-wide word and proximity search uses OpenSearch via search_opinion_text, not a scan of this table.
| Column | Type | Meaning |
|---|---|---|
| opinion_id | bigint | LawDiver id. Join opinions or decisions. |
| body | text | The opinion as plain text. Fetch by opinion_id only. To find opinions by words in the body (including Mark w/2 Lemley), use search_opinion_text against OpenSearch casediver-text. |
OpenSearch full-text index over the opinion corpus (not a SQL table). In Ask mode, search it with search_opinion_text. Supports AND, OR, NOT, quoted phrases, and proximity such as Mark w/2 Lemley, /s, and /p. Do not SELECT from this name in SQL.
| Column | Type | Meaning |
|---|---|---|
| opinion_id | long | LawDiver id of the indexed opinion. |
| case_name | text | Case caption, stemmed and exact-form searchable. |
| syllabus | text | Court syllabus when present. |
| headnotes | text | Headnotes when present. |
| holdings | text | Holdings text when present. |
| body | text | Full opinion body. Primary field for corpus-wide word and proximity search (for example Mark w/2 Lemley). |
| year | integer | Decision year filter. |
| jurisdiction_key | keyword | Jurisdiction filter key used by the search engine. |
| is_published | boolean | True when the decision is published. |
| good_law_status | integer | Encoded good-law status used as a filter. |
| cited_by_count | integer | Number of citing decisions. |
One citation from one opinion to one decision. The same pair can appear more than once. decisions.cited_by_count is the distinct count.
| Column | Type | Meaning |
|---|---|---|
| citing_opinion_id | bigint | LawDiver id of the opinion that contains the citation. Join opinions. |
| cited_opinion_id | bigint | LawDiver id of the cited lead opinion. Join decisions. |
| citing_decision_id | bigint | LawDiver decision id of the citing case. |
| cited_decision_id | bigint | LawDiver decision id of the cited case. |
| depth | integer | How many times the citing opinion cites that case. |
| treatment | text | Treatment label when one was recorded, such as followed, questioned, or overruled. |
| pin_cite | text | Pin cite when one was recorded. |
| rationale | text | The citing opinion’s words for that treatment, when recorded. |
One treatment event
| Column | Type | Meaning |
|---|---|---|
| opinion_id | bigint | LawDiver id of the treated decision’s lead opinion. Join decisions. |
| treating_opinion_id | bigint | LawDiver id of the opinion that treats it. Join opinions. |
| treatment | text | Treatment label, such as overruled, questioned, or followed. |
| pin_cite | text | Pin cite when one was recorded. |
| rationale | text | The treating opinion’s words for that treatment, when recorded. |
One court
| Column | Type | Meaning |
|---|---|---|
| court_id | text | Stable court id. |
| name | text | Full court name. |
| short_name | text | Short name. |
| jurisdiction | text | USPS code for a state court, or federal. |
| level | text | supreme, appellate, trial, bankruptcy, or specialty. |
| circuit | text | 1 through 11, dc, or federal. Empty for a court outside a circuit. |
A printed author name on one court
| Column | Type | Meaning |
|---|---|---|
| name | text | Author name as printed on an opinion. |
| court_id | text | Court this name has written for. One row per name and court. |
The author of one opinion
| Column | Type | Meaning |
|---|---|---|
| opinion_id | bigint | LawDiver id of the opinion. |
| name | text | Author name as printed. |
| role | text | author. |
One statute mention in an opinion. Count rows for how often a section is cited.
| Column | Type | Meaning |
|---|---|---|
| opinion_id | bigint | LawDiver id of the citing opinion. |
| authority | text | Citation as printed. |
| code | text | Normalized citation key. Filter on this. 42 U.S.C. § 1983 is 42usc1983. |
| title | text | Title or volume when parsed. |
| section | text | Section when parsed. |
One topic in the case-law topic list
| Column | Type | Meaning |
|---|---|---|
| topic_id | smallint | Stable topic id. The same number is stored on opinion_topics.topic_id. |
| name | text | The topic, in the form used for classification, such as summary judgment or standing. |
| category | text | The group the topic belongs to, such as civil procedure or contracts. |
One topic assigned to one opinion. Join decisions on opinion_id for the lead opinion’s topics.
| Column | Type | Meaning |
|---|---|---|
| opinion_id | bigint | LawDiver id. Join decisions or opinions. |
| topic_id | smallint | Join topics.topic_id. |
One opinion, for name lookup. Query this table on its own, not joined to the case tables.
| Column | Type | Meaning |
|---|---|---|
| opinion_id | bigint | LawDiver id. |
| display_title | text | Caption used for display. |
| case_name | text | Normalized case name used for lookup. |
| party_a | text | Normalized first party. |
| party_b | text | Normalized second party. |
| jurisdiction | text | USPS code for a state court, or federal. |
| is_federal | boolean | True for a federal court. |
| published | boolean | True when the decision is published. |
| level | text | supreme, appellate, trial, bankruptcy, or specialty. |
| year | smallint | Decision year. |
| decided_on | date | Decision date. |
| good_law_status | text | good, caution, negative, no_negative, or unknown. Same labels as decisions.good_law_status. |
| cited_by_count | integer | Number of other decisions that cite this one. |
One reporter citation. Query this table on its own, not joined to the case tables.
| Column | Type | Meaning |
|---|---|---|
| opinion_id | bigint | LawDiver id of the opinion. |
| cite_text | text | Citation as printed. |
| reporter_key | text | Lookup key, the same form as decisions.citation_key. |
| volume | integer | Reporter volume. |
| reporter | text | Reporter abbreviation. |
| page | integer | First page. |
| is_canonical | boolean | True for the citation used as decisions.citation. |
| year | smallint | Decision year. |
| decided_on | date | Decision date. |
| published | boolean | True when the decision is published. |
| jurisdiction | text | USPS code for a state court, or federal. |
Runs a query or a search and returns a signed download URL. The file lives for one hour. Supply sql or search. Supplying neither is an error.
| Argument | Form | What it does |
|---|---|---|
| sql | Optional string | The same SELECT query_corpus accepts. |
| params | Optional array | Bound to $1, $2 in that SQL. |
| search | Optional object | The same arguments as search_cases. The file is the first page, at most 50 rows. truncated is true when the search has more hits. |
| format | csv, jsonl, or xlsx. Default csv | CSV is one header row. JSONL is one JSON object per line. xlsx is one sheet named results. |
| columns | Optional list of names | Keeps those columns, in that order. Missing cells are empty. Omit it to keep every column. |
| includeOpinionText | Boolean, default false | Caps the file at 200 rows. It does not attach opinion text. Call get_opinion_text for the body. |
| filename | Optional, up to 80 characters | Letters, digits, dot, underscore, and hyphen are kept. The format extension is added when missing. |
| maxRows | Integer 1–50000, default 50000 | SQL cap. A search is still capped at 50 rows in the file. includeOpinionText lowers the cap to 200. |
The result:
{
"url": "https://…",
"rows": 1200,
"columns": ["year", "circuit", "opinions"],
"bytes": 18432,
"truncated": false,
"filename": "iqbal-by-circuit.csv"
}Federal and state case search. Jurisdiction is required. This is the tool for finding opinions. Counts, joins, and rankings belong in query_corpus.
| Argument | Form | What it does |
|---|---|---|
| query | String, 1–1000 characters, required | Natural language, a boolean expression, a citation, or a case name. A space is AND. On searchType boolean, lowercase and/or/not/but are connectors too. Examples: negligence AND causation (or negligence & causation); rescission OR cancellation; immunity NOT prisoner, immunity BUT NOT prisoner, or immunity % prisoner (one exclusion); "clearly established"; unconscionab!; dr*ve; employer /s negligent (25 words); "forum non conveniens" /p factors (80 words); summary w/3 judgment; notice +5 cure (left term first); holdings:"clearly established". |
| jurisdiction | Object, required | type plus state or circuit when that type needs one. Call list_jurisdictions for the codes. |
| searchType | auto (default), citation, case_name, boolean, semantic, or hybrid. keyword is accepted and runs boolean. | auto lets the router choose and still honors connectors when the query has them. boolean is strict Terms and Connectors: every term required, no meaning or case-name hits, empty stays empty. hybrid is terms plus meaning, not a boolean pin. Same grammar as POST /api/v1/search; full rules at /docs/search-connectors. |
| courts | Up to 20 court ids | Keeps hits whose court id matches, such as ca11 or flsd. Applied after ranking: the tool reads up to ten pages of ranked results until the requested page fills. |
| courtLevel | One of supreme, appellate, trial, bankruptcy, specialty, or an array of them | Same: applied after ranking, reading further pages until the requested page fills. |
| dateFrom | YYYY-MM-DD | Decision date, inclusive. |
| dateTo | YYYY-MM-DD | Decision date, inclusive. |
| includeUnpublished | Boolean | Includes unpublished opinions when true. |
| judge | String, 2–120 characters | Author name, substring match. Applied after ranking like courts. |
| citesCase | Citation or case id | Searches within the cases that cite it. The newest 1,000 citing cases that pass the other filters are ranked by the query; total counts all of them. |
| minCitedBy | Integer ≥ 0 | Drops hits below that cited-by count. Applied after ranking like courts. |
| goodLawOnly | Boolean | Keeps hits the index marks as good law. |
| sort | relevance (default) or newest | newest sorts by decision date. |
| limit | Integer 1–50, default 20 | Also capped by the account’s per-search maximum. |
| offset | Integer ≥ 0, default 0 | Page start. The page number is offset divided by limit. |
| includeOpinionText | Boolean, default false | Accepted and ignored. The note in the result says to call get_opinion_text or export_results. |
| includeCaseCard | Boolean, default false | Accepted and ignored. Call get_case. |
Jurisdiction type is one of us_supreme_court, all_federal, federal_circuit, federal_district, one_state, one_state_plus_federal, all_states, all_states_and_federal. state is a two-letter USPS code when the type needs a state. circuit is 1–11, dc, or federal.
Each hit:
{
"caseId": "109202100001835",
"decisionId": "5109202100001835",
"caseName": "Ashcroft v. Iqbal",
"citation": "556 U.S. 662",
"bluebookCitation": "Ashcroft v. Iqbal, 556 U.S. 662 (2009)",
"parallelCitations": ["129 S. Ct. 1937"],
"court": "Supreme Court of the United States",
"courtAbbrev": "U.S.",
"jurisdiction": "federal",
"level": "supreme",
"date": "2009-05-18",
"year": 2009,
"docketNumber": "07-1015",
"published": true,
"opinionType": "majority",
"snippet": "…",
"goodLaw": {
"status": "good",
"statusName": "good",
"negative": false,
"unknown": false,
"negativeTreatmentCount": 0,
"basis": null
},
"citedByCount": 18000,
"topics": ["pleadings", "motions to dismiss"]
}caseId is the LawDiver opinion id. decisionId is the LawDiver decision id. level is supreme, appellate, trial, bankruptcy, or specialty. goodLaw.status is good, caution, negative, no_negative, or unknown, the same labels as decisions.good_law_status; goodLaw.statusName is the finer corpus name (good, limited, negative_below_threshold, overruled, overruled_in_part, vacated, vacated_in_part, vacated_and_reversed, vacated_and_reversed_in_part, superseded, abrogated, questioned, or unknown). topics uses the same names as topics.name. The wrapper is { results, total, filteredOnPage?, limit, offset, note? }.
total is the number of hits after every filter when the tool knows it. With courts, courtLevel, judge, or minCitedBy, the response carries filteredOnPage: true; total is the filtered count when the ranked list was read to its end, and null with an explanatory note when the tool stopped after ten pages. Page with offset either way. With citesCase, total is the count of citing cases that pass the filters.
Resolves a citation or a case name to one LawDiver case. Use the returned caseId with get_case, get_opinion_text, and the good-law tools.
| Argument | Form | What it does |
|---|---|---|
| query | String, 2–500 characters, required | A citation or a case name. |
| caseId | Optional string | An id from a previous did-you-mean list. When set, the name is not searched again. |
Four shapes come back. status: found includes caseId, decisionId, caseName, citation, parallelCitations, court, date, goodLaw, citedByCount, and topics. A lookup by caseId also includes docketNumber. status: did_you_mean includes up to eight candidates, each with caseId, caseName, citation, court, and year. Call again with one of those ids. status: not_found includes the query and an explanation; a lone surname such as Iqbal is not enough to identify a case, so supply both parties or a reporter citation. status: error with retryable: true means the lookup hit its deadline and the case was not ruled out; retry.
The case card for a known LawDiver id. One argument, caseId.
Found: caseId, decisionId, caseName, citation, bluebookCitation, parallelCitations, court, courtAbbreviation, jurisdiction, date, year, docketNumber, published, goodLaw, citedByCount, topics. Missing: { status: "not_found", caseId }.
Opinion text, in pages. The body is plain text.
| Argument | Form | What it does |
|---|---|---|
| caseId | String, required | LawDiver opinion id. |
| section | all (default), majority, concurrence, or dissent | majority returns the whole body. concurrence and dissent start at the first heading that matches. If no heading matches, the whole body is returned. |
| format | text (default), markdown, or html | The body is plain text in every format. |
| includePageNumbers | Boolean, default true | When false, star page markers such as *678 are removed. |
| offset | Integer ≥ 0, default 0 | Character offset into the section. Pass nextOffset from the previous page. |
| maxChars | Integer, default 100000, maximum 250000 | Characters in this page. |
Found:
{
"caseId": "109202100001835",
"format": "text",
"section": "all",
"text": "…",
"offset": 0,
"nextOffset": 100000,
"truncated": true
}truncated: false and a null nextOffset mean this page is the end. Missing: { status: "not_found", caseId }.
The recorded good-law status for one case, the basis text, and the negative treatments that support that status. One argument, caseId.
Found:
{
"caseId": "109202100001835",
"status": "good",
"negative": false,
"unknown": false,
"negativeTreatmentCount": 0,
"basis": null,
"negativeCitations": []
}status is good, caution, negative, no_negative, or unknown on search hits, and the recorded treatment name on this call: good, no_negative, overruled, overruled_in_part, vacated, vacated_in_part, vacated_and_reversed, vacated_and_reversed_in_part, superseded, abrogated, questioned, limited, or negative_below_threshold. negative is true for overruled, overruled_in_part, vacated, vacated_in_part, vacated_and_reversed, vacated_and_reversed_in_part, superseded, abrogated, and questioned. Each negativeCitations row has citingCaseId, caseName, date, treatment, and rationale. citingCaseId is a LawDiver opinion id. Missing: { status: "not_found", caseId }.
The citing-case list. Rankings that need the whole graph, including most-cited and citation depth, belong in query_corpus on citations.
| Argument | Form | What it does |
|---|---|---|
| caseId | String, required | The cited case. |
| order | recent (default), negative, most_cited, or depth | recent is newest citing cases. negative keeps adverse treatments. most_cited and depth are accepted and then explained: the list is still recent or negative, and the result includes a note pointing at query_corpus. |
| limit | 10 (default), 50, 100, or unlimited | How many citing cases to return. unlimited scans the newest 5,000 citing edges; when a case has more, the response says truncated: true and names query_corpus on citations for the full set. |
| treatment | Optional list of strings | Keeps citing rows whose status equals one of these labels, compared without regard to case. |
| dateFrom | Optional date string | Drops citing rows filed before this date. A row with no date is kept. |
| dateTo | Optional date string | Drops citing rows filed after this date. A row with no date is kept. |
| includeSnippets | Boolean, default true | Accepted. The citing rows do not include opinion snippets. |
Found: { caseId, total, scanned, truncated, citingCases, note? }. total is the cited-by count. scanned is how many citing edges were read, newest first; truncated is true only for limit: unlimited on a case with more edges than the scan cap. If the database budget runs out the response is { status: "timeout", caseId, retryable: true, message }; retry with a smaller limit or use query_corpus. Each citing case has citingCaseId, caseName, citation, date, treatment, and pin. citingCaseId is a LawDiver opinion id. treatment is the treatment label, or not adverse when none was written. pin is reversal, mostRecent, or null. Negative order uses overruled, reversed, vacated, abrogated, superseded, overruled_in_part, questioned, criticized, limited, and distinguished.
Verifies one citation, a batch, or citation-like lines in a passage. Supply one of citation, citations, or text. Supplying none is an error.
| Argument | Form | What it does |
|---|---|---|
| citation | Optional string, up to 2000 characters | One citation. Ignored when citations is set. |
| citations | Optional array, 1–50 strings | A batch. Each item is at most 500 characters. This wins over citation and text. |
| text | Optional string, up to 20,000 characters | Split on blank lines and sentence ends. A line is checked when it contains a letter and a digit and is at most 500 characters, up to 50 lines. If none qualify, the first 500 characters are checked as one citation. |
| checkPinCites | Boolean, default true | Echoed as pinCiteChecked on each row. The resolver still runs either way. |
| includeGoodLaw | Boolean, default true | When false, goodLaw is omitted from each row. |
| authorityTypes | Optional: cases, statutes, regulations, court_rules, tax | Recorded with the call. The check still runs the citation resolver. |
The result is { results: [...] }. Each row:
{
"citation": "556 U.S. 662",
"status": "verified",
"normalized": "556 U.S. 662",
"verdict": "valid",
"explanation": "…",
"caseId": "109202100001835",
"caseName": "Ashcroft v. Iqbal",
"parallelCitations": [],
"goodLaw": { "status": "good", "statusName": "good", "negative": false, "unknown": false, "negativeTreatmentCount": 0, "basis": null },
"pinCiteChecked": true
}status is verified when the verdict is valid or section_verified, corrected when it is likely_valid, page_mismatch, or name_mismatch, error with retryable: true when the resolver hit its deadline before it could rule the citation in or out, and not_found otherwise. normalized is the corrected form when the resolver has one. goodLaw.status is good, caution, negative, no_negative, or unknown; goodLaw.statusName is the finer corpus name. A constitutional section such as U.S. Const. amend. XIV, § 1 verifies at the amendment; the explanation says the section itself was not separately checked.
Statute, regulation, constitution, or court-rule text by Bluebook citation or by an authority key from an earlier check. Citing opinions are not part of this body. Count them with query_corpus on statute_citations, filtering code.
| Argument | Form | What it does |
|---|---|---|
| query | Optional string, 2–500 characters | A Bluebook citation with a section number, such as 42 U.S.C. § 1983 or Fla. Stat. § 768.81. |
| authorityKey | Optional string, 3–200 characters | A stable key from a prior check, used when you already have one. |
| year | Optional integer, 1900–2100 | Preferred code edition year when the source is year-versioned. |
| includeCitingCases | Boolean, default false | When true, citingCases is a sentence telling the caller to query statute_citations. It is not a list of cases. |
| citingCasesLimit | Integer 1–500, default 25 | Echoed. It does not change the statute body. |
The result has status, message, query, citationAsWritten, statute, verdict, and note. status is ok, not_found, unavailable, or not_a_statute. On ok, statute includes authorityKey, kind (statute, rule, constitution, or regulation), bluebook, heading, body, bodyChars, edition, editionYear, officialUrl, repealed, jurisdiction, and section. body is null when the section was confirmed and the full text is not held.
No arguments. Returns the codes search_cases accepts, and the same circuit and court-level words used on the courts table.
{
"types": ["all_states", "all_states_and_federal", "all_federal", "one_state", "one_state_plus_federal", "federal_circuit", "federal_district", "us_supreme_court"],
"circuits": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "dc", "federal"],
"stateCodes": ["AL", "AK"],
"states": [{ "code": "FL", "name": "Florida" }],
"courtLevels": ["supreme", "appellate", "trial", "bankruptcy", "specialty"],
"examples": [
{ "type": "all_states_and_federal" },
{ "type": "one_state", "state": "FL" },
{ "type": "federal_circuit", "circuit": "11" },
{ "type": "us_supreme_court" }
]
}stateCodes and states are the full lists. The snippet above shows the shape, not every state.