curl --request POST \
--url https://api.footstep.ai/v1/routing/route \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"locations": [
{
"lat": 51.5322,
"lon": -0.124
},
{
"lat": 51.5055,
"lon": -0.0754
}
]
}
'{
"route": {
"waypoints": [
{
"lat": 123,
"lon": 123,
"original_index": 123
}
],
"legs": [
{
"distance_m": 123,
"duration_s": 123,
"shape": "<string>",
"steps": [
{
"type": "none",
"instruction": "<string>",
"street_names": [
"<string>"
],
"distance_m": 123,
"duration_s": 123,
"begin_shape_index": 123,
"end_shape_index": 123,
"travel_mode": "<string>",
"flags": {
"toll": true,
"ferry": true,
"rough": true,
"gate": true,
"highway": true
},
"verbal_alert": "<string>",
"verbal_instruction": "<string>",
"bearing_before": 123,
"bearing_after": 123,
"roundabout_exit_count": 123,
"exit_sign": {
"exit_number": "<string>",
"exit_branch": "<string>",
"exit_toward": "<string>",
"exit_name": "<string>"
},
"lanes": [
{
"indications": [
"<string>"
],
"valid": true,
"active": true
}
]
}
],
"terrain": {
"total_ascent_m": 123,
"total_descent_m": 123,
"max_elevation_m": 123,
"min_elevation_m": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_m": 123,
"elevation_m": 123
}
],
"difficulty": "flat"
},
"flags": {
"has_toll": true,
"has_highway": true,
"has_ferry": true
},
"bounds": {
"min_lat": 123,
"min_lon": 123,
"max_lat": 123,
"max_lon": 123
}
}
],
"distance_m": 123,
"duration_s": 123,
"flags": {
"has_toll": true,
"has_highway": true,
"has_ferry": true
},
"bounds": {
"min_lat": 123,
"min_lon": 123,
"max_lat": 123,
"max_lon": 123
},
"terrain": {
"total_ascent_m": 123,
"total_descent_m": 123,
"max_elevation_m": 123,
"min_elevation_m": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_m": 123,
"elevation_m": 123
}
],
"difficulty": "flat"
},
"units": "<string>"
},
"alternates": [
{
"waypoints": [
{
"lat": 123,
"lon": 123,
"original_index": 123
}
],
"legs": [
{
"distance_m": 123,
"duration_s": 123,
"shape": "<string>",
"steps": [
{
"type": "none",
"instruction": "<string>",
"street_names": [
"<string>"
],
"distance_m": 123,
"duration_s": 123,
"begin_shape_index": 123,
"end_shape_index": 123,
"travel_mode": "<string>",
"flags": {
"toll": true,
"ferry": true,
"rough": true,
"gate": true,
"highway": true
},
"verbal_alert": "<string>",
"verbal_instruction": "<string>",
"bearing_before": 123,
"bearing_after": 123,
"roundabout_exit_count": 123,
"exit_sign": {
"exit_number": "<string>",
"exit_branch": "<string>",
"exit_toward": "<string>",
"exit_name": "<string>"
},
"lanes": [
{
"indications": [
"<string>"
],
"valid": true,
"active": true
}
]
}
],
"terrain": {
"total_ascent_m": 123,
"total_descent_m": 123,
"max_elevation_m": 123,
"min_elevation_m": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_m": 123,
"elevation_m": 123
}
],
"difficulty": "flat"
},
"flags": {
"has_toll": true,
"has_highway": true,
"has_ferry": true
},
"bounds": {
"min_lat": 123,
"min_lon": 123,
"max_lat": 123,
"max_lon": 123
}
}
],
"distance_m": 123,
"duration_s": 123,
"flags": {
"has_toll": true,
"has_highway": true,
"has_ferry": true
},
"bounds": {
"min_lat": 123,
"min_lon": 123,
"max_lat": 123,
"max_lon": 123
},
"terrain": {
"total_ascent_m": 123,
"total_descent_m": 123,
"max_elevation_m": 123,
"min_elevation_m": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_m": 123,
"elevation_m": 123
}
],
"difficulty": "flat"
},
"units": "<string>"
}
]
}Calculate a route between two or more locations. Returns turn-by-turn directions with terrain analytics (ascent, descent, grade, difficulty) included by default. All distances are in meters, durations in seconds.
curl --request POST \
--url https://api.footstep.ai/v1/routing/route \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"locations": [
{
"lat": 51.5322,
"lon": -0.124
},
{
"lat": 51.5055,
"lon": -0.0754
}
]
}
'{
"route": {
"waypoints": [
{
"lat": 123,
"lon": 123,
"original_index": 123
}
],
"legs": [
{
"distance_m": 123,
"duration_s": 123,
"shape": "<string>",
"steps": [
{
"type": "none",
"instruction": "<string>",
"street_names": [
"<string>"
],
"distance_m": 123,
"duration_s": 123,
"begin_shape_index": 123,
"end_shape_index": 123,
"travel_mode": "<string>",
"flags": {
"toll": true,
"ferry": true,
"rough": true,
"gate": true,
"highway": true
},
"verbal_alert": "<string>",
"verbal_instruction": "<string>",
"bearing_before": 123,
"bearing_after": 123,
"roundabout_exit_count": 123,
"exit_sign": {
"exit_number": "<string>",
"exit_branch": "<string>",
"exit_toward": "<string>",
"exit_name": "<string>"
},
"lanes": [
{
"indications": [
"<string>"
],
"valid": true,
"active": true
}
]
}
],
"terrain": {
"total_ascent_m": 123,
"total_descent_m": 123,
"max_elevation_m": 123,
"min_elevation_m": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_m": 123,
"elevation_m": 123
}
],
"difficulty": "flat"
},
"flags": {
"has_toll": true,
"has_highway": true,
"has_ferry": true
},
"bounds": {
"min_lat": 123,
"min_lon": 123,
"max_lat": 123,
"max_lon": 123
}
}
],
"distance_m": 123,
"duration_s": 123,
"flags": {
"has_toll": true,
"has_highway": true,
"has_ferry": true
},
"bounds": {
"min_lat": 123,
"min_lon": 123,
"max_lat": 123,
"max_lon": 123
},
"terrain": {
"total_ascent_m": 123,
"total_descent_m": 123,
"max_elevation_m": 123,
"min_elevation_m": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_m": 123,
"elevation_m": 123
}
],
"difficulty": "flat"
},
"units": "<string>"
},
"alternates": [
{
"waypoints": [
{
"lat": 123,
"lon": 123,
"original_index": 123
}
],
"legs": [
{
"distance_m": 123,
"duration_s": 123,
"shape": "<string>",
"steps": [
{
"type": "none",
"instruction": "<string>",
"street_names": [
"<string>"
],
"distance_m": 123,
"duration_s": 123,
"begin_shape_index": 123,
"end_shape_index": 123,
"travel_mode": "<string>",
"flags": {
"toll": true,
"ferry": true,
"rough": true,
"gate": true,
"highway": true
},
"verbal_alert": "<string>",
"verbal_instruction": "<string>",
"bearing_before": 123,
"bearing_after": 123,
"roundabout_exit_count": 123,
"exit_sign": {
"exit_number": "<string>",
"exit_branch": "<string>",
"exit_toward": "<string>",
"exit_name": "<string>"
},
"lanes": [
{
"indications": [
"<string>"
],
"valid": true,
"active": true
}
]
}
],
"terrain": {
"total_ascent_m": 123,
"total_descent_m": 123,
"max_elevation_m": 123,
"min_elevation_m": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_m": 123,
"elevation_m": 123
}
],
"difficulty": "flat"
},
"flags": {
"has_toll": true,
"has_highway": true,
"has_ferry": true
},
"bounds": {
"min_lat": 123,
"min_lon": 123,
"max_lat": 123,
"max_lon": 123
}
}
],
"distance_m": 123,
"duration_s": 123,
"flags": {
"has_toll": true,
"has_highway": true,
"has_ferry": true
},
"bounds": {
"min_lat": 123,
"min_lon": 123,
"max_lat": 123,
"max_lon": 123
},
"terrain": {
"total_ascent_m": 123,
"total_descent_m": 123,
"max_elevation_m": 123,
"min_elevation_m": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_m": 123,
"elevation_m": 123
}
],
"difficulty": "flat"
},
"units": "<string>"
}
]
}Your Footstep API key
Waypoints (min 2, max 20)
2 - 20 elementsShow child attributes
Transport mode
auto, bicycle, pedestrian, bus, truck Mode-specific tuning. Include only the key matching your costing mode.
Show child attributes
kilometers, miles Language for instructions
Elevation sampling interval in meters
10 <= x <= 200Number of alternate routes
0 <= x <= 3Response format. footstep = optimised for app developers (encoded polyline, flat structure). geojson = standard GeoJSON FeatureCollection (decoded coordinates, immediately usable in Leaflet/Mapbox GL/deck.gl).
footstep, geojson