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
| Plan | Price | Searches |
|---|---|---|
| No key | Free | 250 a month (MCP, per IP) |
| Free key | Free | 1,000 a month, REST and MCP |
| Prepaid credits | $0.005 a search, down to $0.004 | Credits never expire |
| Developer | $49/month | 100,000 a month |
| Scale | $249/month | 600,000 a month |
How it compares
| API | US city and county codes | State statutes | Case law | Free use |
|---|---|---|---|---|
| Corpus | About 300, in many states | All 50 + DC | No | 250/month with no key; 1,000 with a free key |
| Legal Data Hunter | None in the US | 39 + DC (none for AR, CO, ID, IL, MI, MS, NJ, RI, WI) | Yes | 20/day with a free key |
| OpenLaws | Not on its pricing page | Federal, states, DC, PR | Not in the API plans | None; from $2,500/month |
| GoCodebook | 540, California only | California | No | 10/day; then $0.30 a search |
| Open Legal Codes | Says 37,000+, fetched on first request | California | No | Free; keyword search, one jurisdiction at a time |
| CourtListener | No | No | Yes: the case-law API to use | Free 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.
