Version: 5.1.18
Last updated: 2024-09-30
This is the documentation for the TrafficView API v5.1.18. The API allows users to query various types of data from the RITIS databases, e.g. traffic incidents, dynamic message signs, weather.
This document is a work in progress and subject to change at any time (see change log).
If you have additional questions, please email us at support@trafficview.org.
TrafficView is currently restricted to authorized users. You can request an API key.
To authenticate GET requests, add a parameter api-key
with your API key as the value:
https://api.trafficview.org/event/?api-key=your_api_key
If you need an additional API key for your system, please email us at support@trafficview.org.
Filter parameters are passed as GET parameters in the URL. For example, you can use the road filter to get all active events on I-495 as reported by the Maryland DOT:
https://api.trafficview.org/event/?api-key=your_api_key&system=mdot_chart&road=I-495
The /event
endpoint returns event data. For other data types, see
Endpoints.
For a complete list of GET parameters, see Filters.
Multiple different filters are joined with AND, such as road is 'I-95' AND state is 'MD'.
Multiple filters of the same type are joined with OR, such as road is 'I-95' OR road is 'I-495',
except for geospatial filters (box filter, radius filter).
Multiple geospatial filters
of the same type are joined with AND: two box filters that do not overlap will return no results.
The API can return data in multiple formats. You can specify which using output parameters.
The ATIS/TMDD schema is an official standardized schema for traffic events, DMS & detector data. The CATT Lab includes a few extensions for information that is missing but deemed critical.
You can find the complete ATIS & TMDD schema here.
Lanes are arranged like this:
S S S S N N N N
0 1 2 3 4 5 6 7
RF will return the lanes in the order:
3 2 1 0 4 5 6 7
Thus the lanes are ordered from left to right in the order of travel per direction, regardless of the number of directions.
Lanes from the same direction are always grouped together, and directions are ordered, from left to right: south before north, west before east, and inner loop before outer loop.
The CATT Lab developed an unofficial schema for traffic events, DMS, & detector data based on our experiences working with the data. In general, this schema can provide more data. It can also express how an event changed over time for better analysis without complicated querying.
This schema is under development and not finalized.
You can find the complete CATT Lab schema here.
The structure of this schema matches the regular CATT Lab Schema (rf-schema-xml) almost exactly. Some elements have been restructured to follow JSON standards. For example, "event" tags in rf-schema-xml are enclosed in another tag called "events". In the JSON output, the "event" tags are removed and the "events" tag is turned into a JSON array.
This schema is under development and not finalized.
These are all of the available agencies (system IDs) by data type.
Use the Agency API to learn more.
detector | |
| |
dms | |
| |
event | |
| |
weather | |
| |
General filters | |
System (Agency) Filter | Limit results to one or more systems |
Parameters:
|
|
id-filters | |
ID Filter | Return the item with the specified ID |
Compatible data types: detector, dms, event, weather Parameters:
|
|
location-filters | |
Box Filter | Limit results to within (or not within) a box |
Compatible data types: detector, dms, event, weather Parameters:
|
|
City Filter | Filter results by city |
Compatible data types: detector, dms, event Parameters:
|
|
Country Filter | Filter results by country |
Compatible data types: detector, dms, event, weather Parameters:
|
|
County Filter | Filter results by county |
Compatible data types: detector, dms, event, weather Parameters:
|
|
Lat Lon Box Filter | Limit results to within (or not within) a box given southwest and northeast latlon corner points |
Compatible data types: detector, dms, event, weather Parameters:
|
|
Radius Filter | Limit results to within (or not within) a distance from a center point |
Compatible data types: detector, dms, event, weather Parameters:
|
|
State Filter | Filter results by state |
Compatible data types: detector, dms, event, weather Parameters:
|
|
Unmapped Filter | Indicate whether to return results with no location data (latitude/longitude) |
Compatible data types: detector, dms, event, weather Parameters:
|
|
location-filters/road-filters | |
Road Class Filter | Limit to results that are part of the FRC (Functional Road Class) |
Compatible data types: event Parameters:
|
|
Road Name Filter | Filter results by roads |
Compatible data types: event, detector, dms Parameters:
|
|
output-parameters | |
Exclude Geometry | Indicates whether geometry data should be excluded in the response |
Compatible data types: Parameters:
|
|
Output Format | Specify the output format |
Parameters:
|
|
Response Limit | Limit the number of results |
Parameters:
|
|
request-headers | |
API Key | Specify the API key |
Parameters:
|
|
Data Type | Specify the data type |
Parameters:
|
|
GeoRSS feeds | |
GET /rss/event
|
Query for events, sorted most recent first by default |
Request:
Parameters:
|
Response:
|
List agencies providing data for RITIS | |
GET /agencies
|
List all unique agencies |
Response:
|
|
GET /agencies/type
|
List all agencies grouped by types of data provided |
Response:
|
|
GET /agencies/type/{type}
|
List all agencies providing a data type |
Request:
Path parameters:
|
Response:
|
GET /agencies/type/{type}/{subtype}
|
List all agencies providing a data type and subtype |
Request:
Path parameters:
|
Response:
|
Query the TrafficView API | |
GET /detector
|
Query for detector data |
Request:
Parameters:
|
Response:
|
GET /dms
|
Query for DMS data |
Request:
Parameters:
|
Response:
|
GET /event
|
Query for events |
Request:
Parameters:
|
Response:
|
GET /weather
|
Query for weather data |
Request:
Parameters:
|
Response:
|