Enterprise
Enterprise can run as a private instance on our hardware, or it can run on your hardware. When run on your hardware, the database is updated every night, subject to your gatekeeping and review process. When run on your hardware, you achieve total control, privacy, and security.Enterprise clients can run their own applications on the database, and they can run our applications on their hardware. Customize them with our help or without it. You can give AI agents tool calling into Claude or OpenAI, or into any open-source LLM that you run, whether you run the LLM on your hardware or use an LLM from an inference provider. If you can think of a way to use the database, you probably can.
See it in actionContact us at [email protected]
The best part? You pay one monthly fee for the database. That is the whole charge. Use it to your heart's content. Compare that to Westlaw's API charges. For any large firm, our monthly cost is less than one day of Westlaw API charges.
The database holds about 10 million federal and state cases, federal statutes, state statutes, the Code of Federal Regulations, court rules, more than 1,300 United States treaties, more than 8,000 pattern jury instructions, and specialty collections in tax, labor, and securities, with room for more when a source can be legally downloaded. The expanded list of what is in the corpus — caselaw by year, statute edition years, treaties, jury instructions, and which authorities are stored for search versus retrieved from the official source — is the database index.
The case tables are PostgreSQL 18: decisions, opinions, opinion_text, citations, treatments, courts, judges, opinion_judges, topics, and opinion_topics. decisions is one row per decision, with the caption, court, date, reporter citation, and good-law status (good, caution, negative, no_negative, or unknown), plus the written basis and the count of negative treatments. opinions is one writing — majority, concurrence, or dissent — and opinion_text is that writing as plain text. citations is the graph. Each row is one opinion citing one decision, so the same table answers what a case cites and what has cited it: the citing opinion, the cited decision, how many times the cite appears, a treatment label when one was recorded, a pin cite, and the citing opinion's words for that treatment. cited_by_count on decisions is the distinct number of decisions that cite it. treatments is the treatment record good law is computed from. topics and opinion_topics are the subject classification.
case_names and reporter_cites are lookup tables, queried in their own statements. case_names matches a caption, with trigram indexes on the case name and both parties. reporter_cites is one row per reporter citation, including parallel cites, keyed on the normalized form: 556 U.S. 662 is 556us662.
Federal statutes, state statutes, and the Code of Federal Regulations are stored in statute_section, one versioned row per section. A section keeps its history. Effective dates open and close each version, the row with no end date is the text in force, and repealed text stays. The table is partitioned by jurisdiction. Indexes cover the current version for uniqueness and for full text — a generated text-search column with a partial GIN index — plus a sort key so a section range scans in statutory order, and a unique authority id. statute_citations is the case-law side of that link: each row is one statute mention in an opinion, with the citation as printed and a normalized key (42 U.S.C. § 1983 is 42usc1983). court_rule holds procedural rules the same way, versioned and partitioned, with a current-text full-text index. It stores the subdivision tree and the committee notes apart from the enacted text, so a pin such as Rule 12(b)(6) can be checked and a committee note is not treated as the rule. Embeddings of the statutory text sit beside those rows for meaning search. Keyword search of statute and rule text is a separate OpenSearch index, on heading and body, marked as statute or rule. A query_corpus join runs on the case tables and on statute_citations. The section text itself is read with retrieve_statute.
OpenSearch holds the opinion full-text index and the embedding index. The full-text index covers case name, syllabus, headnotes, holdings, and the opinion body. Each field is stemmed for ordinary search and stored again unstemmed for an exact form, with positions so a phrase or a proximity query can run, and results are ranked with BM25. Filters on that index include year, jurisdiction, publication, good-law status, and cited-by count. The embedding index is meaning search over the opinion text and over the analysis card: the summary, the holdings, and the questions presented.
The enterprise database comes with the LawDiver for Enterprise app, and the functions below are already loaded in it. The codebase is downloaded onto your hardware, and you can customize it however you want. Your IT team can inspect it to confirm there are no security issues. You can also add your own functions, written as standard SQL functions, that other applications call when they need them. Our applications are written in TypeScript. We can convert them into whatever language you want.
| Function | What it does |
|---|---|
| query_corpus | Read-only SQL. The call an agent repeats while it counts, filters, and follows up. |
| describe_schema | Tables, columns, types, and example values. Read this before the first query. |
| export_results | The same query, or a search, as CSV, JSONL, or Excel. |
| search_cases | Case search with jurisdiction, dates, court, court level, author, cites-case, cited-by minimum, and good-law filters. |
| retrieve_case | Resolve a citation or case name. Ambiguous names come back as a list. |
| get_case | Case card: parties, court, date, citation, good-law status, and cited-by count. |
| get_opinion_text | Opinion text, paginated, with an optional cut at a dissent or concurrence heading. |
| get_good_law | Good-law status, negative treatment, and the recorded basis. |
| goodlaw_check | The citing-case list. Rankings that need the whole graph belong in query_corpus. |
| check_citation | Verify one citation, a batch, or citation-like lines in a passage. |
| retrieve_statute | Statute, regulation, or court-rule text by citation. |
| list_jurisdictions | Jurisdiction and circuit codes used by search and by the courts table. |
query_corpus is one SELECT or WITH … SELECT. It allows joins, subqueries, UNION, GROUP BY, aggregates, and window functions, and it returns up to 5,000 rows. describe_schema lists the tables before the first query. export_results writes CSV, JSONL, or Excel, up to 50,000 rows. Filter a reporter cite with citation_key: 556 U.S. 662 is 556us662. The query below counts, by year, every opinion that cites Conley v. Gibson, Bell Atlantic v. Twombly, or Ashcroft v. Iqbal from 2005 through 2013. It reads the citation graph, joins each citing opinion for its date, and counts the three cases side by side. Nine rows came back from the live endpoint on October 2, 2026, in about 37 seconds. Conley falls from 960 citing opinions to 221. Iqbal reaches 1,111 in the year it was decided and 2,511 four years later. An agent can take any year from that table into search_cases and get_opinion_text, or hand the same SQL to export_results.
WITH targets AS (
SELECT opinion_id, decided_on,
CASE citation_key
WHEN '355us41' THEN 'conley'
WHEN '550us544' THEN 'twombly'
WHEN '556us662' THEN 'iqbal'
END AS case_key
FROM decisions
WHERE citation_key IN ('355us41', '550us544', '556us662')
)
SELECT o.year,
count(DISTINCT o.opinion_id) FILTER (WHERE t.case_key = 'conley') AS conley,
count(DISTINCT o.opinion_id) FILTER (WHERE t.case_key = 'twombly') AS twombly,
count(DISTINCT o.opinion_id) FILTER (WHERE t.case_key = 'iqbal') AS iqbal
FROM citations x
JOIN targets t ON t.opinion_id = x.cited_opinion_id
JOIN opinions o ON o.opinion_id = x.citing_opinion_id
WHERE o.year BETWEEN 2005 AND 2013
AND o.decided_on >= t.decided_on
GROUP BY o.year
ORDER BY o.year| year | conley | twombly | iqbal |
|---|---|---|---|
| 2005 | 960 | 0 | 0 |
| 2006 | 908 | 0 | 0 |
| 2007 | 794 | 119 | 0 |
| 2008 | 574 | 287 | 0 |
| 2009 | 516 | 373 | 1,111 |
| 2010 | 482 | 471 | 2,219 |
| 2011 | 320 | 473 | 2,343 |
| 2012 | 204 | 475 | 2,195 |
| 2013 | 221 | 491 | 2,511 |
LawDiver harvests cases continuously throughout the day and night, and updates statutes when statutes change. LawDiver maintains its enterprise master database, which is used to update the database of an enterprise client.
Early in the morning, a flag appears that indicates database updates are available. The client system pulls the updates from the enterprise master database. It can apply the updates directly to the client database, or quarantine them for inspection before upload. An update file is available, and it states what has been updated.
An enterprise customer can use the database as a custom connector in Claude or in OpenAI. Open-source applications link the database into that connector, so the agent calls these functions against your copy.
The database was assembled from the Harvard Caselaw Access Project, two CourtListener quarterly dumps, GovInfo, and government court and statute sites. Embeddings were computed with Qwen3-Embedding-8B on OpenRouter. Language-model notes were produced with GPT-5.6 Luna, GPT-6 Luna, or gpt-oss-120b. No Westlaw product was used. No Lexis product was used. The sources, the quoted licenses, and the Supreme Court's government-edicts decision are on the licenses page.