A question with no single answer
Short answer: the best legal data API depends on what you query. For statutes and regulations (US Code, CFR, state codes), use a statutes-first API like Vaquill AI or a government source like govinfo and eCFR. For US case law, use a dedicated case-law platform. Few APIs cover both corpora well, so pick by data shape.
Reviewed and corrected on 12 October 2026. This is general information, not legal advice. Every third-party figure below was re-read on the vendor's own page on that date.
A spec like "best legal data API, US, production-ready" is where many builds go wrong, and the budget is rarely the reason. "Best legal data API" is the wrong question until you split it in two. Case law and statutes are not the same market. They have different shapes, different providers, and different right answers.
Treating them as one is how developers waste money. They pay enterprise quote-only prices for data they could have pulled free. Or they scrape a government XML dump for months when a clean endpoint already existed.
So the most useful tip for picking the best legal data API for developers is simple. Decide what kind of legal data you need first, then pick the source built for that shape.
So this is a comparison, not a coronation. The legal research APIs that matter sort into two data types, and the right one for your build follows from that split.
TL;DR
- There is no single best legal data API. Case-law data and statutory data are different markets with different winners.
- For structured statutes and regulations (USC, CFR, state codes), the official sources are bulk or package oriented. That gap is what a statutes-first API like Vaquill AI's public Statutes API fills.
- For US case law, expect a different set of providers entirely, from record-search services to enterprise document platforms.
- judyrecords and vLex are large, but they solve different problems. judyrecords advertises hundreds of millions of court cases through search and APIs. vLex is a global document platform that does not publish API prices on the pages read for this guide.
- Pick on data shape, not raw counts or price tags. A big "cases" or "documents" headline tells you little until you know what one record is.
A vendor tells you its API covers "millions of records." You are building a tool that has to quote the law. What is the most useful first question?
Part of our MCP and developer guide series.
For related MCP / API / developer coverage, see LexisNexis and Westlaw API Alternatives for Developers.
How we picked
We weighed each source on what a developer actually checks before building. That means data shape, coverage, currency, a real documented API, and a commercial model you can plan around. By data shape we mean opinions versus dockets versus statute text.
A free tier you can prototype against counts more than a headline record count.
Every price and coverage claim below was read on the vendor's own page on 12 October 2026, and we say so when a vendor does not publish a number. We do not estimate prices a vendor keeps private.
First, split the market
Here is the mental model. When a developer says "legal data," they mean one of two very different things.
Case law is what courts decide: opinions, dockets, the procedural record. This is messy, enormous, and historically locked behind paywalls. It is the data you query to answer "what did courts hold about warrantless cell-site location data," which lands you in Carpenter v. United States, 585 U.S. 296 (2018), or "what counts as a stop-and-frisk," which is Terry v. Ohio, 392 U.S. 1 (1968).
Statutory and regulatory data is what legislatures and agencies write: the U.S. Code, the Code of Federal Regulations, state codes, court rules. This is the structured primary law you cite when you need the exact text of 42 U.S.C. 1983 or the fair-use factors in 17 U.S.C. 107.
It looks tidier than case law but is harder to serve well. It changes constantly and has a brutal currency problem.
These two corpora are usually built by different teams with different pipelines, and a platform optimized for one is not automatically good at the other. Once you accept that, the field sorts itself.
The case-law options
judyrecords: huge, but know what "huge" means
At a glance: Pricing not published on its API page (inquiries go to api@judyrecords.com) · Full-Text and Structured Objects APIs · Best for: searching a very large set of US court cases and parties.
judyrecords is the headline-number option. Its home page advertises 770 million+ United States court cases. Its API page says the Full-Text API provides access to over 750M cases and the Structured Objects API to over 725M cases and 1.4B parties, and its info page says it has "10x more cases than PACER."
A count of "cases" is a count of records. judyrecords describes itself as a nationwide search engine for court cases and lawsuits, and its own pages do not say how many of those records carry the full text of a judicial opinion you could quote. Ask that before you build on it: what exactly is one record, and what text comes back with it?
Pricing and rate limits are not published on the API page, which points developers to an email address. A developer estimating cost and quota before committing will need to ask.
What's good:
- An enormous record count, which it says is 10x PACER's.
- Structured party data alongside full-text search.
Where to ask questions:
- What one record contains, and whether the text is a citable opinion.
- Price and rate limits, which are not published.
Bottom line: Pick judyrecords when you need to find cases and parties at scale. Check what each record contains before you promise your users a citable holding.
The enterprise option
vLex (now part of Clio)

