TrafficView API Reference

Version: 3.11.1
Last updated: 2018-12-13

Overview

This is the documentation for the TrafficView API v3.11.1. 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.

Authentication

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:

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.

Sending filter requests

GET

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:

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.

How filters are applied

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.

Output formats

The API can return data in multiple formats. You can specify which using output parameters.

ATIS/TMDD Schema

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.

CATT Lab Schema (rf-schema-xml)

The CATT Lab developed an unofficial schema for traffic events, DMS, & detector data base 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.

CATT Lab JSON Schema (rf-json)

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.

Available agencies

These are all of the available agencies (system IDs) by data type.

Use the Agency API to learn more.

Show all agencies

dms
  • austintx
  • caltrans
  • ddot_captop
  • deldot
  • dfw511
  • gdot
  • mdot_chart
  • midot
  • mndot
  • pgcotrip
  • scdot
  • txdot
  • vdot
  • wisdot
event
  • austintx
  • caltrans
  • ddot_captop
  • deldot
  • dfw511
  • fdot
  • gdot
  • hococad
  • iowadot
  • massdot
  • mdot_chart
  • midot
  • mndot
  • modot
  • mstraffic
  • ncdot
  • nhdot
  • njdot
  • ny511
  • ohdot
  • padot
  • paturnpike
  • pgcocad
  • pgcotrip
  • ridot
  • ritis_input
  • scdot
  • txdot
  • vdot
  • wisdot
  • wisdot_cad
  • wmata
  • wsdot
weather
  • nws
  • wxde

Filters

Show all filters

General filters

System (Agency) Filter Limit results to one or more systems

Parameters:

  • system (STRING:optional:repeatable)
    One of the agencies providing data for RITIS
  • system-is (IS_TYPE:optional)
    Deprecated. Do NOT use.
    • equal
    • not equal
  • system-all (BOOLEAN:optional)
    Use all available systems

id-filters

ID Filter Return the item with the specified ID

Compatible data types: event, dms, weather

Parameters:

  • id (STRING)
    Uniquely identifies an event, detector, etc.

location-filters

Box Filter Limit results to within (or not within) a box

Compatible data types: event, dms

Parameters:

  • width (NON_NEGATIVE_DECIMAL)
    The width (in meters) of the box
  • height (NON_NEGATIVE_DECIMAL)
    The height (in meters) of the box
  • box-lat (LATITUDE)
    The latitude of the lower left corner of the box
  • box-lon (LONGITUDE)
    The longitude of the lower left corner of the box
  • box-within (BOOLEAN:optional)
    Whether to include or exclude results within the box
City Filter Filter results by city

Compatible data types: event

Parameters:

  • city (STRING)
    The city's full name or abbreviation
  • city-is (IS_TYPE:optional)
    Equal to or not equal to the specified city
    • equal (default)
    • not equal
Country Filter Filter results by country

Compatible data types: event

Parameters:

  • country (STRING)
    The country's full name or abbreviation
  • country-is (IS_TYPE:optional)
    Equal to or not equal to the specified country
    • equal (default)
    • not equal
County Filter Filter results by county

Compatible data types: event

Parameters:

  • county (STRING)
    • The county's name, or
    • The county's name and the state's full name or abbreviation, separated by a pipe character (|)
  • county-is (IS_TYPE:optional)
    Equal to or not equal to the specified county
    • equal (default)
    • not equal
Radius Filter Limit results to within (or not within) a distance from a center point

Compatible data types: event, dms

Parameters:

  • radius (NON_NEGATIVE_DECIMAL)
    The radius (in meters) from the center point
  • radius-lat (LATITUDE)
    The latitude of the center point
  • radius-lon (LONGITUDE)
    The longitude of the center point
  • radius-within (BOOLEAN:optional)
    Whether to include or exclude results within the radius
State Filter Filter results by state

Compatible data types: event

Parameters:

  • state (STRING)
    The state's full name or abbreviation
  • state-is (IS_TYPE:optional)
    Equal to or not equal to the specified state
    • equal (default)
    • not equal
Unmapped Filter Indicate whether to return results with no location data (latitude/longitude)

Compatible data types: event, dms, weather

Parameters:

  • unmapped (INCLUDE_EXCLUDE)
    Include, exclude, or return only unmapped data
    • include
    • exclude
    • only

location-filters/road-filters

Road Name Filter Filter results by roads

Compatible data types: event

Parameters:

  • road (STRING)
    The road name
  • road-is (IS_TYPE:optional)
    Equal to or not equal to the specified road
    • equal (default)
    • not equal

output-parameters

Output Format Specify the output format

Parameters:

  • format (OUTPUT_FORMAT:optional)
    The format
    • atis-tmdd-xml (default)
    • rf-schema-xml
    • rf-json
    • atis-tmdd-v3-xml
Response Limit Limit the number of results

Parameters:

  • response-limit (NON_NEGATIVE_INTEGER:optional)
    The maximum number of results to return
  • response-offset (NON_NEGATIVE_INTEGER:optional)
    Skip the first specified number of results

request-headers

API Key Specify the API key

Parameters:

  • api-key (STRING:optional)
    The API key
Data Type Specify the data type

Parameters:

  • type (FILTER_TYPE:optional)
    The type
    • station
    • observation
    • alerts
    • event
    • incident
    • incident_event
    • status
    • inventory
  • filter-name (FILTER_NAME:optional)
    The filter's name
    • weather
    • event
    • dms

Endpoints

Show all methods

GeoRSS feeds

GET /rss/event
Query for events, sorted most recent first by default

Request:

Parameters:

  • Filters are passed as GET parameters in the URL.

Response: application/xml

{}

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:

  • type (string)

Response:

[]
GET /agencies/type/{type}/{subtype}
List all agencies providing a data type and subtype

Request:

Path parameters:

  • type (string)
  • subtype (string)

Response:

[]

Query the TrafficView API

GET /dms
Query for DMS data

Request:

Parameters:

  • Filters are passed as GET parameters in the URL.

Response: application/xml, application/json

{}
GET /event
Query for events

Request:

Parameters:

  • Filters are passed as GET parameters in the URL.

Response: application/xml, application/json

{}
GET /weather
Query for weather data

Request:

Parameters:

  • Filters are passed as GET parameters in the URL.

Response: application/xml, application/json

{}