For AI agents: read the machine-readable documentation index at /llms.txt or the single-file full reference at /llms-full.txt.
Black Friday: $25 off forming an LLC in any stateLLC formation, through Dec. 1.See the deal →

Law search API · REST and MCP

The law search API that goes down to the city

3,180,617 provisions: federal law, 50 states plus DC, and 440 city and county codes, all searchable in one call. Every result has its official citation and the full text one call away, so your program, or your model, can check it.

Looking for case law? Corpus has none: use CourtListener. Corpus is for the law itself, from the US Code to a city’s food truck rules.

Try it now, with no key

The MCP endpoint answers plain HTTP. This works from any terminal:

curl -s https://corpuslaw.us/api/mcp -H 'content-type: application/json' -d '{
  "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": { "name": "law.search", "arguments": { "query": "mobile food vending", "jurisdiction": "AZ-TUCSON" } }
}'

Federal, state and city, one parameter apart

Scope with jurisdiction. A state search ranks the state’s own law first and then its cities and counties; local=exclude leaves them out.

Federal: jurisdiction=US (US Code and CFR only)

curl -H "Authorization: Bearer $CORPUS_API_KEY" \
  "https://corpuslaw.us/api/v1/search?q=overtime+exemption&jurisdiction=US"

State: jurisdiction=AZ (Arizona's own law first, then its cities)

curl -H "Authorization: Bearer $CORPUS_API_KEY" \
  "https://corpuslaw.us/api/v1/search?q=mobile+food+vendor+license&jurisdiction=AZ"

City: jurisdiction=AZ-TUCSON (the Tucson code)

curl -H "Authorization: Bearer $CORPUS_API_KEY" \
  "https://corpuslaw.us/api/v1/search?q=mobile+food+vending&jurisdiction=AZ-TUCSON"

The live list of codes is at /api/v1/coverage and on the coverage page.

Price

PlanPriceSearches
No keyFree250 a month (MCP, per IP)
Free keyFree1,000 a month, REST and MCP
Prepaid credits$0.005 a search, down to $0.004Credits never expire
Developer$49/month100,000 a month
Scale$249/month600,000 a month

How it compares

APIUS city and county codesState statutesCase lawFree use
CorpusAbout 300, in many statesAll 50 + DCNo250/month with no key; 1,000 with a free key
Legal Data HunterNone in the US39 + DC (none for AR, CO, ID, IL, MI, MS, NJ, RI, WI)Yes20/day with a free key
OpenLawsNot on its pricing pageFederal, states, DC, PRNot in the API plansNone; from $2,500/month
GoCodebook540, California onlyCaliforniaNo10/day; then $0.30 a search
Open Legal CodesSays 37,000+, fetched on first requestCaliforniaNoFree; keyword search, one jurisdiction at a time
CourtListenerNoNoYes: the case-law API to useFree account

Sources, dates, and where each one suits you better than Corpus: which US law APIs cover city ordinances and legal code databases compared.

Questions

Does the Corpus API include case law?

No. Corpus holds the law itself: statutes, regulations and city and county codes. For court opinions, use CourtListener, which is free.

Do I need an API key?

Not to start. The MCP endpoint answers 250 searches a month per IP with no key. A free key from the settings page raises that to 1,000 a month and opens the REST API.

How do I search one city, or a whole state?

Pass jurisdiction. US is federal law only. A state code such as AZ searches the state's own law first and then its cities and counties; local=exclude leaves them out. A city code such as AZ-TUCSON searches that city's code.

How do I know a result is right?

Every result carries its official citation and a node id. Fetch the full text with GET /api/v1/node/{id} or law.get_node and check it against the source.

Which cities are covered?

Call /api/v1/coverage or law.list_coverage for the live list. A city missing from it is not searchable yet, and the API says so instead of returning an empty result.