GET roads.json


Updated 13th December 2012

Returns a list of UK a-roads and motorways. Contains directions and junctions.

Example requests

http://api.twitraffic.co.uk/1.1/roads.json?api_key=demokey&q=roads&road_type=motorways

http://api.twitraffic.co.uk/1.1/roads.json?api_key=demokey&q=directions&road=M25

http://api.twitraffic.co.uk/1.1/roads.json?api_key=demokey&q=junctions&road=M1


Parameters
api_key
(Required)
An activate API key verifies the user of the service.
q
(Required)
Specifies the data set you wish to query.

Roads: Returns list of roads.
Directions: Returns directions for a specific road.
Junctions: Provides junctions for a specific motorway.

Options: roads, directions, junctions
direction
(Query dependent)
Returns traffic confined to a specific road direction.

Note: Requires the road parameter
Example values: northbound, soundbound, anti-clockwise
road
(Query dependent)
Specifies the road to return data for on the directions and junctions query.

Example values: M1, M5, A429
road_type
(Optional)
Restricts the data set to a specific type of road.

Note: Only applicable when the q parameter value is “roads”.

Options: all, aroads, motorways
Default: all
min_score
(Optional)
As tweets are score weighted, this allows you to filter to a specific level of accuracy.

Examples values: 5, 8, 15
Default: 1