Municipal code API · city ordinance API
Municipal code API: city and county ordinances in one search
Corpus searches 440 city and county codes of ordinances, one city at a time or every covered city in a state at once, in the same call as that state's statutes.
Calls that work
One city: Tucson's code
curl -H "Authorization: Bearer $CORPUS_API_KEY" \
"https://corpuslaw.us/api/v1/search?q=mobile+food+vending&jurisdiction=AZ-TUCSON"A whole state: Arizona's statutes first, then its cities and counties
curl -H "Authorization: Bearer $CORPUS_API_KEY" \
"https://corpuslaw.us/api/v1/search?q=short-term+rental&jurisdiction=AZ"Which cities are covered (live)
curl -H "Authorization: Bearer $CORPUS_API_KEY" \
"https://corpuslaw.us/api/v1/coverage"What to know
- Each result names its city, its section and its official citation. The full text comes with its provenance: the source Corpus read it from.
- A city the coverage list does not show is not searchable yet. The API says so rather than returning an empty result.
- For a city Corpus lacks, Open Legal Codes fetches any code on Municode, American Legal or eCode360, one city at a time.
- Free to start: 250 searches a month with no key, 1,000 with a free key, then $0.005 a search from prepaid credits (down to $0.004). For steady volume, monthly plans start at $49 for 100,000 searches ($249 for 600,000).
Questions
Is this the official text of the code?
It is the text the city's code publisher posts, and each section's provenance names that source. The copy the city's own website links to is the one the city stands behind.
Can I search every city in a state at once?
Yes. Pass the state's code, such as AZ. Results rank the state's own law first and then its cities and counties. Add local=exclude for state law only.
