2. Agencies (agency.txt)
This file is required to be included in GTFS feeds.
agency.txt file is used to represent the agencies that provide
data for this feed. While its presence is optional, if there are routes
from multiple agencies included, then records in
reference to agencies in this file.
|Optional||An ID that uniquely identifies a single transit agency in the feed. If a feed only contains routes for a single agency then this value is optional.|
|Required||The full name of the transit agency.|
|Required||The URL of the transit agency. Must be a complete URL only, beginning with |
|Required||Time zone of agency. All times in |
|Required||Contains a two-letter ISO-639-1 code (such as |
|Optional||A single voice telephone number for the agency that users can dial if required.|
|Optional||A URL that describes fare information for the agency. Must be a complete URL only, beginning with |
The following extract is taken from the GTFS feed of TriMet (Portland, USA), located at https://openmobilitydata.org/p/trimet.
In this example, the
agency_id column is included, but as there is
only a single entry the value can be empty. This means the
routes.txt also is not required.
The data in this file is typically used to provide additional
information to users of your app or web site in case schedules derived
from the rest of this feed are not sufficient (or in the case of
agency_fare_url, an easy way to provide a reference point to users
if the fare information in the feed is not being used).
If you refer to the following screenshot, taken from Google Maps, you
can see the information from
agency.txt represented in the
lower-left corner as an example of how it can be used.