Routing API

The API is used to build a route between a pair of locations or multiple pair of locations. The API is implemented via HTTP Get request.


Request parameters

Name Description
apiKey Geoapify API key
waypoints Coordinates of locations separated with vertical bar symbol. Each coordinate is a pair of latitude and longitude, separated with a comma - lat,lon
mode Transportation or travel mode. Possible values: "drive", "truck", "transit", "approximated_transit", "walk", "bicycle"

Response Object

The response contains a GeoJSON FeatureCollection object with a feature of "MultiLineString" type, which represents the route. The FeatureCollection object properties contain the following information:

Name Description
mode Requested transportation or travel mode
waypoints Array of waypoints requested. Each waypoint is represented as array of coordinates [lon, lat].

Check the Feature specification for detailed information about Feature object properties.