GTFS Spreadsheet Schemas

April 16, 2025 · View on GitHub

Table of contents

GTFS Schedule Spreadsheet Schema

Field NameTypePresenceDefinition
idUnique IDSystem generatedUnique identifier for the feed.
️⚠️This field replaces mdb_source_id, that only contained digits, from a previous version of the schema.
Now an id can contain non-numeric characters.
data_typeEnumRequiredThe data format that the feed uses: gtfs.
featuresArray of EnumsOptionalAn array of features that the feed includes based on https://gtfs.org/getting-started/features/overview/. This list is automatically extracted from the Canonical GTFS Schedule Validator.
Multiple features can be present, separated by a vertical bar (|).
statusEnumOptionalDescribes status of the feed. Should be one of:
  • active: Feed should be used in public trip planners.
  • deprecated: Feed is explicitly deprecated and should not be used in public trip planners.
  • inactive: Feed hasn't been recently updated and should be used at risk of providing outdated information.
  • development: Feed is being used for development purposes and should not be used in public trip planners.
  • future: Feed is not yet active but will be in the future.
active, inactive and future statuses are updated based on the feedServiceWindowStart and feedServiceWindowEnd values extracted from the Canonical GTFS Schedule Validator.
is_officialEnumOptionalFlag indicating if the source comes from the agency itself or not.
  • True: Feed comes from the agency as an authorized source.
  • False: Feed is not from an official source, e.g. created by researchers or partners unaffiliated with the agency or municipality.
Feed's is_official status is assumed to be undefined if the cell is empty, meaning we cannot say if it's official or not.
redirectObjectOptionalWhen a feed is deprecated by a provider and replaced with a new URL, redirect information is provided to point to one or more new feed.
  • id
StringOptionalNew feed ID that replaces the current feed that is out of date or no longer maintained by the provider.
Multiple feed ids can be present, separated by a vertical bar (|).
  • comment
OptionalOptionalComment to explain redirect if needed (e.g new aggregate feed). Multiple comments can be present, separated by a vertical bar (|).
locationObjectRequiredContains
  • Text that describes the feed's location in the country_code, subdivision_name, and municipality fields.
  • Latitude, longitude, date and time that describes the feed's bounding box in the bounding_box subobject.
  • country_code
TextRequiredISO 3166-1 alpha-2 code designating the country where the feed service is located based on the number of stops. When multiple countries are included, the country with the most stops is displayed. For a list of valid codes see here.
  • subdivision_name
TextOptionalISO 3166-2 subdivision name designating the subdivision (e.g province, state, region) where the feed service is located based on the number of stops. When multiple subdivisions are included, the one with the most stops is displayed. For a list of valid names see here.
  • municipality
TextOptionalMunicipality in which the feed service is located based on the number of stops. When there are multiple municipalities, the one with the most stops is displayed
  • bounding_box
ObjectSystem generatedBounding box of the feed based on stops. Contains minimum_latitude, maximum_latitude, minimum_longitude, maximum_longitude and extracted_on fields. If the bounding box information displays as "null", you can check any potential feed errors with the GTFS validator.
    • minimum_latitude
LatitudeSystem generatedThe minimum latitude for the feed's bounding box.
    • maximum_latitude
LatitudeSystem generatedThe maximum latitude for the feed's bounding box.
    • minimum_longitude
LongitudeSystem generatedThe minimum longitude for the feed's bounding box.
    • maximum_longitude
LongitudeSystem generatedThe maximum longitude for the feed's bounding box.
    • extracted_on
Date and TimeSystem generatedThe date and timestamp the bounding box was extracted on in UTC.
providerTextRequiredA commonly used name for the transit provider included in the feed.
feed_contact_emailTextOptionalThe contact information for the data producer of the feed, discovered via feed_info.feed_contact_email in the feed, the provider's website, or the Mobility Database contributor form.
nameTextOptionalAn optional description of the feed, e.g to specify if the feed is an aggregate of multiple providers, or which network is represented by the feed.
urlsObjectRequiredContains URLs associated with the feed in the direct_download_url, latest, and license fields.
  • direct_download
URLOptionalURL that automatically opens the feed.
  • authentication_type
EnumOptionalThe authentication_type field defines the type of authentication required to access the URL. Valid values for this field are:
  • 0 or (empty) - No authentication required.
  • 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information.
  • 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request.
