Clear search
Close search
Google apps
Main menu

Create your data feed


Routes describe how agencies communicate their services to riders. You define routes in the routes.txt file, which has the following structure:

routes.txt file structure

The following example shows a simple routes.txt file:


17,A,Mission,"The ""A"" route travels from lower Mission to Downtown.",3

Route modeling

You should organize route.txt entries in the same way as you communicate the physical routes or lines to your riders. For example, group your timetables by route in routes.txt, just as you would when presenting them on a website or in a printed booklet. The structure of your routes.txt file should correspond directly to these timetable routes.

To ensure a quality data feed, follow these best practices in modeling your routes:

  • route_color: The route_color and route_text_color fields help users to identify a route.
    • These values should be consistent with colors in schedules, maps, signage or labels on the vehicle.
    • Use contrasting colors for the route_color and route_text_color fields, as they are used as text and background colors when displaying route names.
    • If your agency doesn't use colors, it’s fine to leave these fields empty.
  • route_url: The route_url should lead to a webpage that provides information about the particular route.
  • route_desc: Enter a description of the route using the route_desc field. 

Routes vs. Trips

Do not break a physical route into multiple entries in routes.txt to represent different route variations,(such as direction of travel.) Instead, use trips.txt features to model those variations. If you see multiple entries in routes.txt with the same route_short_name or route_long_name, this is a sign that routes have been needlessly subdivided.

Improperly modeled routes can have a negative impact on features such as the ability to search for a specific route.


R10,10,Airport - Downtown,3
R20,20,University - Downtown,3



R10-in,10,To Downtown,3
R10-out,10,To Airport,3
R20-in,20,To Downtown,3
R20-out,20,To University,3

Route names

Routes in your GTFS feed should use the same naming as the physical routes or lines communicated by your agency. City networks often use numbers, letters, or colors to distinguish different lines and routes. However, intercity trains, long distance buses or ferry services are often identified by their type or by the name of the operator, and these identifiers should be used as route names.

Don't include words like "line" or "route" in route names. The value of the route_short_name field should be a number or a short identifier. Don’t duplicate this value in the route_long_name field, since they are generally shown next to each other. If the route doesn't have both a route_long_name and a route_short_name, you can leave one field empty.


We always prefer to show the route_short_name. If the route_long_name contains the name that is used for communication, the route_short_name should be left empty.


Route modeling

The following are examples of route modeling:

  • Bus line 1 operates between A - B - C - D - E - F. Some trips only operate between A and D, some trips skip B, C and E. This should be modeled as one route “1” in the feed including trips from A to F, F to A and all variations.
  • If the trips that skips B, E and E are communicated as separate line “1 Express” to users in schedules, maps and signage they should be modelled as separate route “1 Express” in the feed as well.

Route naming

  1. The Zürich tram network uses numbers and colors to identify the different lines:

    • 13 (route logo)  Zürich, Albisgütli
      [route_short_name: “13”, route_long_name: “”, trip_headsign: “Zürich, Albisgütli”]

    • 6  Zürich, Zoo
      [route_short_name: “6”, route_long_name: “”, trip_headsign: “Zürich, Zoo”]

  2. National rail services in Great Britain are communicated by the name of the operator:

    • South West Trains logo  London Waterloo
      [route_short_name: “South West Trains”, route_long_name: “”, trip_headsign: “London Waterloo”]

    • Southern  Brighton
      [route_short_name: “Southern”, route_long_name: “”, trip_headsign: “Brighton”]

  3. National rail services in Europe are communicated by the type of train:

    • ICE 801 Berlin Südkreuz
      [route_short_name: “ICE”, route_long_name: “”, trip_headsign: “Berlin Südkreuz”, trip_short_name: 801]

    • Interlaken logo  Interlaken Ost
      [route_short_name: “IC”, route_long_name: “”, trip_headsign: “Interlaken Ost”]

  4. Long distance buses in Argentina are communicated by the name of the operator:

    • Mercobus logo Cordoba
      [route_short_name: “Mercobus”, route_long_name: “”, trip_headsign: “Cordoba”]

    • Rutatlantica logo  Rafael Castillo
      [route_short_name: “Rutatlantica”, route_long_name: “”, trip_headsign: “Rafael Castillo”]

Was this article helpful?
How can we improve it?