Developer documentation
Civic data, without the scraping.
A read-only REST API for US city leadership. Every request uses an API key from your dashboard.
Quick start
- Sign in and create a key on your dashboard.
- Send it as a bearer token on every request.
- Read
pagination.totalto page through results.
curl "https://api.civicgrid.org/cities?state=MD&limit=10" \
-H "Authorization: Bearer cg_live_YOUR_KEY"Interactive OpenAPI reference: api.civicgrid.org/docs ↗
Rate limits
| Tier | Per day | Per minute | Full export |
|---|---|---|---|
| Free | 100 | 10 | No |
| Starter | 10,000 | 100 | Yes |
| Pro | 100,000 | 500 | Yes |
Day limits are a rolling 24-hour window. Over the limit, requests return HTTP 429 with a retry time. Full-export endpoints return HTTP 403 with upgrade_required on the Free tier.
Endpoints
GET/citiesCities with their current leader. Filters: state, city_type, min_pop, max_pop, search. Paginate with limit and offset (up to 25 per page on Free, 500 on paid tiers).GET/cities/allStarter & ProEvery city with its current leader in one response.GET/cities/{id}One city with provenance, its published leadership history, and reviewer-published changes.GET/leaders/currentCurrent leaders. Filters: party, state. Paginate with limit and offset (up to 25 per page on Free).GET/leaders/exportStarter & ProEvery leader, current and former, grouped by city.GET/statsAggregate counts.GET/stats/statesPer-state city counts and population.GET/stats/states/{state_code}One state's aggregates.GET/healthLiveness and database readiness. No key required.
City record fields
Returned by /cities and /cities/all. Fields marked verification tell you how fresh a record is.
- city, state_code, state_name, county
- Where the city is.
- population
- Census Bureau estimate. null when no figure is on file; 0 is a real value.
- leader_name, leader_title
- The current published leader and their exact title, e.g. Mayor or Village President.
- governance_typeverification
- mayor, council_manager, select_board, town_administrator, commission, unknown, or null if not classified.
- leader_last_verified_atverification
- When the current leader was last confirmed against a source. null if never.
- last_verified_methodverification
- human (a reviewer confirmed it) or automated (matched the official page).
- verification_source_urlverification
- The source used for that confirmation.
- last_checked_atverification
- The latest check attempt of any outcome. A failed check never moves leader_last_verified_at.
- last_check_resultverification
- confirmed, under_review (a possible change awaits review), or check_failed.
- official_leader_pageverification
- The city's official leadership page, when one has been found.