Enterprise

Enterprise documentation

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.

The credential

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.

Claude Managed Agents

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.

Other clients

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.

Claude Code

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}"
      }
    }
  }
}

OpenAI

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"
}

An application you run

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": {}
    }
  }'

What every call shares

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.

describe_schema

Call this before the first query_corpus. It returns every published table, with each column’s type, description, and example values.

ArgumentFormWhat it does
tableOptional stringOne table name. Omit it for every table.
includeSamplesBoolean, default trueWhen 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.

query_corpus

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.

ArgumentFormWhat it does
sqlString, required, up to 20,000 charactersThe statement. A trailing semicolon is stripped. A second statement is rejected.
paramsUp to 32 values: string, number, boolean, or nullBound as $1, $2, in order. Put values here instead of interpolating them into the SQL.
maxRowsInteger 1–5000, default 1000Rows 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.circuit

The published tables

opinion_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.

decisions

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.

ColumnTypeMeaning
opinion_idbigintLawDiver id of the lead opinion. This is the id in a case URL and the id every other table uses.
decision_idbigintLawDiver id of the decision. The majority, concurrences, and dissents share it.
case_nametextFull case name.
case_name_shorttextShort caption.
citationtextReporter 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_keytextLookup 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_citationstext[]Other reporter citations for the same decision.
court_idtextCourt 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_ondateDecision date.
yearsmallintDecision year.
docket_numbertextDocket number.
precedential_statustextPrecedential status as recorded for the decision, such as Published or Unpublished.
publishedbooleanTrue when the decision is published.
cited_by_countintegerNumber of other decisions that cite this one.
good_law_statustextgood (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_countintegerNumber of negative treatments counted for the good-law status.
good_law_basistextWritten explanation of the good-law status.
nature_of_suittextFederal nature of suit, when the decision has one.
causetextCause of action, when the decision has one.
syllabustextCourt syllabus, when the decision has one.
dispositiontextCourt disposition, when the decision has one.

opinions

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.

ColumnTypeMeaning
opinion_idbigintLawDiver id of this writing. Join citations.citing_opinion_id here.
decision_idbigintLawDiver id of the decision. Shared with the other writings in the same case.
case_nametextFull case name.
court_idtextCourt id from courts. fladistctapp is the undivided Florida DCA bucket. Districts are fladistctapp1 through fladistctapp6.
decided_ondateDecision date.
yearsmallintDecision year.
docket_numbertextDocket number.
author_judgetextAuthor 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_bytextNames of judges who joined, as printed.
precedential_statustextPrecedential status as recorded, such as Published or Unpublished.
publishedbooleanTrue when the decision is published.
char_countintegerLength of this writing in characters.
is_leadbooleanTrue when this writing speaks for the court.
opinion_typetextmajority, 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.

opinion_text

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.

ColumnTypeMeaning
opinion_idbigintLawDiver id. Join opinions or decisions.
bodytextThe 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.

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.

ColumnTypeMeaning
opinion_idlongLawDiver id of the indexed opinion.
case_nametextCase caption, stemmed and exact-form searchable.
syllabustextCourt syllabus when present.
headnotestextHeadnotes when present.
holdingstextHoldings text when present.
bodytextFull opinion body. Primary field for corpus-wide word and proximity search (for example Mark w/2 Lemley).
yearintegerDecision year filter.
jurisdiction_keykeywordJurisdiction filter key used by the search engine.
is_publishedbooleanTrue when the decision is published.
good_law_statusintegerEncoded good-law status used as a filter.
cited_by_countintegerNumber of citing decisions.

citations

One citation from one opinion to one decision. The same pair can appear more than once. decisions.cited_by_count is the distinct count.

ColumnTypeMeaning
citing_opinion_idbigintLawDiver id of the opinion that contains the citation. Join opinions.
cited_opinion_idbigintLawDiver id of the cited lead opinion. Join decisions.
citing_decision_idbigintLawDiver decision id of the citing case.
cited_decision_idbigintLawDiver decision id of the cited case.
depthintegerHow many times the citing opinion cites that case.
treatmenttextTreatment label when one was recorded, such as followed, questioned, or overruled.
pin_citetextPin cite when one was recorded.
rationaletextThe citing opinion’s words for that treatment, when recorded.

treatments

One treatment event

ColumnTypeMeaning
opinion_idbigintLawDiver id of the treated decision’s lead opinion. Join decisions.
treating_opinion_idbigintLawDiver id of the opinion that treats it. Join opinions.
treatmenttextTreatment label, such as overruled, questioned, or followed.
pin_citetextPin cite when one was recorded.
rationaletextThe treating opinion’s words for that treatment, when recorded.

courts

One court

ColumnTypeMeaning
court_idtextStable court id.
nametextFull court name.
short_nametextShort name.
jurisdictiontextUSPS code for a state court, or federal.
leveltextsupreme, appellate, trial, bankruptcy, or specialty.
circuittext1 through 11, dc, or federal. Empty for a court outside a circuit.

judges

A printed author name on one court

ColumnTypeMeaning
nametextAuthor name as printed on an opinion.
court_idtextCourt this name has written for. One row per name and court.

opinion_judges

The author of one opinion

ColumnTypeMeaning
opinion_idbigintLawDiver id of the opinion.
nametextAuthor name as printed.
roletextauthor.

statute_citations

One statute mention in an opinion. Count rows for how often a section is cited.

ColumnTypeMeaning
opinion_idbigintLawDiver id of the citing opinion.
authoritytextCitation as printed.
codetextNormalized citation key. Filter on this. 42 U.S.C. § 1983 is 42usc1983.
titletextTitle or volume when parsed.
sectiontextSection when parsed.

topics

One topic in the case-law topic list

ColumnTypeMeaning
topic_idsmallintStable topic id. The same number is stored on opinion_topics.topic_id.
nametextThe topic, in the form used for classification, such as summary judgment or standing.
categorytextThe group the topic belongs to, such as civil procedure or contracts.

opinion_topics

One topic assigned to one opinion. Join decisions on opinion_id for the lead opinion’s topics.

ColumnTypeMeaning
opinion_idbigintLawDiver id. Join decisions or opinions.
topic_idsmallintJoin topics.topic_id.

case_names

One opinion, for name lookup. Query this table on its own, not joined to the case tables.

ColumnTypeMeaning
opinion_idbigintLawDiver id.
display_titletextCaption used for display.
case_nametextNormalized case name used for lookup.
party_atextNormalized first party.
party_btextNormalized second party.
jurisdictiontextUSPS code for a state court, or federal.
is_federalbooleanTrue for a federal court.
publishedbooleanTrue when the decision is published.
leveltextsupreme, appellate, trial, bankruptcy, or specialty.
yearsmallintDecision year.
decided_ondateDecision date.
good_law_statustextgood, caution, negative, no_negative, or unknown. Same labels as decisions.good_law_status.
cited_by_countintegerNumber of other decisions that cite this one.

reporter_cites

One reporter citation. Query this table on its own, not joined to the case tables.

ColumnTypeMeaning
opinion_idbigintLawDiver id of the opinion.
cite_texttextCitation as printed.
reporter_keytextLookup key, the same form as decisions.citation_key.
volumeintegerReporter volume.
reportertextReporter abbreviation.
pageintegerFirst page.
is_canonicalbooleanTrue for the citation used as decisions.citation.
yearsmallintDecision year.
decided_ondateDecision date.
publishedbooleanTrue when the decision is published.
jurisdictiontextUSPS code for a state court, or federal.

export_results

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.

ArgumentFormWhat it does
sqlOptional stringThe same SELECT query_corpus accepts.
paramsOptional arrayBound to $1, $2 in that SQL.
searchOptional objectThe same arguments as search_cases. The file is the first page, at most 50 rows. truncated is true when the search has more hits.
formatcsv, jsonl, or xlsx. Default csvCSV is one header row. JSONL is one JSON object per line. xlsx is one sheet named results.
columnsOptional list of namesKeeps those columns, in that order. Missing cells are empty. Omit it to keep every column.
includeOpinionTextBoolean, default falseCaps the file at 200 rows. It does not attach opinion text. Call get_opinion_text for the body.
filenameOptional, up to 80 charactersLetters, digits, dot, underscore, and hyphen are kept. The format extension is added when missing.
maxRowsInteger 1–50000, default 50000SQL 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"
}

