curl --request POST \
--url https://api.footstep.ai/v1/routing/compare \
--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
}
],
"travel_modes": [
"pedestrian",
"bicycle"
]
}
'
{
"routes": {},
"comparison": {
"fastest": "<string>",
"shortest": "<string>",
"easiest": "<string>",
"summary": "<string>"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Routing
Compare Routes
Calculate routes between the same locations using multiple travel modes and return a side-by-side comparison. Includes distance, duration, and terrain difficulty for each mode, plus a summary showing which is fastest, shortest, and easiest. Useful for deciding how to travel.
POST
/
v1
/
routing
/
compare
curl --request POST \
--url https://api.footstep.ai/v1/routing/compare \
--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
}
],
"travel_modes": [
"pedestrian",
"bicycle"
]
}
'
{
"routes": {},
"comparison": {
"fastest": "<string>",
"shortest": "<string>",
"easiest": "<string>",
"summary": "<string>"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Body
application/json