Skip to content

Introduction

Travel times from every US census block to nearby points of interest, by walking, biking, and public transit: the data behind close.city. Read-only, metered by returned rows.

Base URL: https://api.close.city

The machine-readable contract is the OpenAPI reference, generated from the same spec these docs are built on. Every response shape in the guide is verified against that spec in the API’s test suite.

  • Modes: walk, bike, transit. (There is no drive mode.) Repeat the mode parameter to select several (for example ?mode=walk&mode=transit), or omit it for all. The block and point routes return mode as a string label; the areal routes (/v1/blocks/query, /v1/places/{geoid}/blocks) return a numeric mode_id.
  • Destination types: numeric ids from GET /v1/meta/destination-types (see the full list). Types are leaves (e.g. grocery stores) or parents (e.g. “Public schools”, covering elementary/middle/high). Filtering by a parent expands to its leaves.
  • Travel times are in minutes and always capped at 30, matching close.city. A missing (block, type) row means “not reachable within 30 minutes”, not zero. See The data.
  • GEOIDs are 15-digit census block identifiers; census-place GEOIDs identify cities and towns.

New here? The data explains what Close measures and how, and the Python and R SDKs each have a get-started tour and worked tutorials that map the results at every step.

Terminal window
curl -H "Authorization: Bearer $CLOSECITY_KEY" \
"https://api.close.city/v1/blocks/410390020001010/summary?mode=walk"
{
"block": { "geoid": "410390020001010", "population": 1187,
"land_area_m2": 183245.0 },
"results": [
{ "dest_type_id": 30, "mode": "walk", "travel_time": 6.5 }
]
}

Next: authenticate, then learn how metering and pagination work.