Skip to content

Fares

GTFS allows to preciely model a wide variety of fare structures used by different transit agencies around the world, such as fares based by zone, by distance traveled, or by time-of-day. GTFS Fares informs riders of the price applicable to their trip and the media they can use to pay.

Fare Products

Fare Products lists the types of tickets or fares (i.e. single-trip fare, monthly pass, transfer fees, etc.) offered by a transit agency to access a service. Fare Products serve as a foundation for modeling an agency's fare structure, and they are linked to the transit service through mechanisms outlined in fare_leg_rules.txt. The association of Fare Products to various travel conditions, such as routes, areas, and times, determines the fare costs for individual travel segments and transfers.

Files included Fields included
fare_products.txt fare_product_id, fare_product_name, amount, currency, fare_media_id
fare_leg_rules.txt fare_product_id
Sample Data

The following tables presents a simple fare product (single ride $2.75 USD).

fare_products.txt

fare_product_id fare_product_name amount currency
single_ride Single Ride Fare 2.75 USD

fare_leg_rules.txt

fare_product_id
single_ride

Fare Media

Fare Media defines the supported media that can be used to hold and/or validate a fare product. This refers to physical or virtual containers such as a paper ticket, a rechargeable transit card or even contactless payment with credit cards or smartphones.

Files included Fields included
fare_media.txt fare_media_id, fare_media_name, fare_media_type
fare_products.txt fare_media_id
Sample Data

The following table shows a snippet of different fare media in the San Francisco Bay Area. Clipper is described as a physical transit card with fare_media_type=2. SFMTA Munimobile is described as a mobile app with fare_media_type=2. Cash which is given directly to the driver without a ticket, is fare_media_type=0.

fare_media.txt

fare_media_id fare_media_name fare_media_type
clipper Clipper 2
munimobile SFMTA MuniMobile 4
cash Cash 0

fare_products.txt

fare_product_id fare_product_name amount currency fare_media_id
single_ride Single Ride Fare 2.75 USD munimobile

Route-Based Fares

Route-Based Fares is used to assign different fares for specific groups of routes, such as special fares for express services or differentiating fares between a Bus Rapid Transit service versus traditional bus services.

Files included Fields included
routes.txt network_id
fare_leg_rules.txt fare_product_id, network_id
netowrks.txt network_id, network_name
route_networks.txt network_id, route_id
Sample Data

The following tables shows a system that categorizes routes into express and local categories, each associated with distinct fare products.

Using networks.txt + route_networks.txt

networks.txt

network_id network_name
express Express
local Local

route_networks.txt

network_id route_id
express express_a
express express_b
local local_1
local local_2

fare_leg_rules.txt

network_id fare_product_id
express express_single_ride
local local_single_ride

OR using routes.networks_id

routes.txt

route_id network_id
express_a express
express_b express
local_1 local
local_2 local

fare_leg_rules.txt

network_id fare_product_id
express express_single_ride
local local_single_ride

Time-Based Fares

Time-based Fares is used to assign fares for specific time-of-day or day-of-week, such as peak and off-peak fares and/or weekend fares.

Files included Fields included
fare_leg_rules.txt fare_product_id, from_timeframe_group_id, to_timeframe_group_id
timeframes.txt timeframe_group_id, start_time, end_time, service_id
Sample Data

The following tables presents a system where the peak hours are from 8:00 to 10:00, and the remaining hours are off-peak.

timeframes.txt

timeframe_group_id start_time end_time service_id
peak 8:00:00 10:00:00 all_day
regular 0:00:00 08:00:00 all_day
regular 10:00:00 24:00:00 all_day

fare_leg_rules.txt

from_timeframe_group_id fare_product_id
peak peak_single_ride
regular regular_single_ride

Zone-Based Fares

Zone-Based Fares is used to represent zone-based systems where a specific fare applies when traveling from one particular zone to another. A zone is defined by a group of stops.

Files included Fields included
fare_leg_rules.txt fare_product_id, from_area_id, to_area_id
areas.txt area_id, area_name
stop_areas.txt area_id, stop_id
Sample Data

The following tables shows the fare from Zone A to Zone B.

areas.txt

area_id area_name
zone_a Zone A
zone_b Zone B

stop_areas.txt

area_id stop_id
zone_a stop_a
zone_a stop_b
zone_b stop_c
zone_b stop_d

fare_leg_rules.txt

from_area_id to_area_id fare_product_id
zone_a zone_b zone_a_b_single

Fares Transfers

Fares Transfers is used to define rules applicable when transferring between legs (or individual travel segments). This allows to model the total cost of a multi-leg travel journey, accounting for special transfer policies, such as free transfers for a specific time limit, or applying fare discounts based on legs already traveled.

Files included Fields included
fare_leg_rules.txt leg_group_id
fare_transfer_rules.txt from_leg_group_id, to_leg_group_id, transfer_count, duration_limit, duration_limit_type, fare_transfer_type, fare_product_id
Sample Data

The following table illustrates that within a 2-hour window, unlimited free transfers are allowed between Leg A within the system.

fare_leg_rules.txt

leg_group_id
a

fare_transfer_rules.txt

from_leg_group_id to_leg_group_id transfer_count duration_limit duration_limit_type fare_transfer_type fare_product_id
a a -1 7200 1 0 free_transfer

Fares V1

Fares v1 is a legacy alternative to other Fares features described above. It allows to model basic fare information such as fare pricing, payment methods transfers and zone-based fares using the fare_rules.txt and fare_attributes.txt files. While simpler to produce, it's less capable or modeling more complex fare structures and may be deprecated with sufficient endorsement of other Fare features (that are part of what is called Fares v2).

Files included Fields included
stops.txt zone_id
fare_attributes.txt fare_id price currency_type payment_method transfers agency_id transfer_duration
fare_rules.txt fare_id route_id origin_id destination_id contains_id
Sample Data

The following tables illustrates that a trip on a network costs $3.20 CAD using a prepaid card, allowing free transfers within a 2-hour window.

fare_attributes.txt

fare_id price currency_type payment_method transfers transfer_duration
prepaid-card_fare 3.2 CAD 1 7200

fare_rules.txt

fare_id route_id origin_id destination_id
prepaid-card_fare line1 subway_stations subway_stations
prepaid-card_fare line2 subway_stations subway_stations

stops.txt

stop_id stop_name stop_lat stop_lon zone_id
A stopA 43.670049 -79.385389 subway_stations
B stopB 43.671049 -79.386789 subway_stations