Routing API feature specification

The FeatureCollection object properties contain details information about route legs and waypoints:

Name Description
distance Distance in meters for the whole route
time Time in seconds for the whole route
mode Requested transportation or travel mode
waypoints An array of RouteWaypoint
legs An array of RouteLeg. Each leg represents a route between 2 locations

RouteWaypoint

Contains actual coordinates used for route built. The coordinates may be different than the given one, while the actual coordinates snapped to existing streets, routes, ways.

Name Description
original_index Original index of waypoint in request
location An array of the waypoint coordinates: [lon, lat]

RouteLeg

Contains information about a route between 2 locations.

Name Description
distance Distance in meters for the route
time Time in seconds for the route
steps An array of LegStep. Steps of the route

LegStep

Contains information about step of RouteLeg:

Name Description
distance Distance in meters for the step
time Time in seconds for the step
from_index An index of the way start point in the corresponding feature coordinates array
to_index An index of the way end point in the corresponding feature coordinates array
instruction Contains text with the step instructions

Note! In difference to Geoapify API and Leaflet library, GeoJSON coordinates have longitude + latitude format.