Public API: turn-by-turn route between coordinates (metered)
const url = 'https://api.tareky.com/v1/directions/driving/44.3661%2C33.3152%3B44.4342%2C33.3062?steps=true&geometries=polyline&overview=simplified&continue_straight=default&roundtrip=true&source=any&destination=any';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/directions/driving/44.3661%2C33.3152%3B44.4342%2C33.3062?steps=true&geometries=polyline&overview=simplified&continue_straight=default&roundtrip=true&source=any&destination=any' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
44.3661,33.3152;44.4342,33.3062Lng,lat;lng,lat[;…]
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
Snap radius in metres per coordinate, ; separated (default 5000)
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", "routes": [ { "distance": 1, "duration": 1, "geometry": "example", "weight": 1, "weight_name": "example", "legs": [ { "distance": 1, "duration": 1, "summary": "example", "steps": [ { "additionalProperty": "example" } ] } ] } ], "waypoints": [ { "name": "example", "location": [ "example" ], "distance": 1, "hint": "example" } ]}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"}