Skip to main content

GET /api/permits/hotspots

H3-aggregated building permit hotspots for a metro, ranked by permit density and total estimated cost. Query parameters
NameTypeRequiredDefaultDescription
metro_slugstringMetro slug (e.g. sf, nyc, chi, la).
daysint90Lookback period in days.
limitint25Max hotspot cells to return.
Example
curl "https://axiomlocus.io/api/permits/hotspots?metro_slug=sf&days=90&limit=10"
Response
{
  "metro": "sf",
  "days": 90,
  "hotspots": [
    {
      "h3_index": "882a100d63fffff",
      "center_lat": 37.7749,
      "center_lng": -122.4194,
      "permit_count": 47,
      "total_value": 12500000,
      "avg_value": 265957,
      "top_type": "new_construction"
    },
    {
      "h3_index": "882a100d65fffff",
      "center_lat": 37.7851,
      "center_lng": -122.4094,
      "permit_count": 32,
      "total_value": 8700000,
      "avg_value": 271875,
      "top_type": "renovation"
    }
  ]
}
FieldTypeDescription
hotspotsarrayH3 cells ranked by permit activity.
hotspots[].permit_countintTotal permits in the lookback window.
hotspots[].total_valuefloatSum of estimated costs.
hotspots[].top_typestringMost common permit type in this cell.

GET /api/crime/hotspots

Crime incident hotspots aggregated by H3 cell for a metro area. Query parameters
NameTypeRequiredDefaultDescription
metro_slugstringMetro slug.
daysint90Lookback period in days.
categorystringFilter by crime category: property, violent, other.
limitint25Max cells to return.
Example
curl "https://axiomlocus.io/api/crime/hotspots?metro_slug=sf&days=30&category=property"
Response
{
  "metro": "sf",
  "days": 30,
  "total_incidents": 1243,
  "hotspots": [
    {
      "h3_index": "882a100d63fffff",
      "incident_count": 89,
      "top_category": "property",
      "per_capita_rate": 12.4,
      "trend": "declining"
    }
  ]
}
FieldTypeDescription
total_incidentsintTotal incidents across all cells in the lookback window.
hotspots[].incident_countintNumber of incidents in this H3 cell.
hotspots[].per_capita_ratefloatIncidents per 1,000 residents.
hotspots[].trendstringTrend 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
NameTypeRequiredDefaultDescription
tractstringCensus tract GEOID (11 digits).
directionstringbothinbound (workers coming in), outbound (residents leaving), or both.
limitint20Top N connected tracts to return.
Example
curl "https://axiomlocus.io/api/commuter-flows?tract=06075010800&direction=inbound&limit=10"
Response
{
  "tract": "06075010800",
  "inbound": {
    "total_workers": 14200,
    "flows": [
      { "origin_tract": "06081611100", "workers": 890, "pct": 6.3, "origin_name": "Daly City" },
      { "origin_tract": "06001402100", "workers": 720, "pct": 5.1, "origin_name": "Oakland" }
    ]
  },
  "outbound": {
    "total_residents_working": 3400,
    "flows": [
      { "dest_tract": "06075017902", "workers": 210, "pct": 6.2, "dest_name": "SoMa" }
    ]
  }
}
FieldTypeDescription
inbound.total_workersintTotal workers commuting into this tract.
inbound.flowsarrayTop origin tracts with worker counts.
outbound.total_residents_workingintTotal residents who commute out.
outbound.flowsarrayTop destination tracts.