Map Matching API Specification

The API is used to match points to existing roads and build a route. The API is implemented via an HTTP POST request.

API URL

POST https://api.geoapify.com/v1/mapmatching
HEADERS 'Content-Type: application/json'

Request parameters

Name Description
apiKey Geoapify API key

Request body parameters

Name Description
waypoints Array of waypoints
waypoints.location Location represented as an array of coordinates: [longitude, latitude]
waypoints.timestamp Optional field. ISO formatted timestamp. Helps to calculate effective speed and filter incorrect waypoints.
waypoints.bearing Optional field. Number [0, 360]. Helps to determine speed more accurately.
mode Transportation or travel mode. Possible values: "drive", "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 details information about route legs, steps and matched points. Check the Feature specification for detailed informaion about properties.