Skip to content

Map-matching and nearest road

POST /match snaps a sequence of GPS points to the roads that were driven.

Terminal window
curl https://api.argamin.ai/v1/match \
-H "Authorization: Bearer am_test_..." \
-H "Content-Type: application/json" \
-d '{
"points": [
{
"lat": 51.5072,
"lng": -0.1276,
"timestamp": "2026-11-26T14:00:00Z"
},
{
"lat": 51.5081,
"lng": -0.1259,
"timestamp": "2026-11-26T14:00:05Z"
},
{
"lat": 51.5093,
"lng": -0.1241,
"timestamp": "2026-11-26T14:00:10Z",
"radius": 15
}
],
"geometry": "polyline6"
}'
{
"matchings": [
{
"confidence": 0.94,
"distance": 310,
"duration": 24,
"geometry": "<encoded polyline6 string>"
}
],
"points": [
{
"index": 0,
"location": {
"lat": 51.50721,
"lng": -0.12762
},
"name": "road name",
"matching_index": 0
},
{
"index": 1,
"location": {
"lat": 51.50809,
"lng": -0.12589
},
"name": "road name",
"matching_index": 0
},
{
"index": 2,
"location": {
"lat": 51.50931,
"lng": -0.12412
},
"name": "road name",
"matching_index": 0
}
],
"request_id": "req_2b9d6f1e0c8a4e7f9a3b5c7d1e2f4a6b"
}
  • 2 to 100 points per request. Split longer traces and keep a few overlapping points between chunks.
  • Include timestamp (and radius, the GPS accuracy in meters) when you have them; they improve matching.
  • Billed on success only.

POST /nearest returns the closest road segment for each of up to 100 points. Use it to check that a stop is on a drivable road before you optimize.

Points outside the loaded regions return OUT_OF_COVERAGE and are not billed. See coverage.

Service Unit Free / month 0 - 100K100K - 500K500K - 1M1M - 5M5M+
GPS map-matching point 5,000 $3.30$2.60$2.00$1.00$0.25
Nearest road request 5,000 $3.30$2.60$2.00$1.00$0.25