What is GTFS?
GTFS (the General Transit Feed Specification) is the standard, open format that transit agencies use to publish their schedules and route information so that trip planners, mapping apps, and researchers can consume them. If you've ever gotten transit directions in Google Maps, Apple Maps, Transit, Citymapper, or Moovit, those apps were reading GTFS feeds.
The short version
A GTFS feed is just a ZIP file containing a handful of CSV-style text files. Each file describes one part of a transit system: agencies, routes, stops, the schedule of trips, the calendar of service days, and so on. Together they describe everything an outside app needs to plan a trip on your service.
The format was originally developed by Google and Portland's TriMet in 2005 (it was first called "Google Transit Feed Specification") and has since become the de facto open standard, maintained by the MobilityData non-profit and a community of agency and vendor contributors.
What's in a GTFS feed?
A minimal feed contains these files (all CSV with a .txt extension):
| File | What it describes |
|---|---|
agency.txt | The transit agency operating the service. |
routes.txt | Each named route, such as the "1 Main St", the "Red Line", or the "Crosstown Express". |
stops.txt | Every stop or station, with latitude and longitude. |
trips.txt | Each individual run of a route on a given service day. |
stop_times.txt | The arrival and departure time of each trip at each stop. |
calendar.txt | Which days of the week each service pattern runs. |
Optional but commonly included:
shapes.txt | The actual geometry of each route: the polyline drawn on the map. |
calendar_dates.txt | Holiday exceptions and special service dates. |
fare_attributes.txt & fare_rules.txt | How much it costs to ride. |
frequencies.txt | Headway-based service ("every 10 minutes from 6am to 9pm"). |
transfers.txt | Special transfer rules between stops. |
feed_info.txt | Metadata about the feed itself: publisher, version, date range. |
Who consumes GTFS?
- Trip planners and mapping apps: Google Maps, Apple Maps, Transit, Citymapper, Moovit, and dozens of regional apps all consume GTFS to provide transit directions.
- Open-data and analytics platforms: researchers and planners use GTFS for accessibility analysis, frequency studies, and equity reporting.
- Onboard and station signage: many digital sign systems pull from the same GTFS feed used by riders' apps, ensuring consistency.
- Federal reporting: the FTA's National Transit Map is built from agency-published GTFS.
GTFS Schedule vs. GTFS Realtime
"GTFS" by itself usually means GTFS Schedule (the static, planned schedule). There's a separate companion specification, GTFS Realtime, that publishes live data: actual vehicle positions, trip updates (delays, cancellations), and service alerts. Realtime feeds reference the static feed by ID, so you need a clean, accurate schedule feed before realtime makes sense. GTFS·X is focused on the schedule side.
What about demand-responsive transit?
The base GTFS spec assumes fixed routes and fixed schedules. For microtransit, dial-a-ride, and other demand-responsive service, there's an extension called GTFS-Flex that adds polygon service zones, pickup/drop-off windows, and booking rules. See What is GTFS-Flex? for the details.
How do I publish a feed?
Three steps:
- Build the feed: describe your routes, stops, trips, and schedule in the GTFS format. You can do this by hand in a spreadsheet, with scripts, or with an editor like GTFS·X.
- Validate it: run the feed through the canonical GTFS validator to catch errors before consumers do. GTFS·X validates as you go.
- Host it at a stable URL: put the ZIP file at a permanent URL on your agency's website and submit it to consumers. The Mobility Database is the canonical registry; once you're listed there, most major trip planners will pick up your feed automatically.
Where to go from here
- Open GTFS·X and start drawing your first route.
- Read the documentation for a step-by-step walkthrough of the editor.
- Read the GTFS-Flex primer if you operate demand-responsive service.
- The official spec lives at gtfs.org and is the authoritative reference.
See also
- How to publish a GTFS feed: getting your feed into the Mobility Database, Google Maps, Apple Maps, and other consumers.
- GTFS·X vs. National RTAP GTFS Builder: when each tool is the right fit.