Skip to main content
POST
Calculate time/distance matrix

Authorizations

x-api-key
string
header
required

Your Footstep API key

Body

application/json
sources
object[]
required
Required array length: 1 - 50 elements
targets
object[]
required
Required array length: 1 - 50 elements
travel
enum<string>
default:auto
Available options:
auto,
bicycle,
pedestrian,
bus,
truck
travel_options
object

Fine-tuning options. Include only the key matching your travel type.

units
enum<string>
default:kilometers
Available options:
kilometers,
miles
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

Time/distance matrix

Time/distance matrix with explicit units

matrix
((object | null)[])[]
required

2D matrix indexed as matrix[source_index][target_index]. null = unreachable pair.