Public API: snap a GPS trace to the road network (metered)
const url = 'https://api.tareky.com/v1/match/driving/example?steps=true&geometries=polyline&overview=simplified&continue_straight=default&roundtrip=true&source=any&destination=any&gaps=split&tidy=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.tareky.com/v1/match/driving/example?steps=true&geometries=polyline&overview=simplified&continue_straight=default&roundtrip=true&source=any&destination=any&gaps=split&tidy=true' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”True, false, or a number of alternatives (directions)
Turn-by-turn steps (directions, match, optimize)
True, or a comma list of duration,distance,speed,nodes
{bearing},{range};… one per coordinate
Curb or unrestricted, ; separated
E.g. motorway, toll, ferry
Matrix: indexes of the origin coordinates, ; separated
Matrix: indexes of the destination coordinates
Optimize
Optimize
Optimize
Unix seconds per coordinate, ; separated
Header Parameters
Section titled “Header Parameters”Legacy key id (until its sunset)
Responses
Section titled “Responses”object
“Ok” on success
object
Encoded polyline or GeoJSON, per geometries; omitted with overview=false
object
Empty unless steps=true
object
object
Name of the street the coordinate snapped to
[lng, lat]
Metres from the input coordinate to the snapped one
Omitted with generate_hints=false
Examplegenerated
{ "code": "example", "matchings": [ { "distance": 1, "duration": 1, "geometry": "example", "weight": 1, "weight_name": "example", "legs": [ { "distance": 1, "duration": 1, "summary": "example", "steps": [ { "additionalProperty": "example" } ] } ], "confidence": 1 } ], "tracepoints": [ { "name": "example", "location": [ "example" ], "distance": 1, "hint": "example", "matchings_index": 1, "waypoint_index": 1, "alternatives_count": 1 } ]}Rate limit or monthly quota exceeded; see Retry-After
object
object
Stable machine-readable code, e.g. quota_exceeded, no_route
For invalid_request: the validation issues
Examplegenerated
{ "error": { "code": "example", "message": "example", "status": 1, "details": "example", "docsUrl": "example" }, "requestId": "example"}default
Section titled “default”Any other error, in the /v1 error envelope
object
object
Stable machine-readable code, e.g. quota_exceeded, no_route
For invalid_request: the validation issues
Examplegenerated
{ "error": { "code": "example", "message": "example", "status": 1, "details": "example", "docsUrl": "example" }, "requestId": "example"}