Overview
Close API (1.3.0)
Section titled “Close API (1.3.0)”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).
- Close: https://close.city/
- OpenAPI version: 3.1.0
Authentication
Section titled “Authentication”apiKey
Section titled “apiKey”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
sessionCookie
Section titled “sessionCookie”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