When not provided, the authentication type is assumed to be 0.
  • authentication_info_url
URLConditionally requiredIf authentication is required, the authentication_info_url field contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created. This field is required for authentication_type=1 and authentication_type=2.
  • api_key_parameter_name
TextConditionally requiredThe api_key_parameter_name field defines the name of the parameter to pass in the URL to provide the API key. This field is required for authentication_type=1 and authentication_type=2.
  • latest
URLSystem generatedA stable URL for the latest dataset of a feed.
  • license
URLOptionalThe license information for the direct download URL.

GTFS Realtime Spreadsheet Schema

Field NameTypePresenceDefinition
idUnique IDSystem generatedUnique identifier for the feed.
️⚠️This field replaces mdb_source_id, that only contained digits, from a previous version of the schema.
Now an id can contain non-numeric characters.
data_typeEnumRequiredThe data format that the feed uses: gtfs-rt.
entity_typeArray of EnumsRequiredThe type of realtime entity: vp, tu, or sa which represent vehicle positions, trip updates, and service alerts.
Multiple entity_types can be present, separated by a vertical bar (|).
providerTextRequiredA commonly used name for the transit provider included in the feed.
nameTextOptionalAn optional description of the feed, e.g to specify if the feed is an aggregate of multiple providers
noteTextOptionalA note to clarify complex use cases for consumers, for example when several static feeds are associated with a realtime feed.
featuresArray of EnumsOptionalAn array of features which can be any of:
  • occupancy
statusEnumOptionalDescribes status of the feed. Should be one of:
  • active: Feed should be used in public trip planners.
  • deprecated: Feed is explicitly deprecated and should not be used in public trip planners.
  • inactive: Feed hasn't been recently updated and should be used at risk of providing outdated information.
  • development: Feed is being used for development purposes and should not be used in public trip planners.
  • future: Feed is not yet active but will be in the future.
Feed is assumed to be active if status is not explicitly provided.
is_officialEnumOptionalFlag indicating if the source comes from the agency itself or not.
  • True: Feed comes from the agency as an authorized source.
  • False: Feed is not from an official source, e.g. created by researchers or partners unaffiliated with the agency or municipality.
Feed's is_official status is assumed to be undefined if the cell is empty, meaning we cannot say if it's official or not.
redirectObjectOptionalWhen a feed is deprecated by a provider and replaced with a new URL, redirect information is provided to point to one or more new feed.
  • id
StringOptionalNew feed ID that replaces the current feed that is out of date or no longer maintained by the provider.
Multiple feed ids can be present, separated by a vertical bar (|)
  • comment
StringOptionalComment to explain redirect if needed (e.g new aggregate feed).
Multiple comments can be present, separated by a vertical bar (|).
static_referenceArray of StringsOptionalA list of the static feeds that the real time feed is associated with, represented by their database IDs.
Multiple static_references can be present, separated by a vertical bar (|).
urlsObjectRequiredContains URLs associated with the feed in the direct_download_url and license_url fields, and the authentication info for direct_download_url in the authentication_type, authentication_info_url and api_key_parameter_name fields.
  • direct_download_url
URLRequiredURL that responds with an encoded GTFS Realtime protocol buffer message.
  • authentication_type
EnumOptionalThe authentication_type field defines the type of authentication required to access the URL. Valid values for this field are:
  • 0 or (empty) - No authentication required.
  • 1 - The authentication requires an API key, which should be passed as value of the parameter api_key_parameter_name in the URL. Please visit URL in authentication_info_url for more information.
  • 2 - The authentication requires an HTTP header, which should be passed as the value of the header api_key_parameter_name in the HTTP request.
  • 3: Ad-hoc authentication required, visit URL in authentication_info_url for more information.
When not provided, the authentication type is assumed to be 0.
  • authentication_info_url
URLConditionally requiredIf authentication is required, the authentication_info_url field contains a URL to a human-readable page describing how the authentication should be performed and how credentials can be created. This field is required for authentication_type=1 or greater.
  • api_key_parameter_name
TextConditionally requiredThe api_key_parameter_name field defines the name of the parameter to pass in the URL to provide the API key. This field is required for authentication_type=1 and authentication_type=2.
  • license_url
URLOptionalThe license information for direct_download_url.