Skip to main content

Overview

Map Matching API snaps a GPS trace to the real roads: send a timestamped coordinate sequence, get back the matched route (geometry, distance, duration) plus where each point landed on the network. Useful for cleaning delivery traces, analyzing actual driven paths, and mileage accounting. Powered by the OSRM Match service.

Endpoint

Request Parameters

Service options

General options

These options apply to all routing services. Options that take one value per coordinate use the array-like encoding {option}={element};{element}[;...] — the number of elements must match the number of coordinates (except generate_hints and exclude). Pass an empty element to use the default for that coordinate, e.g. bearings=;90,20;.
Large timestamp gaps (>60s) or improbable jumps split the trace automatically into multiple sub-traces — that’s a feature, not a bug: one request can return several matchings.

Quickstart

Response

response-example.json

Response fields

Best practices

  • Use device-reported accuracy for radiuses: Location.getAccuracy() (Android) / CLLocation.horizontalAccuracy (iOS)
  • High-frequency sampling (1–5s) gives the best traces; slow-speed drift points get dropped automatically
  • All input coordinates must be in the same country (see Coverage)