Google Transit GTFS Schedule Reference and Differences

This page describes the major differences between the official GTFS Schedule 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.

Static transit

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

Ignored official specifications in static feeds

Some official specifications that are ignored by Transit are experimental. To learn more, go to gtfs.org.

Table 1 lists GTFS files that aren't supported by Transit in static feeds. Also, none of the fields that are defined in these files are supported by Transit.

Table 1. Unsupported GTFS files in static feeds
areas.txt
fare_leg_rules.txt
fare_products.txt
fare_transfer_rules.txt
levels.txt
stop_areas.txt

Table 2 lists all the GTFS-defined fields that are ignored by Transit in the static feeds.

Table 2. Ignored GTFS fields in static feeds
Filename Ignored field defined in the GTFS Field type
fare_attributes.txt payment_method Enum
feed_info.txt default_lang Language code
feed_info.txt feed_publisher_name Text
pathways.txt max_slope Float
routes.txt continuous_drop_off Enum
routes.txt continuous_pickup Enum
routes.txt network_id ID
routes.txt route_desc Text
routes.txt route_sort_order Non-negative integer
stops.txt level_id ID
stops.txt stop_desc Text
stops.txt stop_url URL
stops.txt tts_stop_name Text
trips.txt bikes_allowed Enum

Different interpretation in static feeds

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

Table 3 shows the fields in static feeds that Transit implements differently than as described in the GTFS.

Table 3. Differently implemented static feed fields
Filename Field defined in the GTFS Field type Required by Google Transit? Google Transit implementation details
fare_attributes.txt transfers Enum Required

Google Transit extension.

The public GTFS limits values to a range from 0 to 2. Google Transit accepts values from 0 to 5.

Use this field to set the maximum number of allowable transfers with the fare. This doesn't include block transfers, also known as in-seat transfers. If you don't want to set limits on the number of transfers for a fare, leave the transfers field empty.

pathways.txt pathway_mode Enum Optional When the pathway_mode field is specified, if it's left empty, Google Transit accepts it and treats it as unknown.
stop_times.txt arrival_time Time Conditionally required Hours are restricted to values from 00 to 99, which is more than enough for three-day trips.
transfers.txt transfer_type Enum Required

Values of 4 and 5 aren't supported and are ignored.

Google Transit supports values of 0, 1, 2, and 3.

trips.txt block_id ID Optional To learn more, see Block transfer example.

Experimental support in static feeds

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

Google Transit-supported extensions in static feeds

Table 4 provides information about Google Transit extensions. These fields aren't part of the official GTFS.

Table 4. Supported static feed extensions
Filename Field Field type Required by Google Transit? Google Transit implementation details
fare_attributes.txt ic_price Float Optional

This Google Transit extension is available only for partners in Japan.

The ic_price field represents the discounted amount of money to be paid for this fare with a smart card. If no discounts are provided for this fare, or the smart card isn't supported, the ic_price field's value needs to be -1.

fare_rules.txt contains_route_id ID Optional

Google Transit extension.

This fare applies only to travel that visits an exact set of routes identified by the route_id value in all rows for this combination of the fare_id, origin_id, and destination_id columns.

If the contains_route_id column is missing, or all its values for this fare are null, then the fare isn't restricted in this parameter. If the contains_route_id field is given for a fare, then the route_id field must be empty.

routes.txt checkin_duration Integer Optional

Google Transit extension.

The checkin_duration field specifies how many seconds early a passenger is advised to arrive before the scheduled departure in order to check in and board.

If the passenger connects to the departure by a transfer, then any defined transfer time overrides the checkin_duration value.

The checkin_duration value is only a recommendation that's usually provided by the transit operator. It might not reflect the absolute last possible moment that a passenger can arrive and still board the vehicle.

routes.txt route_type Enum Required

Google Transit extension.

To learn how Google Transit extends the GTFS‑accepted route_type value options, see Extended GTFS route types.

stop_times.txt stop_direction_name Text Optional

Google Transit extension.

The stop_direction_name field identifies a trip's direction to passengers. The direction is stored as the direction_name value of the departure from this stop.

If the stop_direction_name field is empty, then the Transit-supported trip_direction_name field is used instead. If the trip_direction_name and stop_direction_name fields are both empty, then the transit importer leaves them empty. In that case, partners can use the stop_headsign or trip_headsign value instead. The values of the stop_direction_name field are case normalized.

stops.txt signposted_as Text Optional

Google Transit extension.

The signposted_as field contains the verbatim text written on the signboard for the platform. Examples are "Towards Central" and "East side & Brooklyn."

The GTFS platform_code field and the Transit-supported signposted_as field can be set simultaneously.

Differences between the platform_code and signposted_as fields include the following:

  • Length. The platform_code field usually contains a number or letter like 2 or C.
  • Language. The platform_code field doesn't have a language, but signposted_as values can have translations.
  • Stability. The platform_code field changes much less often than the signposted_as field.
