Skip to content
TarekyDocs
Console

The typical speed on the main roads inside a box for a 15-minute slot of the week, as GeoJSON

GET
/v1/traffic/historical
curl --request GET \
--url 'https://api.tareky.com/v1/traffic/historical?bbox=example&limit=5000' \
--header 'Authorization: Bearer <token>'
slot
integer
<= 671

15-minute slot of the Baghdad week: 0 is Monday 00:00-00:15, 671 is Sunday 23:45. Default: the current slot

bbox
required
string

West,south,east,north in degrees, at most 0.25 degrees on a side

limit
integer
default: 5000 >= 1 <= 20000

Most segments returned

x-access-key-id
string

Legacy key id (until its sunset)

Media typeapplication/json
object
type
required
string
Allowed values: FeatureCollection
features
required

One LineString per directed segment, drawn from its start to its end

Array<object>
object
type
required
string
Allowed values: Feature
geometry
required
object
type
required
string
Allowed values: LineString
coordinates
required
Array<array>
properties
required
object
speedKmh
required

Typical speed on the segment in its direction of travel, km/h

integer
>= -9007199254740991 <= 9007199254740991
referenceKmh
required

The speed it is compared with: its free-flow profile, else its class

integer
nullable >= -9007199254740991 <= 9007199254740991
congestion
required

Free, slow, heavy or jammed against the reference speed; unknown without one

string
Allowed values: unknown free slow heavy jammed
class
required

OpenStreetMap highway class

string
Allowed values: motorway motorway_link trunk trunk_link primary primary_link secondary secondary_link tertiary tertiary_link
source
required

Live speeds from 5+ drivers, else the historical profile

string
Allowed values: live historical
oneway
required
boolean
updatedAt
required

When the live speeds were computed; null when only the profile answered

string format: date-time
nullable /^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
truncated
required

More segments matched than limit

boolean
attribution
required

Credit the data as shown: it is derived from OpenStreetMap (ODbL)

string
slot
required

The slot of the Baghdad week these speeds are for

integer
>= -9007199254740991 <= 9007199254740991
profileVersion
required

The nightly profile they come from; null when none is built yet

string
nullable
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

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code, e.g. quota_exceeded, no_route

string
message
required
string
status
required
integer
>= -9007199254740991 <= 9007199254740991
details

For invalid_request: the validation issues

docsUrl
required
string
requestId
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"status": 1,
"details": "example",
"docsUrl": "example"
},
"requestId": "example"
}

Any other error, in the /v1 error envelope

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code, e.g. quota_exceeded, no_route

string
message
required
string
status
required
integer
>= -9007199254740991 <= 9007199254740991
details

For invalid_request: the validation issues

docsUrl
required
string
requestId
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"status": 1,
"details": "example",
"docsUrl": "example"
},
"requestId": "example"
}