Footstep Routing API
The Routing API provides terrain-intelligent routing, elevation queries, and spatial analysis. Every routing response includes terrain analytics by default: ascent, descent, grade profiles, and difficulty classification, without any extra configuration.Design philosophy
Every endpoint works with just coordinates. Send locations, get a route with full terrain intelligence:costing to change transport mode, costing_options for mode-specific preferences (hill avoidance, walking speed, vehicle dimensions), elevation_interval to control elevation sampling density, and language for localised navigation instructions.
Response conventions
Every response uses self-documenting field names with explicit units:distance_m— distance in metersduration_s— duration in secondsgrade_percent— grade as a percentagespeed_kph— speed in km/helevation_m— elevation in meters
units request parameter. The units field in the response echoes your request value for reference only.
Endpoints
All endpoints arePOST requests under /v1/routing/:
| Endpoint | Description |
|---|---|
POST /route | Route between locations with terrain analytics and turn-by-turn directions |
POST /optimize | Travelling salesman: optimise visit order for multiple stops |
POST /snap | Map-match GPS traces to the road network |
POST /elevation | Elevation queries with computed summary statistics |
POST /isochrone | Time or distance-based reachability polygons |
POST /matrix | Time/distance matrices for logistics and dispatching |
POST /locate | Snap coordinates to the nearest road with metadata |
Authentication
All endpoints require an API key passed via thex-api-key header. See the authentication guide for details on key format, states, and security practices.
Transport modes
All routing endpoints accept acosting parameter to select the transport mode:
| Mode | Description |
|---|---|
auto | Car routing (default). Respects one-way streets, turn restrictions, and road hierarchy |
pedestrian | Walking and hiking. Factors in terrain grade, avoids motorways, supports SAC hiking difficulty scale |
bicycle | Cycling. Considers surface type, hill gradients. Supports road, hybrid, cross, and mountain bike types |
bus | Bus routing. Similar to auto with bus-specific road access |
truck | Truck routing. Respects vehicle height, width, weight, and axle load restrictions |
costing_options for fine-tuning. For example, pedestrian supports use_hills (0 = avoid hills, 1 = prefer hills), walking_speed (0.5–25 km/h), and max_hiking_difficulty (0–6, SAC hiking scale). See the route endpoint for the full schema.
Multi-format support
Every endpoint accepts aformat parameter:
| Format | Content-Type | Best for |
|---|---|---|
footstep (default) | application/json | App developers. Compact encoded polyline geometry, flat structure, optimised DX |
geojson | application/geo+json | GIS tools. Standard GeoJSON FeatureCollection with decoded coordinates |
Terrain analytics
Routing responses include aterrain object at both the route and per-leg level:
elevation_profile is an array of distance/elevation points sampled along the route. Control the sampling interval with the elevation_interval parameter (10–200 meters, default 30).
The difficulty classification is based on average and maximum grade:
| Difficulty | Average grade | Maximum grade |
|---|---|---|
flat | < 2% | < 5% |
rolling | < 4% | < 8% |
hilly | < 6% | < 15% |
mountainous | >= 6% | >= 15% |
Route flags
Every route and leg includes aflags object indicating infrastructure used: