Reference
This document de�nes the format and structure of the �les that comprise a GTFS dataset.
Table of contents
1. Term de�nitions (#term_de�nitions)
2. Field types (#�eld_types)
3. Dataset �les (#dataset_�les)
4. File requirements (#�le_requirements)
5. Field de�nitions (#�eld_de�nitions)
[Link] (#agencytxt)
[Link] (#stopstxt)
[Link] (#routestxt)
[Link] (#tripstxt)
stop_times.txt (#stop_timestxt)
[Link] (#calendartxt)
calendar_dates.txt (#calendar_datestxt)
fare_attributes.txt (#fare_attributestxt)
fare_rules.txt (#fare_rulestxt)
[Link] (#shapestxt)
[Link] (#frequenciestxt)
[Link] (#transferstxt)
[Link] (#pathwaystxt)
[Link] (#levelstxt)
feed_info.txt (#feed_infotxt)
[Link] (#translationstxt)
[Link] (#attributionstxt)
dataset creates a new version of the dataset. Datasets should be published at a
public, permanent URL, including the zip �le name. (e.g., [Link]
/gtfs/[Link]).
Record - A basic data structure comprised of a number of different �eld values
describing a single entity (e.g. transit agency, stop, route, etc.). Represented, in a table,
as a row.
Field - A property of an object or entity. Represented, in a table, as a column.
Field Value - An individual entry in a �eld. Represented, in a table, as a single cell.
Required - The �eld must be included in the dataset, and a value must be provided in
that �eld for each record. Some required �elds permit an empty string as a value
(denoted in this speci�cation as empty). To enter an empty string, just omit any text
between the commas for that �eld.
Optional - The �eld may be omitted from the dataset. If an optional column is
included, some of the entries in that �eld may be empty strings. To enter an empty
string, just omit any text between the commas for that �eld. Note that an omitted �eld
is equivalent to a �eld that is entirely empty.
Conditionally required - The �eld or �le is required under certain conditions, which are
outlined in the �eld or �le description. Outside of these conditions, this �eld or �le is
optional.
Service day - A service day is a time period used to indicate route scheduling. The
exact de�nition of service day varies from agency to agency but service days often do
not correspond with calendar days. A service day may exceed [Link] if service
begins on one day and ends on a following day. For example, service that runs from
[Link] on Friday to [Link] on Saturday, could be denoted as running from
[Link] to [Link] on a single service day.
Field types
Color - A color encoded as a six-digit hexadecimal number. Refer to
[Link] to generate a valid value (the
Enum - An option from a set of prede�ned constants de�ned in the "Description"
column.
Example: The route_type �eld contains a 0 for tram, a 1 for subway...
ID - An ID �eld value is an internal ID, not intended to be shown to riders, and is a
sequence of any UTF-8 characters. Using only printable ASCII characters is
recommended. IDs de�ned in one .txt �le are often referenced in another .txt �le.
Example: The stop_id �eld in [Link] (#stopstxt) is a ID. The stop_id �eld in
stop_times.txt (#stop_timestxt) is an ID referencing stops.stop_id.
Language Code - An IETF BCP 47 language code. For an introduction to IETF BCP 47,
refer to [Link]
([Link] and [Link]
/language-tags/ ([Link]
Example: en for English, en-US for American English or de for German.
Latitude - WGS84 latitude in decimal degrees. The value must be greater than or equal
to -90.0 and less than or equal to 90.0.
Example: 41.890169 for the Colosseum in Rome.
Longitude - WGS84 longitude in decimal degrees. The value must be greater than or
equal to -180.0 and less than or equal to 180.0.
Example: 12.492269 for the Colosseum in Rome.
Non-negative Float - A �oating point number greater than or equal to 0.
Non-negative Integer - A integer greater than or equal to 0.
Phone number - A phone number.
Time - Time in the HH:MM:SS format (H:MM:SS is also accepted). The time is
Dataset �les
This speci�cation de�nes the following �les:
Filename Required De�nes
[Link] (#agencytxt) Required Transit agencies with service represented in this dataset.
[Link] (#stopstxt) Required Stops where vehicles pick up or drop off riders. Also de�nes
stations and station entrances.
[Link] (#routestxt) Required Transit routes. A route is a group of trips that are displayed
to riders as a single service.
[Link] (#tripstxt) Required Trips for each route. A trip is a sequence of two or more
stops that occur during a speci�c time period.
stop_times.txt Required Times that a vehicle arrives at and departs from stops for
(#stop_timestxt) each trip.
[Link] Conditionally Service dates speci�ed using a weekly schedule with start
(#calendartxt) required and end dates. This �le is required unless all dates of
service are de�ned in calendar_dates.txt
File requirements
The following requirements apply to the format and contents of the dataset �les:
All �les must be saved as comma-delimited text.
The �rst line of each �le must contain �eld names. Each subsection of the Field
de�nitions (#�eld_de�nitions) section corresponds to one of the �les in a GTFS dataset
and lists the �eld names that may be used in that �le.
All �eld names are case-sensitive.
Field values may not contain tabs, carriage returns or new lines.
agencies and brands are distinct. This document uses the
term "agency" in place of "brand". A dataset may contain
data from multiple agencies. This �eld is required when the
dataset contains data for multiple transit agencies,
otherwise it is optional.
agency_name Text Required Full name of the transit agency.