search_cases

Federal and state case search. Jurisdiction is required. This is the tool for finding opinions. Counts, joins, and rankings belong in query_corpus.

ArgumentFormWhat it does
queryString, 1–1000 characters, requiredNatural 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".
jurisdictionObject, requiredtype plus state or circuit when that type needs one. Call list_jurisdictions for the codes.
searchTypeauto (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.
courtsUp to 20 court idsKeeps 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.
courtLevelOne of supreme, appellate, trial, bankruptcy, specialty, or an array of themSame: applied after ranking, reading further pages until the requested page fills.
dateFromYYYY-MM-DDDecision date, inclusive.
dateToYYYY-MM-DDDecision date, inclusive.
includeUnpublishedBooleanIncludes unpublished opinions when true.
judgeString, 2–120 charactersAuthor name, substring match. Applied after ranking like courts.
citesCaseCitation or case idSearches 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.
minCitedByInteger ≥ 0Drops hits below that cited-by count. Applied after ranking like courts.
goodLawOnlyBooleanKeeps hits the index marks as good law.
sortrelevance (default) or newestnewest sorts by decision date.
limitInteger 1–50, default 20Also capped by the account’s per-search maximum.
offsetInteger ≥ 0, default 0Page start. The page number is offset divided by limit.
includeOpinionTextBoolean, default falseAccepted and ignored. The note in the result says to call get_opinion_text or export_results.
includeCaseCardBoolean, default falseAccepted 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.

retrieve_case

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.

ArgumentFormWhat it does
queryString, 2–500 characters, requiredA citation or a case name.
caseIdOptional stringAn 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.

get_case

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 }.

