Speeds and congestion on the main roads inside a box, as GeoJSON (live where 5+ drivers report it, else the profile)
const url = 'https://api.tareky.com/v1/traffic/flow?bbox=example&limit=5000';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/traffic/flow?bbox=example&limit=5000' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”West,south,east,north in degrees, at most 0.25 degrees on a side
Most segments returned
Header Parameters
Section titled “Header Parameters”Legacy key id (until its sunset)
Responses
Section titled “Responses”object
One LineString per directed segment, drawn from its start to its end
object
object
object
Typical speed on the segment in its direction of travel, km/h
The speed it is compared with: its free-flow profile, else its class
Free, slow, heavy or jammed against the reference speed; unknown without one
OpenStreetMap highway class
Live speeds from 5+ drivers, else the historical profile
When the live speeds were computed; null when only the profile answered
More segments matched than limit
Credit the data as shown: it is derived from OpenStreetMap (ODbL)
Example
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "LineString" }, "properties": { "congestion": "unknown", "class": "motorway", "source": "live" } } ]}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"}