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, 50-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. There is no single API that does both corpora well, so pick by data shape.
A founder messaged me last year asking which legal data API he should build on. He had a demo deadline, a small budget, and a one-line spec: "best legal data API, US, production-ready." I told him the spec was broken, and the budget was not 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, 50-state codes), open coverage is thin and fragmented. 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 case-index services to enterprise document platforms.
- judyrecords and vLex are real and large, but they solve different problems. judyrecords is a case index (records, not full opinion text). vLex is an enterprise document platform with quote-only pricing.
- Pick on data shape, not raw counts or price tags. A 760M "cases" headline means nothing if it is dockets and not searchable opinion text.
What should decide which legal data API you pick?
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 is vendor-published or independently verifiable, and we say so when a vendor does not publish a number.
Where pricing is quote-only or rate limits are gated behind an email, that opacity is treated as a fact about the product. 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, 50 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 rarely live in the same API done well. A platform optimized for opinion search is usually weak on clean per-section statute retrieval, and vice versa. Once you accept that, the field sorts itself.
The case-law options
judyrecords: huge, but know what "huge" means

At a glance: Quote-based / on request · Full-Text and Structured Objects APIs (Postman + email gate) · Best for: litigation analytics, party search, and conflict checks at scale.
judyrecords is the headline-number option. It advertises 760M+ US court cases, a Full-Text API over roughly 750M cases, and a Structured Objects API spanning 650M cases and 1.2B parties. It describes itself as carrying "10x more cases than PACER," and those numbers are real and impressive.
Here is the part that gets glossed over in roundups. That is case-index and docket data, not full opinion text. A count of 760M "cases" is a count of records, not a measure of substantive coverage.
If you need the reasoning of an opinion, the holding you would actually cite, a case index does not give you that. It tells you a case exists, who the parties were, and where it lives.
That is useful for litigation analytics, conflict checks, and party search. It is not the same product as a corpus of opinion text you can reason over.
Pricing and rate limits are also opaque on the public API page. The docs route through Postman and an email gate rather than a published tier. For a developer estimating cost and quota before committing, that opacity is itself a data point.
What's good:
- Enormous record count, far beyond what PACER alone exposes.
- Strong fit for party search, conflict checks, and litigation analytics.
Where it falls short:
- It is a case index, not opinion text, so you cannot cite a holding from it.
- No published price or rate limit, which makes cost and quota hard to plan.
Bottom line: Pick judyrecords when you need to know a case exists and who the parties were, at scale. Do not pick it expecting the reasoning of an opinion.
The enterprise option
vLex (now part of Clio)

