RTDS Open API - API Reference

Get Tile

Returns a map tile for the provided position, showing roadways of the provided type.

Arguments
Name Type Description
apikey String Your API Key received during registration
x Number The x-coordinate of the tile.
y Number The y-coordinate of the tile.
z Number The z-coordinate of the tile.
types Number? The types of roadway to display on the tile, as a bitwise-OR of highway (4), major roadway network (2) and arterial (1). For example, to show highway and arterial roadways, the value should be 5. If omitted, defaults to all roadway types.
Returns
Image
Example
https://rtdsapi.translink.ca/rtdsapi/v1/Tile?apikey=[APIKey]&x=647&y=1402&z=12&types=6

Get Live Data Timestamp

Returns the date and time at which the live data was last updated, in UTC.

Arguments
Name Type Description
apikey String Your API Key received during registration
Returns
LiveDataTimestampResult
LiveDataTimestampResult

Value returned when the user asks for the live data timestamp.

Name Type Description
timestampUtc String? The timestamp of live data, in UTC time. Date format is: yyyy'-'MM'-'dd'T'HH':'mm':'ss. Null if there is no current data.
Example
https://rtdsapi.translink.ca/rtdsapi/v1/LiveDataTimestampUtc?apikey=[APIKey]

Get All Live Data

Returns real-time data for all links.

Arguments
Name Type Description
apikey String Your API Key received during registration
Returns
LiveDataResult
LiveDataResult

Value returned when the user asks for all live data.

Name Type Description
timestampUtc String? The timestamp of the returned data, in UTC time. Date format is: yyyy'-'MM'-'dd'T'HH':'mm':'ss. Null if there is no current data.
data LinkInfo[] The information for all drivable directions on all links.
LinkInfo

Current information about a direction of travel along a link.

Name Type Description
linkId Number The ID of the link to which this information applies.
isFwd Boolean Whether this information applies in the forward (as opposed to reverse) direction of the link.
angle Number The angle of travel over the link, in degrees clockwise from North. A number between 0.0 and 360.0.
lengthMetres Number The length of the link, in metres.
speedKmph Number? The current speed of the link, in km/h. Null if there is no current data for the link.
travelTimeMinutes Number? The time required to travel the length of the link at current speed, in minutes. Null if there is no current data for the link.
quality Number? The quality of this information, as a value between 0 and 100. Null if there is no current data for the link.
Example
https://rtdsapi.translink.ca/rtdsapi/v1/AllLiveData?apikey=[APIKey]

Get Live Data At Point

Returns real-time data for links near the specified point, or null if no links are within range.

Arguments
Name Type Description
apikey String Your API Key received during registration
x Number The x-coordinate (longitude) of the point to look-up.
y Number The y-coordinate (latitude) of the point to look-up.
z Number? The zoom level of the map on which the click occurred. Has an impact on the tolerance used when matching links. Defaults to a generous tolerance if not provided.
types Number? The types of roadway being displayed, should match displayed tile types. See 'types' argument of 'Get Tile' action for more details.
Returns
LiveDataAtPointResult
LiveDataAtPointResult

Value returned when the user asks for live data at a point.

Name Type Description
x Number The x-coordinate of the point at which this information applies.
y Number The y-coordinate of the point at which this information applies.
timestampUtc String? The timestamp of the returned data, in UTC time. Date format is: yyyy'-'MM'-'dd'T'HH':'mm':'ss. Null if there is no current data.
data LinkInfo[] The information for all directions that apply at this point.
LinkInfo

Current information about a direction of travel along a link.

Name Type Description
linkId Number The ID of the link to which this information applies.
isFwd Boolean Whether this information applies in the forward (as opposed to reverse) direction of the link.
angle Number The angle of travel over the link, in degrees clockwise from North. A number between 0.0 and 360.0.
lengthMetres Number The length of the link, in metres.
speedKmph Number? The current speed of the link, in km/h. Null if there is no current data for the link.
travelTimeMinutes Number? The time required to travel the length of the link at current speed, in minutes. Null if there is no current data for the link.
quality Number? The quality of this information, as a value between 0 and 100. Null if there is no current data for the link.
Example
https://rtdsapi.translink.ca/rtdsapi/v1/LiveDataAtPoint?apikey=[APIKey]&x=-123.04550170898438&y=49.23194729854554&z=12&types=6

Get Colour Legend

Returns legend colour details.

Arguments
Name Type Description
apikey String Your API Key received during registration
Returns
ColourLegendItem[]
ColourLegendItem

Entry in the legend that describes the colours used by the map tiles.

Name Type Description
name String The speed category name for this category. One of 'Fast', 'Medium', 'Slow', or 'Unknown'.
colour String A web-friendly colour string (e.g. #FF0000) for this category.
Example
https://rtdsapi.translink.ca/rtdsapi/v1/ColourLegend?apikey=[APIKey]