Real-Time Data Feeds Documentation V 0.0.1

Purpose of this Document

This document provides necessary information for the development of applications for RTD.

This document is for information purposes only and may change

RTD Open Data

RTD publishes the following data:

  • Schedule data, including full schedule and route configuration as a:
    • GTFS dataset for all RTD services
  • Real-time data for RTD bus services, including information about arrival/departure predictions and vehicle locations as GTFS-realtime feeds:
    • Trip Updates
    • Vehicle Positions

The release of real-time data feeds for RTD bus services is the first phase of an initiative which will make similar information available for RTD light rail and commuter rail services in the future.

Concepts and IDs are consistent across data feeds wherever possible.

Use of RTD data

Access to the RTD data feeds is governed by the language in the RTD License Agreement (http://www.rtd-denver.com/Developer-licenseagreement.shtml) in addition to the following conditions:

  • RTD does not guarantee technical support of any kind to users.
  • No user may execute polling commands more often than every 30 seconds. A user that polls more often than that or otherwise overtaxes RTD’s system may be suspended or terminated from the data feed.

GTFS Schedule Dataset

RTD schedule data is available in General Transit Feed Specification (GTFS) for use in developing applications and other mobile tools for RTD riders. If you plan on using our GTFS data, please follow these rules:

  1. Keep your data up-to-date. Major changes to RTD schedules typically happen three times a year in January, May and August. Visit service changes to get more information.
  2. Do not use the RTD logo, RTD maps or any other RTD content found on the RTD website without permission in advance from RTD. To request permission, please email developer@rtd-denver.com.

Download GTFS schedule data

You must read and agree to the License Agreement before you download the data.
Learn more about General Transit Feed Specification.

More information about GTFS can be found at https://developers.google.com/transit/gtfs/.

GTFS-realtime Feeds

RTD provides real-time data feeds for arrival predictions and vehicle locations in GTFS-realtime format. Real-time data will currently only be available for bus services.

Accessing the Feed

Access to RTD's GTFS-RT feeds requires authenticating with a username and password specific to your application. To obtain a username and password send an email to developer@rtd-denver.com. Access requests will be handled as soon as possible.

Request access to GTFS-RT

GTFS-RT Access Request

Fill out this form to request access to RTD's GTFS-realtime data feeds.

GTFS-realtime feeds are provided in separate protocol buffer files:

  • Trip Updates – this feed includes trip progress and arrival/departure predictions.
  • Vehicle Positions – this feed includes vehicle positions.

Relationship with Other RTD Data Feeds

GTFS-realtime feeds have to be linked to GTFS schedule data for most applications.

Format Documentation

The GTFS-realtime specification is detailed at https://developers.google.com/transit/gtfs-realtime/.

The Protocol Buffer format is detailed at http://code.google.com/p/protobuf/.

The GTFS-realtime feeds have the following format:

header
  • gtfs_realtime_version. Set to “1.0”
  • incrementality: FULL_DATASET
  • timestamp
entity
  • id
  • trip_update. Included if trip_update entity is provided. See trip_update below.
  • vehicle. Included if vehicle entity is provided. See vehicle below.
trip_update
  • trip
    • trip_id
    • route_id
    • direction_id
    • schedule_relationship. SCHEDULED if trip is running as scheduled, ADDED if trip is an added trip, or CANCELED if trip has been canceled.
  • vehicle
    • id
    • label
  • stop_time_update
    • stop_sequence
    • stop_id
    • arrival
      • time. see additional information
    • departure
      • time. see additional information
    • schedule_relationship. SCHEDULED if stop is a scheduled stop, SKIPPED if stop is skipped.
  • timestamp. the latest time this vehicle’s position was recorded.
vehicle
  • trip
    • trip_id
    • route_id
    • direction_id
    • schedule_relationship. SCHEDULED if trip is running as scheduled, ADDED if trip is an added trip, or CANCELED if trip has been canceled.
  • vehicle
    • id
    • label
  • position
    • latitude
    • longitude
    • bearing
  • stop_id
  • current_status. IN_TRANSIT_TO if vehicle is on its way to the stop_id, STOPPED_AT if vehicle is stopped at the stop_id
  • timestamp

Additional Information

  • Arrival and departure prediction information:
    • Both arrival and departure prediction information will be provided for all stops in stop_time_update.
    • For many trips, departure prediction information will only be provided at the origin stop and arrival prediction information will only be provided at the destination stop.
    • There are cases where an origin stop will have arrival prediction information if the trip originates at a non-public stop.
    • There are cases where a destination stop will have departure prediction information if the trip terminates at a non-public stop.
  • Detours:
    • Stops that are not served will have schedule_relationship set to SKIPPED.
    • stop_time_update, including arrival/departure predictions, will not be provided for any replacement stops.

Samples

Sample of the Trip Updates Feed

header {
    gtfs_realtime_version: "1.0"
    incrementality: FULL_DATASET
    timestamp: 1449176392
}
entity {
    id: "1449176392_109470943"
    trip_update {
        trip {
            trip_id: "109470943"
            schedule_relationship: SCHEDULED
            route_id: "0"
            direction_id: 0
        }
        stop_time_update {
            stop_sequence: 6
            arrival {
                time: 1449176381
            }
            departure {
                time: 1449176381
            }
            stop_id: "25676"
            schedule_relationship: SCHEDULED
        }
        stop_time_update {
            stop_sequence: 7
            arrival {
                time: 1449176479
            }
            departure {
                time: 1449176479
            }
            stop_id: "22454"
            schedule_relationship: SCHEDULED
        }
        stop_time_update {
            stop_sequence: 8
            arrival {
                time: 1449176585
            }
            departure {
                time: 1449176585
            }
            stop_id: "20378"
            schedule_relationship: SCHEDULED
        }
        vehicle {
            id: "6010"
            label: "6010"
        }
        timestamp: 1449042054
    }
}

Sample of the Vehicle Positions Feed

header {
    gtfs_realtime_version: "1.0"
    incrementality: FULL_DATASET
    timestamp: 1449042263
}
entity {
    id: "1449042263_1505"
    vehicle {
        trip {
            trip_id: "109486700"
            schedule_relationship: SCHEDULED
            route_id: "AB"
            direction_id: 1
        }
        position {
            latitude: 39.8419
            longitude: -104.676231
            bearing: 161
        }
        current_status: IN_TRANSIT_TO
        timestamp: 1449042245
        stop_id: "22903"
        vehicle {
            id: "1505"
            label: "1505"
        }
    }
}