At a glance: Quote-based / on request · developer portal (Fastcase Legal Data API) · Best for: organizations buying global breadth through a procurement process.
vLex is the document-volume heavyweight: over a billion legal documents, 100-plus countries, 850M+ court records, and a real developer portal at developer.vlex.com that includes the Fastcase Legal Data API. Clio acquired vLex, which pulls a serious global legal-data corpus into the practice-management orbit.
The catch for a solo developer is the commercial model. Pricing is custom and quote-only.
There is no public free tier to test against and no published per-call rate, which is the right shape for a big buyer and the wrong shape for a weekend prototype.
What's good:
- Over a billion documents with strong international coverage.
- A documented developer portal that includes the Fastcase Legal Data API.
Where it falls short:
- Quote-only pricing with no free tier means no fast path to prototyping.
Bottom line: vLex is a strong answer when you have a budget, a procurement process, and a need for global breadth. It is rarely the answer when "start coding tonight" is the constraint.
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, a multi-gigabyte download 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. The CFR is its own pipeline, and fifty state codes are fifty 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 exactly this and nothing else: it indexes roughly 2.6M statutory sections, the U.S. Code and CFR (707,107 federal sections), 49 state codes (1.9M+ state sections), plus the U.S. Constitution, Federal Rules, and Executive Actions with a daily refresh.
Three primitives: search the corpus, fetch a section's metadata, fetch its full text. You can read the scope on the Statutes API landing page or the features overview.
Section-level US Code, CFR, and 50-state statute retrieval, the same corpus the statutes API serves.
At a glance: Free to evaluate · public statutes-only API · Best for: developers who need clean per-section US Code, CFR, and 50-state statute text.
What's good:
- Section-level retrieval as clean JSON, not a multi-gigabyte XML dump.
- Broad statutory coverage with a daily refresh, so currency is handled for you.
- Three simple primitives: search, fetch metadata, fetch full text.
Where it falls short:
- Statutes and legislation only, so it is not 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 is statutes and legislation only, not a case-law API. For case-law data, reach for a dedicated case-law platform instead.
Anyone selling you a single API that does everything equally well across both corpora is selling you a number, not a product.
Others worth knowing
These are real, credible legal data APIs that fit narrower jobs. Each entry is sourced and curls live as of June 2026.
- govinfo (statutes, federal docs): the GPO's free API serves the US Code, Public and Private Laws, Statutes at Large, and presidential documents. You need a free api.data.gov key. It is package-and-granule oriented, so good for bulk retrieval, weaker for fetching one section as clean JSON (govinfo API page, June 2026).
- eCFR (regulations): the official Electronic Code of Federal Regulations API is free with no key and serves the current CFR. It is the authoritative source for federal regulation text, structured by title and part (eCFR developer docs, June 2026).
- Open States (state legislation): a free API (key via
X-API-KEYheader) covering bills, legislators, committees, and events across 50 states plus DC and Puerto Rico. Best for legislative tracking, not statute-section retrieval. See docs.openstates.org/api-v3 (Open States docs, June 2026). - Caselaw Access Project (historical case law): Harvard's CAP digitized ~6.5M US cases through 2020 with a free metadata API at api.case.law and bulk downloads. Native search was disabled in September 2024, so plan on bulk retrieval rather than live querying (Library of Congress free-case-law guide, 2024; case.law, June 2026).
- Open Legal Codes (statutes, regulations): a free, no-key API run by TIDY covering 37,000+ municipal, state, and federal jurisdictions, with REST, CLI, and MCP access. Broad municipal coverage, newer project. See openlegalcodes.org (Open Legal Codes, June 2026).
- OpenLaws (statutes, regs, case law): a registered-key API covering 50 states plus DC and Puerto Rico, federal statutes and regulations, and citation validation across 4.3M+ sections. See openlaws.us/api (OpenLaws, June 2026).
- Fastcase (case law, statutes): the Fastcase Legal Data API is now part of vLex and reachable through that developer portal. Quote-based, aimed at firms embedding research into internal apps (Fastcase, June 2026).
For the paid incumbents (LexisNexis, Westlaw, Bloomberg Law), see our LexisNexis and Westlaw API alternatives breakdown. All three are quote-only and built for enterprise procurement, not weekend prototypes.
How to actually choose
Strip away the marketing and the decision comes down to data shape. Use this:
| API | Data type | Coverage | Auth | Pricing |
|---|---|---|---|---|
| judyrecords | Case index | 760M+ US court records, 1.2B parties | Postman + email gate | Quote-based |
| Vaquill AI Statutes API | Statutes, legislation | US Code, CFR, 49 state codes, ~2.6M sections | API key, free credits | Free to evaluate |
| vLex (Clio) | Case law, legislation | 1B+ docs, 100+ countries, Fastcase API | Developer portal | Quote-based |
| Caselaw Access Project (Harvard) | Case law (historical) | ~6.5M cases through 2020; bulk only since 2024 | api.case.law metadata, bulk | Free |
| govinfo | Statutes, federal docs | US Code, Public Laws, Statutes at Large, presidential docs | api.data.gov key | Free |
| eCFR | Regulations | Current Code of Federal Regulations | None | Free |
| Open States | State legislation | Bills, legislators, committees, 50 states + DC + PR | X-API-KEY | Free key |
| Open Legal Codes | Statutes, regs | 37,000+ municipal/state/federal jurisdictions | None | Free |
| OpenLaws | Statutes, regs, case law | 50 states + DC + PR, federal; 4.3M+ sections | Registered key | Register for access |
| Fastcase (via vLex) | Case law, statutes | US opinions, statutes, regulations | Developer portal | Quote-based |
Three principles sit under that table.
Count is not coverage. A 760M-record headline is not 760M 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.
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 platforms winning developer trust in 2026 are honest about what their data is and is not. The ones losing it still ship a headline number and a quote-only price.
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.
The founder with the demo deadline shipped, by the way. A dedicated case-law source for the opinion lookups, a statutes API for the primary-law citations. Two sources, two jobs, no coronation required.
FAQ
Is there a free API for US statutes and regulations? There is no official open per-section API for the U.S. Code or CFR. The government ships bulk XML, not a queryable endpoint. A statutes-first API like Vaquill AI's fills that gap with section-level JSON, and it is free to evaluate.
Does Vaquill AI offer a case-law API? No. The Vaquill AI public API is statutes and legislation only: US Code, CFR, and 49 state codes. For case-law data, use a dedicated case-law source.
Are there free government APIs for legal data? Yes. govinfo serves the US Code and 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 free key. They are authoritative but bulk-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? The Harvard Caselaw Access Project still offers a free metadata API at api.case.law and bulk downloads for ~6.5M US cases through 2020. Its native search was disabled in September 2024, so plan on bulk retrieval rather than live querying.
What is the best API for US state legislation? Open States is the open default for state bills, legislators, and committees across all 50 states plus DC and Puerto Rico. It is free with 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. If you want a statutes-first API (US Code, CFR, federal rules, 49 state codes) with section-level retrieval, Vaquill AI's API is free to evaluate.
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
Read postReplace Harvey AI: Build Your Own Legal AI Stack on Claude + MCP (2026)
Read postUSC API: How to Pull US Code Sections Programmatically
Read postLegal API Pricing and Credits Explained: How Per-Call Billing Works
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, from the matter workbench to drafting, document comparison, document matrix, and citation-verified research.