curl --request POST \
--url https://api.footstep.ai/v1/routing/find-and-route \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"origin": {
"lat": 51.5322,
"lon": -0.124
},
"destination": "Tower Bridge, London",
"travel": "pedestrian"
}
'{
"destination": {
"coordinates": {
"lat": 0,
"lng": 0
},
"label": "<string>",
"name": "<string>",
"confidence": 0.5,
"place_type": "<string>",
"country": "<string>",
"country_code": "<string>",
"region": "<string>",
"county": "<string>",
"locality": "<string>",
"neighbourhood": "<string>"
},
"route": {
"waypoints": [
{
"lat": 123,
"lon": 123,
"original_index": 123
}
],
"legs": [
{
"distance_meters": 123,
"duration_seconds": 123,
"shape": "<string>",
"steps": [
{
"type": "none",
"instruction": "<string>",
"street_names": [
"<string>"
],
"distance_meters": 123,
"duration_seconds": 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_meters": 123,
"total_descent_meters": 123,
"max_elevation_meters": 123,
"min_elevation_meters": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_meters": 123,
"elevation_meters": 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_meters": 123,
"duration_seconds": 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_meters": 123,
"total_descent_meters": 123,
"max_elevation_meters": 123,
"min_elevation_meters": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_meters": 123,
"elevation_meters": 123
}
],
"difficulty": "flat"
},
"units": "<string>",
"narrative": "<string>"
},
"origin": {
"coordinates": {
"lat": 123,
"lng": 123
},
"resolved_from": "string",
"name": "<string>",
"label": "<string>",
"place_type": "<string>",
"country": "<string>",
"country_code": "<string>"
},
"alternatives": [
{
"coordinates": {
"lat": 0,
"lng": 0
},
"label": "<string>",
"name": "<string>",
"confidence": 0.5,
"place_type": "<string>",
"country": "<string>",
"country_code": "<string>",
"region": "<string>",
"county": "<string>",
"locality": "<string>",
"neighbourhood": "<string>"
}
],
"narrative": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Routing
Find and Route
Find a place by name or address, then calculate a route to it from your origin. Combines geocoding and routing in a single call. Returns the matched destination, the full route with terrain analytics, and alternative geocoding matches.
POST
/
v1
/
routing
/
find-and-route
curl --request POST \
--url https://api.footstep.ai/v1/routing/find-and-route \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"origin": {
"lat": 51.5322,
"lon": -0.124
},
"destination": "Tower Bridge, London",
"travel": "pedestrian"
}
'{
"destination": {
"coordinates": {
"lat": 0,
"lng": 0
},
"label": "<string>",
"name": "<string>",
"confidence": 0.5,
"place_type": "<string>",
"country": "<string>",
"country_code": "<string>",
"region": "<string>",
"county": "<string>",
"locality": "<string>",
"neighbourhood": "<string>"
},
"route": {
"waypoints": [
{
"lat": 123,
"lon": 123,
"original_index": 123
}
],
"legs": [
{
"distance_meters": 123,
"duration_seconds": 123,
"shape": "<string>",
"steps": [
{
"type": "none",
"instruction": "<string>",
"street_names": [
"<string>"
],
"distance_meters": 123,
"duration_seconds": 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_meters": 123,
"total_descent_meters": 123,
"max_elevation_meters": 123,
"min_elevation_meters": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_meters": 123,
"elevation_meters": 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_meters": 123,
"duration_seconds": 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_meters": 123,
"total_descent_meters": 123,
"max_elevation_meters": 123,
"min_elevation_meters": 123,
"avg_grade_percent": 123,
"max_grade_percent": 123,
"elevation_profile": [
{
"distance_meters": 123,
"elevation_meters": 123
}
],
"difficulty": "flat"
},
"units": "<string>",
"narrative": "<string>"
},
"origin": {
"coordinates": {
"lat": 123,
"lng": 123
},
"resolved_from": "string",
"name": "<string>",
"label": "<string>",
"place_type": "<string>",
"country": "<string>",
"country_code": "<string>"
},
"alternatives": [
{
"coordinates": {
"lat": 0,
"lng": 0
},
"label": "<string>",
"name": "<string>",
"confidence": 0.5,
"place_type": "<string>",
"country": "<string>",
"country_code": "<string>",
"region": "<string>",
"county": "<string>",
"locality": "<string>",
"neighbourhood": "<string>"
}
],
"narrative": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Body
application/json
Response
Geocoded destination with route