stops.txt vehicle_type Integer Optional

Google Transit extension.

The vehicle_type field specifies the type of vehicles that are used at a stop. This field accepts hierarchical vehicle type (HVT) route types. The HVT values are derived from the European Transport Protocol Experts Group (TPEG) standard.

agency.txt ticketing_deep_link_id ID Optional

Google Transit ticketing extension.

In the agency.txt file, the ticketing_deep_link_id field represents the deep link that's used to ticket the trips of this agency.

routes.txt ticketing_deep_link_id ID Optional

Google Transit ticketing extension.

In the routes.txt file, the ticketing_deep_link_id field represents the deep link that's used to ticket the trips of this route.

stop_times.txt ticketing_stop_time_id ID Optional

Google Transit ticketing extension.

If present in the stop_times.txt file, the ticketing_stop_time_id field overrides the identifier that represents the stop time for ticketing with deep links.

stop_times.txt ticketing_type Enum Optional

Google Transit ticketing extension.

The ticketing_type field specifies the type of ticketing that applies to this stop time.

Google Transit accepts the following values:

  • Empty. Default—as defined by the trip.
  • 0. Available only if the agency or route has a ticketing deep link that's enabled.
  • 1. Unavailable.
ticketing_deep_links.txt android_intent_uri URI Optional

Google Transit ticketing extension.

The android_intent_uri field represents the intent URI that's used for deep linking on Android.

ticketing_deep_links.txt ios_universal_link_url URL Optional

Google Transit ticketing extension.

The ios_universal_link_url field represents the universal link URL that's used for deep linking on iOS.

ticketing_deep_links.txt ticketing_deep_link_id ID Required

Google Transit ticketing extension.

The ticketing_deep_link_id field represents the identifier of the deep link.

ticketing_deep_links.txt web_url URL Optional

Google Transit ticketing extension.

The web_url field represents the URL that's used for deep linking on the web.

ticketing_identifiers.txt agency_id ID Required

Google Transit ticketing extension.

To specify the agency of the stop that the default ticketing_stop_id field is defined for, the agency_id field contains the ID from the GTFS agency.txt file.

ticketing_identifiers.txt stop_id ID Required

Google Transit ticketing extension.

To specify the stop that the default ticketing_stop_id field is defined for, the stop_id field contains the ID from the GTFS stops.txt file.

ticketing_identifiers.txt ticketing_stop_id ID Required

Google Transit ticketing extension.

The ticketing_stop_id field contains the ticketing ID that is applied to the stop. Optionally, an agency qualifies the ID.

trips.txt exceptional Enum Optional

This field indicates exceptional trips. They operate outside of the regular schedule or are diverted from the usual route due to special events or planned disruptions (such as trackwork, etc).

Google accepts the following value options:

  • 0. Regular services
  • 1. Service exception. For example, services that are added due to special events or services diverted away from the usual route due to planned disruptions.
trips.txt ticketing_trip_id ID Optional

Google Transit ticketing extension.

If the ticketing_trip_id field is present, its value overrides the trip_id field to identify the trip for ticketing with deep links.

trips.txt ticketing_type Enum Optional

Google Transit ticketing extension.

The ticketing_type field specifies the type of ticketing that applies to this trip.

Google Transit accepts the following values:

  • 0. Default. Available only if the agency or route has a ticketing deep link that's enabled.
  • 1. Unavailable.
translations.txt lang Language Code Optional

Google Transit extension.

The lang field isn't part of the official GTFS, but Google Transit uses this value when it’s present.

To specify the translation of a phrase, use the lang field. Its value must not be empty or und (an undefined language).

translations.txt trans_id ID Optional

Google Transit extension.

The trans_id field isn't part of the official GTFS, but Google Transit uses this value when it’s present.

To specify the ID token of the phrase that the translation is provided for, use the trans_id field. Each row of the translations.txt table means that in the language lang, the phrase trans_id translates to translation.

trips.txt original_trip_id ID Optional

Google Transit extension.

If it's present in the trips.txt file, the original_trip_id value overrides the trip_id value for use by other systems. An example is realtime matching.

trips.txt trip_direction_name Text Optional

Google Transit extension.

The trip_direction_name field identifies a trip's direction to passengers. The value in this field is stored as the direction_name value of each trip.

If the stop_direction_name value in the stop_times table changes along the trip, it might override the trip_direction_name value.

Values in the trip_direction_name field are case normalized.

trips.txt vehicle_category_id ID Optional

Google Transit extension.

In the trips.txt file, the vehicle_category_id field identifies the vehicle that's allotted to this trip. When this field is in the trips.txt file, its value overrides the vehicle_category_id value in the routes.txt file.