Skip to content

Routing API

Generally available

Directions and distance/time matrices.

Compute a route between two points (geometry, distance, duration, steps) or a matrix of distances/times between many points. Coverage is strongest for Australia and expanding by continent.

GET/maps/route

Route between an origin and destination.

Parameters

NameInReqDescription
fromqueryyesOrigin as lon,lat.
toqueryyesDestination as lon,lat.
modequerynodriving | walking | cycling (default driving).
X-API-KeyheaderyesYour API key.

Responses

  • 200 — Route with geometry, distance (m), duration (s), steps.
  • 422 — No route found.
curl "https://airfreemap.com/api/v1/maps/route?from=144.96,-37.81&to=144.98,-37.80&mode=driving" -H "X-API-Key: $AIRFREE_MAPS_KEY"
GET/maps/matrix

Distance/time matrix between points.

Parameters

NameInReqDescription
pointsqueryyesSemicolon-separated lon,lat pairs.
X-API-KeyheaderyesYour API key.

Responses

  • 200 — Durations/distances matrices.
curl "https://airfreemap.com/api/v1/maps/matrix?points=144.96,-37.81;144.98,-37.80;145.00,-37.82" -H "X-API-Key: $AIRFREE_MAPS_KEY"