Skip to content
Preview – data under validation

Access – GET & POST /v1/access

Returns the census block containing a point, composed from the requested include components.

Param Required Description
lat yes Latitude (WGS84)
lon yes Longitude (WGS84)
include no Comma-separated components: minutes, population, place, narrative, poi_counts. all selects every one. Defaults to minutes. poi_counts counts amenities within a fixed 1500 m radius; the keyed tier also gets named pois.
types no Comma-separated amenity types (e.g. grocery,pharmacy). Defaults to all 18. An unknown type is a 400, not silently the full list.
lang no en (default) or fr – affects the generated narrative and place names.
key no API key. Can also be sent as an X-Api-Key header.
Terminal window
# Only a subset of types:
curl "https://aportee.ca/v1/access?lat=43.6532&lon=-79.3832&types=grocery,pharmacy,library"

Each amenity in minutes is an object, not a bare number:

{ "value": 6, "reason": "ok" }

ok means reachable (value is the walk time in minutes); no_access means not reachable (value is null). v1 does not distinguish “unreachable within the search radius” from “no amenity of that type in the province” – the block tile stores the same sentinel for both. The object shape is a forward-compatible contract: when the pipeline can split those cases, reason gains granularity with no breaking change.

Code Meaning
200 Data returned.
204 Reserved: recognized location, nothing computed. Not emitted in the current blocks-only tier.
400 Bad params – unknown types, bad include, or missing lat/lon. The body’s detail lists valid values.
404 Point is outside coverage (no census block – over water or outside Canada).
422 Coordinates out of range or degenerate (e.g. a pole or the antimeridian).
429 Rate limited.
5xx Genuine internal failure (a tile source outage) – no longer masked as a 404.

Resolve up to 100 points in one call (keyed tier only; each point counts as one request against the daily bucket). Results are positionally aligned to points; a bad point becomes a per-slot { "error": ... } object, so one bad row doesn’t fail the batch.

Terminal window
curl -X POST "https://aportee.ca/v1/access?key=YOUR_KEY" \
-H "content-type: application/json" \
-d '{"points":[{"lat":43.25,"lon":-79.82},{"lat":43.65,"lon":-79.38}],"include":["minutes"]}'