Skip to content

Overview

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

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

Authentication

Metered routes need an API key (ck_live_…), sent as a bearer token and created at account.close.city. The catalog routes (/v1/health, /v1/last-updated, /v1/meta/*, /v1/places, /v1/isochrone/meta) are free and need no key.

Authorization: Bearer ck_live_…

Metering

One token is charged per returned data row (minimum one per request); the isochrone charges 10 tokens per contour level instead. A 304 Not Modified costs nothing. Every metered response carries X-Tokens-Charged and X-Tokens-Remaining.

Pagination & conditional requests

List endpoints use opaque, signed keyset cursors. Pass limit, then follow next_cursor. Metered GETs return an ETag; send it back as If-None-Match to revalidate for free.

Errors

Errors are RFC 9457 problem+json; the stable key is the final path segment of type (the slug, e.g. tokens-exhausted).

SDKs: a Python and an R client wrap all of this.

API key as a Bearer token. Create a free key at https://account.close.city (5,000 free tokens on signup, no card). Agents can complete sign-up programmatically. See https://docs.close.city.

Security scheme type: http

Portal session cookie, set by POST /auth/verify-code. State-changing portal routes also require the session’s CSRF token (from GET /auth/csrf) in an X-CSRF-Token header.

Security scheme type: apiKey

Cookie parameter name: __Host-wtm_session