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.
POST https://api.geoapify.com/v1/mapmatching HEADERS 'Content-Type: application/json'
|apiKey||Geoapify API key|
Request body parameters
|waypoints||Array of waypoints|
|waypoints.location||Location represented as an array of coordinates:
|waypoints.timestamp||Optional field. ISO formatted timestamp. Helps to calculate effective speed and filter incorrect waypoints.|
|waypoints.bearing||Optional field. Number
|mode||Transportation or travel mode. Possible values: "drive", "walk", "bicycle"|
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.