GET /api/permits/hotspots
H3-aggregated building permit hotspots for a metro, ranked by permit density and total estimated cost.
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
metro_slug | string | ✓ | Metro slug (e.g. sf, nyc, chi, la). | |
days | int | 90 | Lookback period in days. | |
limit | int | 25 | Max hotspot cells to return. |
| Field | Type | Description |
|---|---|---|
hotspots | array | H3 cells ranked by permit activity. |
hotspots[].permit_count | int | Total permits in the lookback window. |
hotspots[].total_value | float | Sum of estimated costs. |
hotspots[].top_type | string | Most common permit type in this cell. |
GET /api/crime/hotspots
Crime incident hotspots aggregated by H3 cell for a metro area.
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
metro_slug | string | ✓ | Metro slug. | |
days | int | 90 | Lookback period in days. | |
category | string | Filter by crime category: property, violent, other. | ||
limit | int | 25 | Max cells to return. |
| Field | Type | Description |
|---|---|---|
total_incidents | int | Total incidents across all cells in the lookback window. |
hotspots[].incident_count | int | Number of incidents in this H3 cell. |
hotspots[].per_capita_rate | float | Incidents per 1,000 residents. |
hotspots[].trend | string | Trend vs prior period: increasing, stable, declining. |
GET /api/commuter-flows
LEHD Origin-Destination commuter flow data for a Census tract. Shows where workers live and where residents work.
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tract | string | ✓ | Census tract GEOID (11 digits). | |
direction | string | both | inbound (workers coming in), outbound (residents leaving), or both. | |
limit | int | 20 | Top N connected tracts to return. |
| Field | Type | Description |
|---|---|---|
inbound.total_workers | int | Total workers commuting into this tract. |
inbound.flows | array | Top origin tracts with worker counts. |
outbound.total_residents_working | int | Total residents who commute out. |
outbound.flows | array | Top destination tracts. |