get_opinion_text

Opinion text, in pages. The body is plain text.

ArgumentFormWhat it does
caseIdString, requiredLawDiver opinion id.
sectionall (default), majority, concurrence, or dissentmajority returns the whole body. concurrence and dissent start at the first heading that matches. If no heading matches, the whole body is returned.
formattext (default), markdown, or htmlThe body is plain text in every format.
includePageNumbersBoolean, default trueWhen false, star page markers such as *678 are removed.
offsetInteger ≥ 0, default 0Character offset into the section. Pass nextOffset from the previous page.
maxCharsInteger, default 100000, maximum 250000Characters 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 }.

get_good_law

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 }.

goodlaw_check

The citing-case list. Rankings that need the whole graph, including most-cited and citation depth, belong in query_corpus on citations.

ArgumentFormWhat it does
caseIdString, requiredThe cited case.
orderrecent (default), negative, most_cited, or depthrecent 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.
limit10 (default), 50, 100, or unlimitedHow 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.
treatmentOptional list of stringsKeeps citing rows whose status equals one of these labels, compared without regard to case.
dateFromOptional date stringDrops citing rows filed before this date. A row with no date is kept.
dateToOptional date stringDrops citing rows filed after this date. A row with no date is kept.
includeSnippetsBoolean, default trueAccepted. 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.

check_citation

Verifies one citation, a batch, or citation-like lines in a passage. Supply one of citation, citations, or text. Supplying none is an error.

ArgumentFormWhat it does
citationOptional string, up to 2000 charactersOne citation. Ignored when citations is set.
citationsOptional array, 1–50 stringsA batch. Each item is at most 500 characters. This wins over citation and text.
textOptional string, up to 20,000 charactersSplit 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.
checkPinCitesBoolean, default trueEchoed as pinCiteChecked on each row. The resolver still runs either way.
includeGoodLawBoolean, default trueWhen false, goodLaw is omitted from each row.
authorityTypesOptional: cases, statutes, regulations, court_rules, taxRecorded 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.

retrieve_statute

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.

ArgumentFormWhat it does
queryOptional string, 2–500 charactersA Bluebook citation with a section number, such as 42 U.S.C. § 1983 or Fla. Stat. § 768.81.
authorityKeyOptional string, 3–200 charactersA stable key from a prior check, used when you already have one.
yearOptional integer, 1900–2100Preferred code edition year when the source is year-versioned.
includeCitingCasesBoolean, default falseWhen true, citingCases is a sentence telling the caller to query statute_citations. It is not a list of cases.
citingCasesLimitInteger 1–500, default 25Echoed. 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.

list_jurisdictions

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.

LawDiver Enterprise documentation | LawDiver