Google Transit GTFS Realtime Reference and Differences

  • This document outlines the differences between the official General Transit Feed Specification (GTFS) Realtime and Google Transit's implementation.

  • Google Transit ignores certain official GTFS Realtime fields, interprets some differently, and offers experimental support for others.

  • Fields ignored by Google Transit include those related to alerts, carriage details, position, shapes, stop time updates, trip updates, and vehicle descriptors.

  • Google Transit's interpretation of certain fields, such as stop_id and schedule_relationship , deviates from the official GTFS definition, with specific conditions and supported enum values.

  • For information about differences between the GTFS Schedule and Google Transit implementation, refer to a separate article linked in the content.

This page describes the major differences between the official GTFS Realtime and Google Transit’s implementation of the specification in the following areas:

  • Ignored official specifications:These fields are part of the official GTFS. Google Transit ingests this data without error but doesn't proactively use the data.

  • Different interpretation:These fields include the parts of the official GTFS that Google Transit interprets differently than the GTFS definition of those parts.

  • Experimental support:These fields are experimental in Google Transit’s implementation. If you want to implement a new experimental field, contact the Google Transit team .

  • Google Transit-supported extension:This extension is not part of the official GTFS. The Transit-supported extension includes both public extensions and Google Transit-specific extensions. Any partner can send this information to Transit in their feed.

Realtime transit

The following sections document the major differences between the official GTFS and Google Transit's implementation of the Realtime transit feed.

Ignored official specifications in the realtime feeds

Some ignored specifications are experimental. To learn more, go to gtfs.org .

Table 1 lists the GTFS-defined fields that are ignored by Transit in the realtime feeds.

Message Ignored field defined in the GTFS Field type
Table 1. Ignored official fields in realtime feeds
image TranslatedImage
image_alternative_text TranslatedString
severity_level Enum
tts_description_text Proto
tts_header_text Proto
id String
occupancy_percentage int32
bearing Float
odometer Double
speed Float
encoded_polyline String
shape_id String
message StopTimeUpdate (in TripUpdate )
arrival.uncertainty int32
message StopTimeUpdate (in TripUpdate )
stop_time_properties Proto
trip_properties Proto
vehicle VehicleDescriptor
license_plate String
wheelchair_accessible WheelchairAccessible
congestion_level Enum
current_status VehicleStopStatus
current_stop_sequence uint32
multi_carriage_details.id String
occupancy_percentage uint32
stop_id String

Different interpretation in the realtime feeds

Although Transit accepts certain GTFS fields, Transit interprets them differently than the GTFS.

Table 2 lists GTFS-defined fields in the realtime feeds that are either optional or required conditionally by Transit. For optional fields, the table shows whether or not the enum values are supported by Transit.

Table 2. Differently interpreted realtime feed fields
Filename
Field defined in the GTFS
Field type
Required by Google Transit?
Google Transit implementation details
message StopTimeUpdate (in TripUpdate )
stop_id
String
Conditionally required

When a stop_id string is provided, it must meet one of the following conditions:

  • The stop_id string must be the same as in the stops.txt file in the corresponding GTFS feed.
  • If a different stop_id string is used, then the provided stop_id string must be a sibling or child string of the original stop_id string that's provided in the static GTFS. The corresponding stop_sequence field must also be provided.
schedule_relationship
Enum
Optional

Google Transit supports the following enum values:

  • SCHEDULED
  • SKIPPED
  • NO_DATA
schedule_relationship
Enum
Optional

Google Transit doesn't support the following enum values:

  • DUPLICATED
  • CANCELED —when it’s not for TripUpdate records

Google supports the following enum values:

  • SCHEDULED
  • UNSCHEDULED
  • ADDED
  • CANCELED —only supported for TripUpdate records

    Experimental support in realtime feeds

    If you need support to integrate new experimental fields, contact Google Transit .

    Google Transit-supported extensions in realtime feeds

    At the time of publishing this article, no fields belong to this category. If you need any assistance, contact Google Transit .

    Design a Mobile Site
    View Site in Mobile | Classic
    Share by: