Skip to main content
POST
/
v1
/
routing
/
locate
curl --request POST \
  --url https://api.footstep.ai/v1/routing/locate \
  --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
    }
  ]
}
'
{
  "locations": [
    {
      "input": {
        "lat": 0,
        "lon": 0
      },
      "distance_m": 123,
      "on_road": true,
      "snapped": {
        "lat": 0,
        "lon": 0
      },
      "edges": [
        {
          "names": [
            "<string>"
          ],
          "road_class": "<string>",
          "speed_kph": 123,
          "surface": "<string>",
          "elevation_m": 123
        }
      ]
    }
  ]
}

Authorizations

x-api-key
string
header
required

Your Footstep API key

Body

application/json
locations
object[]
required
Required array length: 1 - 100 elements
costing
enum<string>
default:auto

Filter edges by mode

Available options:
auto,
bicycle,
pedestrian,
bus,
truck
verbose
boolean
default:false

Include edge metadata

format
enum<string>
default:footstep

Response format. footstep = optimised for app developers (encoded polyline, flat structure). geojson = standard GeoJSON FeatureCollection (decoded coordinates, immediately usable in Leaflet/Mapbox GL/deck.gl).

Available options:
footstep,
geojson

Response

Locate results

locations
object[]
required