Overview
All requests go to https://api.citymatch.ai/v1 over HTTPS. Cities and neighborhoods are addressed by slug (the same slugs used on citymatch.ai). Every response is JSON wrapped in a standard envelope. Scores match the consumer site exactly.
The API is live and self-serve. Pick a plan and create your account in a couple of minutes: view pricing and your key is scoped to your organization.
Try it live
Run a real call against the live API. These examples hit the production endpoints through a sandbox key, so the data and rate-limit headers below are exactly what you would get with your own key.
Pick an example to run a live call against the production API. No key needed here; the response and rate-limit headers are the same as you would get with your own.
Authentication
Pass your secret key as a Bearer token on every request. Keys begin with cm_sk_live_. Keep them server-side; treat a key like a password.
curl https://api.citymatch.ai/v1/ping \ -H "Authorization: Bearer cm_sk_live_YOUR_KEY"
A missing header returns 401 missing_bearer; an unknown or revoked key returns 401 invalid_key.
Response envelope
Every response has the same top-level shape. On success, data holds the result and error is null. On failure, data is null and error carries a stable code and a human-readable message. meta always reports your plan and usage.
// success
{ "success": true, "data": { ... }, "meta": { "plan": "developer", "count": 1, "limit": 50000 }, "error": null }
// error
{ "success": false, "data": null, "meta": {}, "error": { "code": "not_found", "message": "No neighborhood matches that slug." } }Rate limits & quotas
Two independent limits apply: a monthly call quota and a per-minute rate limit. Every response carries rate-limit headers so you can self-throttle.
X-RateLimit-Limit: 60 # per-minute ceiling for your plan X-RateLimit-Remaining: 59 # calls left in the current minute X-RateLimit-Reset: 1781405700 # unix epoch when the window resets
Exceeding either limit returns 429. The two cases are distinct:
rate_limited— too many requests this minute. Includes aRetry-Afterheader (seconds).quota_reached— monthly quota exhausted. Resets at the start of the month.
A batch request counts as one request against the per-minute rate limit, but N (the number of items) against the monthly quota.
| Plan | Per minute | Per month | Datasets |
|---|---|---|---|
| Developer | 60 | 50,000 | Scores, housing, flood |
| Growth | 300 | 500,000 | + Cost-of-living model |
| Enterprise | Custom | Unlimited | + Feeds & webhooks |
Errors
Errors use standard HTTP status codes and a stable error.code you can branch on.
| Status | code | Meaning |
|---|---|---|
| 401 | missing_bearer / invalid_key | No key, or an unknown/revoked key |
| 403 | no active API plan | Key is valid but the org has no API entitlement |
| 400 | bad_param / ambiguous_slug / ... | Invalid or ambiguous input (details in error.fields) |
| 404 | not_found | No city or neighborhood matches |
| 429 | rate_limited / quota_reached | Per-minute or monthly limit hit |
| 503 | usage_unavailable | Metering temporarily unavailable; retry |
Tier labels
Every neighborhood and city payload includes a tier: a human-readable label derived from the overall score. Neighborhoods and cities use different score ranges (they are scored against different distributions), so the thresholds differ and the top label is named for each. A tier is null only when the overall score is null. See the full scoring approach in our methodology.
Neighborhoods
| Overall score | tier |
|---|---|
| 62 and up | Top Tier Neighborhood |
| 57 to 61 | Strong Choice |
| 50 to 56 | Worth Considering |
| below 50 | Niche Pick |
Cities
| Overall score | tier |
|---|---|
| 65 and up | Top Tier City |
| 55 to 64 | Strong Choice |
| 45 to 54 | Worth Considering |
| below 45 | Niche Pick |
Endpoints
/pingHealth and auth check. Confirms your key works and reports your plan.
Response
{ "success": true, "data": { "pong": true, "plan": "developer" },
"meta": { "count": 1, "limit": 50000 }, "error": null }/neighborhoods/{slug}Full data for one neighborhood: scores, tier, housing, property tax, and environmental risk. If a slug exists in more than one city, the response is 400 ambiguous_slug with a candidate list — retry with ?city=<city_slug>.
Request
curl "https://api.citymatch.ai/v1/neighborhoods/bellaire?city=houston-tx" \ -H "Authorization: Bearer cm_sk_live_YOUR_KEY"
Response
{
"success": true,
"data": {
"neighborhood": "Bellaire",
"neighborhood_slug": "bellaire",
"city": "Houston",
"city_slug": "houston-tx",
"overall_score": 56,
"tier": "Worth Considering",
"dimensions": {
"affordability": 57, "safety": 50, "schools": 50, "commute": 63,
"transit": 57, "entertainment": 61, "healthcare": 61
},
"housing": {
"median_rent_usd": 4359,
"median_home_value_usd": 831400,
"median_income_usd": 168750
},
"property_tax": null,
"context": {
"avg_commute_minutes": 29.1, "crime_rate_per_1000": 22.5,
"avg_school_rating": null, "restaurant_count": 30, "grocery_count": 5,
"park_count": 4, "hospital_count": null, "pharmacy_count": null,
"air_quality_index": null
},
"environmental_risk": null,
"updated_at": "2026-04-01"
},
"meta": { "plan": "developer", "count": 1, "limit": 50000 },
"error": null
}Field notes
Blocks are null when the underlying data is sparse for that neighborhood (as with property_tax and environmental_risk here). When present, property_tax holds effective_rate, has_mud, mud_rate, has_cdd, cdd_annual_fee, tax_year; environmental_risk holds flood {fema_zone, label, score, insurance_required} plus wildfire, hurricane, heat, earthquake (each label + score; heat adds days_above_100).
/neighborhoodsRank and filter the neighborhoods in one metro. city is required. Returns summary items; call /neighborhoods/{slug} for full detail. Neighborhoods without scores are excluded.
Query parameters
city(required) — metro slug, e.g.houston-txmin_overall,min_<dimension>— score floors (a null value fails the filter)max_rent,max_home_value,max_flood_risk— ceilingssort— overall (default), a dimension, rent, home_value, population, flood_riskorder— asc | desc;limit(max 100, default 20);offset
Request
curl "https://api.citymatch.ai/v1/neighborhoods?city=houston-tx&min_overall=55&sort=overall&order=desc&limit=2" \ -H "Authorization: Bearer cm_sk_live_YOUR_KEY"
Response
{
"success": true,
"data": {
"city": "Houston", "city_slug": "houston-tx",
"query": { "sort": "overall", "order": "desc", "limit": 2, "offset": 0 },
"count": 2, "total": 9,
"neighborhoods": [
{ "neighborhood": "Montrose", "neighborhood_slug": "montrose", "city_slug": "houston-tx",
"overall_score": 60, "tier": "Strong Choice",
"dimensions": { "affordability": 57, "safety": 55, "schools": 50, "commute": 66,
"transit": 72, "entertainment": 75, "healthcare": 62 },
"median_rent_usd": 2618, "median_home_value_usd": 236600,
"flood_risk": null, "population": null },
{ "neighborhood": "Bellaire", "neighborhood_slug": "bellaire", "city_slug": "houston-tx",
"overall_score": 56, "tier": "Worth Considering",
"dimensions": { "affordability": 57, "safety": 50, "schools": 50, "commute": 63,
"transit": 57, "entertainment": 61, "healthcare": 61 },
"median_rent_usd": 4359, "median_home_value_usd": 831400,
"flood_risk": null, "population": null }
]
},
"meta": { "plan": "developer", "count": 1, "limit": 50000 },
"error": null
}/neighborhoods/batchEnrich up to 50 neighborhoods in one request. Each item is a city_slug/neighborhood_slug pair. Per-item status means one bad slug never fails the batch. Billed as N calls against your monthly quota.
Request
curl -X POST "https://api.citymatch.ai/v1/neighborhoods/batch" \
-H "Authorization: Bearer cm_sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "items": ["houston-tx/bellaire", "houston-tx/montrose", "houston-tx/nope"] }'Response
{
"success": true,
"data": {
"count": 3, "ok_count": 2,
"results": [
{ "query": "houston-tx/bellaire", "status": "ok", "data": { /* full neighborhood payload */ } },
{ "query": "houston-tx/montrose", "status": "ok", "data": { /* full neighborhood payload */ } },
{ "query": "houston-tx/nope", "status": "not_found", "data": null }
]
},
"meta": { "plan": "developer", "count": 3, "limit": 50000, "charged": 3 },
"error": null
}Per-item statuses: ok, not_found, city_not_found, bad_pair (malformed). A neighborhood that resolves but has no scores returns ok with null data blocks.
/cities/{slug}Full data for one city: the 11-dimension city score, tier, cost-of-living indices, and context. City slugs are globally unique. In cost_of_living_indices, median_rent is the Census median gross rent in dollars a month, and groceries_index and restaurant_price_index are BEA Regional Price Parities for goods and services (US average = 100) for the city's metro area.
Request
curl "https://api.citymatch.ai/v1/cities/houston-tx" \ -H "Authorization: Bearer cm_sk_live_YOUR_KEY"
Response
{
"success": true,
"data": {
"city": "Houston", "city_slug": "houston-tx",
"region": "Texas", "region_code": "TX",
"country": "United States", "country_code": "US",
"latitude": 29.7604, "longitude": -95.3698, "population": 2304580,
"overall_score": 59, "tier": "Strong Choice",
"dimensions": {
"affordability": 59, "safety": 32, "healthcare": 60, "weather": 72,
"jobs": 82, "accessibility": 16, "internet": 84, "schools": 60,
"college": 78, "culture": 70, "nightlife": 72
},
"cost_of_living_indices": {
"median_rent": 1313, "groceries_index": 100.6, "restaurant_price_index": 95.6
},
"description": "Houston is America's most diverse city ...",
"updated_at": "2026-02-21T00:00:00+00:00"
},
"meta": { "plan": "developer", "count": 1, "limit": 50000,
"metrics_count": 11, "total_metrics": 11 },
"error": null
}/cities/batchEnrich up to 50 cities in one request. Each item is a city_slug. Same per-item status model and N-against-quota billing as the neighborhood batch.
Request
curl -X POST "https://api.citymatch.ai/v1/cities/batch" \
-H "Authorization: Bearer cm_sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "items": ["houston-tx", "des-moines-ia", "not-a-city"] }'Response
{
"success": true,
"data": {
"count": 3, "ok_count": 2,
"results": [
{ "query": "houston-tx", "status": "ok", "data": { /* full city payload */ } },
{ "query": "des-moines-ia", "status": "ok", "data": { /* full city payload */ } },
{ "query": "not-a-city", "status": "not_found", "data": null }
]
},
"meta": { "plan": "developer", "count": 3, "limit": 50000, "charged": 3 },
"error": null
}/compareHead-to-head verdict for two or three neighborhoods. Pass each as a repeated n=<city_slug>/<neighborhood_slug>. Symmetric (order does not matter).
Request
curl "https://api.citymatch.ai/v1/compare?n=houston-tx/bellaire&n=houston-tx/montrose" \ -H "Authorization: Bearer cm_sk_live_YOUR_KEY"
Response (shape)
{
"success": true,
"data": {
"mode": "two_way",
"neighborhoods": [
{ "neighborhood": "Bellaire", "neighborhood_slug": "bellaire", "city": "Houston",
"city_slug": "houston-tx", "overall_score": 56,
"dimension_wins": [ { "dimension": "affordability", "value": 57, "delta": 0 } ] },
{ "neighborhood": "Montrose", "neighborhood_slug": "montrose", "city": "Houston",
"city_slug": "houston-tx", "overall_score": 60,
"dimension_wins": [ { "dimension": "transit", "value": 72, "delta": 15 } ] }
],
"winner": { "neighborhood": "Montrose", "neighborhood_slug": "montrose", "city_slug": "houston-tx" },
"ties": [],
"synthesis": "Montrose leads on transit and entertainment ..."
},
"meta": { "plan": "developer", "count": 1, "limit": 50000 },
"error": null
}winner is null on a tie. All neighborhoods must have scores, or the response is 400 missing_metrics.
/resolveTurn a location into the CityMatch neighborhoods that cover it, so you can then look them up. Provide ?zip= or ?lat=&lng=. (Street-address resolution is not available yet and returns 501.)
Request
curl "https://api.citymatch.ai/v1/resolve?zip=77401" \ -H "Authorization: Bearer cm_sk_live_YOUR_KEY"
Response
{
"success": true,
"data": {
"query": { "zip": "77401" },
"resolution": "zip",
"match_count": 1,
"matches": [
{ "neighborhood": "Bellaire", "neighborhood_slug": "bellaire",
"city": "Houston", "city_slug": "houston-tx" }
]
},
"meta": { "plan": "developer", "count": 1, "limit": 50000 },
"error": null
}With ?lat=&lng=, resolution is nearest_centroid and each match includes a distance_km.