At a glance: API prices not published on the pages read for this guide · vLex developer portal and Fastcase Legal Data API · Best for: organizations buying global breadth through a procurement process.
vLex is the document-volume heavyweight. Its site, now labeled "Part of Clio", describes over one billion legal documents from more than 100 countries and 850+ million court records, with APIs for custom integrations. Its developer portal describes the Iceberg APIs, with a three-step start: sign up for an API user account, retrieve subscription keys, and start building. Separately, Fastcase's Legal Data API page describes customizable data feeds in formats such as JSON, XML and LDML, arranged by contacting Fastcase.
For a solo developer the thing to check is the commercial model: neither page publishes a per-call price, so estimating cost means talking to the vendor.
What's good:
- Over a billion documents with international coverage, per vLex's own site.
- Documented developer portal, and feeds that can be customized to your format.
Where to ask questions:
- Price and terms for the specific API or feed you need, which are not published.
Bottom line: vLex is a strong answer when you have a budget, a procurement process, and a need for global breadth. When "start coding tonight" is the constraint, ask first what a trial looks like.
A short history of free access to law
Why is so much law free to read online, and so little of it available as a tidy API? The answer is a few decades of people arguing about it.
Cornell's Legal Information Institute started in 1992. Its own page says: "Founded in 1992 by a law professor and a technologist". Its stated aim is making legal information "more findable and understandable for the public". Similar institutes appeared in other countries. When they met in Montreal they signed the Declaration on Free Access to Law, which says public legal information "is digital common property and should be accessible to all on a non-profit basis and free of charge." It also says the government bodies that create that information "should provide access to it so that it can be published by other parties."
In the US the argument turned technical in 2010. Carl Malamud's nonprofit Public.Resource.Org held workshops around the country and arrived at ten principles it called Law.Gov. The core idea was that governments should publish primary legal materials "in bulk as distributed, authenticated, well-formatted data." The same year, Free Law Project was founded. It is the nonprofit behind CourtListener, an archive of court opinions and other court data.
Governments did build things. The Government Publishing Office launched govinfo as a beta in February 2016 and it replaced the older FDsys website in December 2018. Its API needs a free key from api.data.gov. The Library of Congress runs the Congress.gov API, which it describes as a way to "view, retrieve, and re-use machine-readable data" from Congress.gov. That history explains the gap the next section describes. Law is now free to read and often free to download in bulk. Looking up one section by citation is a different job.
The statutes gap
Now the part most roundups skip entirely, because they never split the market: structured statutes and regulations.
If you go looking for an open, clean, per-section API for the U.S. Code, you will not find an official one. The government ships the U.S. Code as bulk XML in USLM format, with no queryable per-section endpoint.
GovInfo's API exists but is package-and-granule oriented, built for bulk retrieval, not for fetching 5 U.S.C. 706 as clean JSON, which is the gap between free authoritative bulk data and an API you can query. The CFR is its own pipeline, and the state codes are dozens more.
So the statutes corpus has a strange property: it looks simpler than case law, yet it is harder to serve. The hard part is not fetching the text.
It is mapping a citation to the right section, handling repealed and renumbered sections, resolving cross-references, and keeping text current as Congress and agencies amend it.
That maintenance is a tax you pay forever if you try to own it yourself.
This is the gap a statutes-first API fills. The Vaquill AI public API is scoped to US primary law: 5.3M+ sections across the U.S. Code, the CFR, the state and territory codes, state administrative regulations and constitutions, state court rules, the U.S. Constitution, Federal Rules, agency guidance, the Federal Register, and Executive Actions, with a refresh cadence per source (daily for the CFR and the Federal Register, weekly or monthly for others, listed free in GET /boards). You can read the scope on the Statutes API landing page.
Its core calls are search, resolving a citation to a section, fetching a section's metadata, and fetching its full text, with change history and change alerts alongside.
At a glance: Self-serve, sign up · public API for US primary law · Best for: developers who need per-section US Code, CFR, and state statute text.
What's good:
- Section-level retrieval as JSON, not a bulk XML download.
- Citation resolution: hand it
42 U.S.C. 1983and get the exact section. - A published refresh cadence and change history per source, so you can check currency instead of assuming it.
Where it fits:
- US primary law. For opinions and dockets, pair it with a case-law source.
Bottom line: Use it when you need current statute and regulation text mapped to a citation without owning the maintenance. For opinions and dockets, pair it with a case-law source.
Be precise about scope, because precision is the whole point of this post. The public API here covers primary law, not case law. For case-law data, reach for a dedicated case-law platform.
What developers say
A September 2026 Hacker News thread about AI and law touched on where the law actually lives. One commenter, timschmidt, wrote: "I'm not aware of any single point of download for it all." Another, qingcharles, agreed and described what sits behind the word "courts": "you have over 3000 distinct court systems with their own access systems, usually requiring logins and CAPTCHAs." Then mlissner, writing about Free Law Project, replied: "We have hosted bulk case law at Free Law Project for over a decade."
All three comments are fair. Collecting court records from thousands of places is hard, and a nonprofit has been giving much of it away in bulk for years. The free supply is real. Turning it into a polished, queryable service is the extra step.
Others worth knowing
These are real, credible legal data sources that fit narrower jobs. Each entry was read on the provider's own page on 12 October 2026.
- govinfo (statutes, federal docs): GPO's API needs an api.data.gov key, which it says you can request for free. GPO describes content as stored in self-describing packages, so it suits bulk retrieval better than fetching one section as clean JSON.
- eCFR (regulations): the official Electronic Code of Federal Regulations API is free and needed no key when we called its titles endpoint on 12 October 2026. It serves the current CFR, structured by title and part.
- Open States (state legislation): an API that requires a registered key (passed as
X-API-KEYor?apikey), covering bills, legislators, committees and events for states, DC and Puerto Rico. Best for legislative tracking, not statute-section retrieval. See docs.openstates.org/api-v3. - Caselaw Access Project (historical case law): Harvard's CAP publishes reporter data from 1658 through 2020 as bulk files at static.case.law. Its site says all use restrictions on the data have been lifted and that CAP search has moved to CourtListener, so plan on bulk retrieval or CourtListener search rather than a CAP query service.
- Open Legal Codes (statutes, regulations): a free API and MCP server from TIDY with no signup or API key, covering 37,000+ jurisdictions across municipal, state and federal codes from five publishers. It says content is fetched on first request and then cached. See openlegalcodes.org.
- OpenLaws (statutes, regs): a registered-key API covering federal law, the 50 states, DC and Puerto Rico, with 4,554,349 sections and Bluebook citation lookup, at $2,500 per month flat with unmetered usage (its pricing page also lists higher plans). See openlaws.us and its pricing.
- Midpage (case law, statutes, regs): 16M+ US opinions with an AI citator, plus statutes, regulations and agency guidance that it announced on 23 July 2026, over an API, an MCP server and a dedicated SQL replica. Its data page does not list API prices: "Tell us what you are building and we will scope access, volume, and pricing." See midpage.ai/data-for-legal-tech.
- Fastcase (case law, statutes): the Fastcase Legal Data API is arranged by contacting Fastcase, with feeds delivered in formats such as JSON, XML and LDML and no published price.
The eCFR call is a one-liner you can run today. On 12 October 2026 this request, with no key, returned a titles array whose first entry was Title 1, "General Provisions", with up_to_date_as_of of 2026-10-08:
curl -s https://www.ecfr.gov/api/versioner/v1/titles.json
For the paid incumbents (LexisNexis, Westlaw, Bloomberg Law), see our LexisNexis and Westlaw API alternatives breakdown. Check each vendor's own pricing page for current terms.
How to actually choose
Strip away the marketing and the decision comes down to data shape. Use this:
| API | Data type | Coverage (as the provider states it) | Auth | Pricing |
|---|---|---|---|---|
| judyrecords | Court cases and parties | 770M+ cases on its home page; Full-Text API 750M+ cases; Structured Objects API 725M+ cases, 1.4B parties | Contact for API access | Not published |
| Vaquill AI API | US primary law | US Code, CFR, state and territory codes, state regs and court rules, federal local rules, state AG opinions, 5.3M+ sections | API key | Credits per call, listed on its public pricing endpoint |
| vLex (Clio) | Case law, legislation | 1B+ documents, 100+ countries, 850M+ court records | Developer portal signup | Not published |
| Caselaw Access Project (Harvard) | Case law (historical) | Reporter data from 1658 to 2020, bulk at static.case.law | None for bulk | Free |
| govinfo | Statutes, federal docs | GPO packages, including the US Code and public laws | api.data.gov key | Free |
| eCFR | Regulations | Current Code of Federal Regulations | None | Free |
| Open States | State legislation | Bills, legislators, committees, states + DC + PR | Registered key | Key required; see its site |
| Open Legal Codes | Statutes, regs | 37,000+ municipal/state/federal jurisdictions | None | Free |
| OpenLaws | Statutes, regs | Federal, 50 states, DC, PR; 4,554,349 sections | Registered key | $2,500/mo flat, higher plans listed |
| Midpage | Case law, statutes, regs | 16M+ opinions with a citator; statutes, regs and guidance | API key via request | Scoped per customer |
| Fastcase (via vLex) | Case law, statutes | US primary law feeds in JSON, XML, LDML | Contact Fastcase | Not published |
Three principles sit under that table.
Count is not coverage. A headline of hundreds of millions of records is not that many opinions you can reason over. Always ask whether the number measures the thing you need (substantive opinion text, current statute text) or a proxy for it (records, documents, parties).
Open does not mean infinitely free at scale. A free or metered tier is great for prototyping, but check the limits before you ship. Plan for a paid plan or self-hosting if you are running heavy production traffic. Free entry and free at volume are different promises.
Verification is the real spec. The industry learned this the hard way in Mata v. Avianca, the 2023 case where a lawyer filed ChatGPT-hallucinated citations and got sanctioned. The follow-on guidance, including ABA Formal Opinion 512, made the duty explicit: you verify.
A citation lookup against a real case-law source confirms a case is real. A structured statutes endpoint confirms you are quoting current text, not a repealed section.
The best legal data API is the one whose output you can trace back to a citable primary source.
A coverage claim you can test in an afternoon
Do not take a coverage number on faith, and you do not need the vendor's help to check it. Write down ten citations before you open any demo. Include a section amended in the past year, one that was repealed, one from a small state, and one citation that does not exist. Ask each candidate for all ten and compare the text with the official government site. Three things should stand out: whether the text matches word for word, whether each result says how current it is, and what happens with the citation that does not exist. A good source says "not found". A weak one returns something plausible.
For more questions to ask a supplier, see ten questions to ask a legal data vendor.
Where this is heading
The Chevron-to-Loper Bright shift (603 U.S. 369, 2024) shows why currency matters in statutory data. When the interpretive ground moves, the developers built on stale sources feel it first.
The vendors that earn developer trust say plainly what their data is and is not. For developers, that honesty is the whole opportunity: pick a purpose-built source for statutes, and a dedicated platform for case law.
Do not pay enterprise prices for the wrong corpus, and do not scrape what someone already maintains correctly.
Want the cost reasoning behind build-versus-buy on the data layer? The API-call versus RAG-pipeline cost comparison walks through the math, and the legal-tech developers use case covers the build patterns.
FAQ
Is there a free API for US statutes and regulations? For regulations, yes: the eCFR API is free and needed no key when we called it on 12 October 2026. For the U.S. Code, GPO's govinfo API is free with an api.data.gov key but is package oriented, and the Code is also published as bulk XML. A statutes-first API like Vaquill AI's adds section-level JSON and citation resolution, with credits per call.
Does Vaquill AI offer a case-law API? No. The Vaquill AI public API covers US primary law: statutes, regulations, court rules, constitutions, the Federal Register and agency guidance. For case-law data, use a dedicated case-law source.
Are there free government APIs for legal data? Yes. govinfo serves federal documents with a free api.data.gov key, the eCFR API serves the current Code of Federal Regulations with no key, and Open States covers state legislation with a registered key. They are authoritative but bulk or package oriented, so per-section retrieval can take extra work.
What is the difference between a case-law API and a statutes API? A case-law API returns court opinions, dockets, and citations, the messy record of what courts decided. A statutes API returns the structured text of laws and regulations, like 42 U.S.C. 1983 or a CFR part. They are different corpora with different update cadences, and few APIs serve both well.
Is the Caselaw Access Project API still available? CAP's own site says all use restrictions on its data have been lifted and that CAP search has moved to CourtListener. The reporter data, 1658 through 2020, is published as bulk files at static.case.law, so plan on bulk retrieval or CourtListener rather than a live CAP query service.
What is the best API for US state legislation? Open States is a common default for state bills, legislators, and committees across states, DC and Puerto Rico. It requires a registered API key. For the statute text itself (state codes), use a statutes-first source like Vaquill AI or Open Legal Codes.
A closing takeaway
Pick a dedicated platform for case law, a purpose-built source for statutes, and stop paying enterprise prices for the wrong corpus.
For the US statutes, regulations and court rules these laws sit in, see the US primary law API.
New legal AI guides, weekly.
Further Reading
Legal API in 2026: What It Is, What It Returns, and How to Pick One
Read postLexisNexis and Westlaw API Alternatives for Developers: How Access Works
Read postUSC API: How to Pull US Code Sections Programmatically
Read postHow Legal API Pricing Works (and Why Vendors Hide It)
Read postBoolean Search for Legal Databases
Read postCourt Records API vs Court Data API: Which One Your App Actually Needs
Read post
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.