Routing API
Generally availableDirections 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/routeRoute between an origin and destination.
Parameters
| Name | In | Req | Description |
|---|---|---|---|
from | query | yes | Origin as lon,lat. |
to | query | yes | Destination as lon,lat. |
mode | query | no | driving | walking | cycling (default driving). |
X-API-Key | header | yes | Your 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/matrixDistance/time matrix between points.
Parameters
| Name | In | Req | Description |
|---|---|---|---|
points | query | yes | Semicolon-separated lon,lat pairs. |
X-API-Key | header | yes | Your 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"