GTFS Realtime supports three distinct types of realtime data: trip updates, service alerts, and vehicle positions. Google Transit recommends that each realtime feed contains only one type of entity. When suitable, we also recommend that agencies separate the realtime feed into entity subtypes, based on the route type, agency, or other criteria.
As an example, the trip updates entity can have a route type sub-category. Then if an agency needs to provide trip update information for all their transit services, they can include bus service updates in one feed and subway service updates in another feed.
To help prevent a single point of failure, separate the realtime feed into single types and smaller portions. When feeds are separate, one part of incorrect input doesn't affect the whole feed.
To convert a merged realtime feed to a feed per type schema, use this example tool.
The following sections document the three GTFS Realtime feed types.
Example: "Bus X is delayed by 5 minutes."
Trip updates represent fluctuations in the timetable. We expect to receive trip updates for all the trips you schedule that are capable for realtime. These updates give a predicted arrival or departure for stops along the route. Trip updates can also provide for more complex scenarios when trips are canceled, added to the schedule, or re-routed.
For more information, see Trip Updates.
Example: "Station Y is closed due to construction."
Service alerts represent higher level problems with a particular entity. These alerts usually consist of text that describes the problem. To collect more structured data that helps us understand who the service alert affects, we also accept URLs.
Some examples of service alerts are problems with stations, lines, or the whole network.
For more information, see Service Alerts.
Example: "This bus is at position X at time Y."
Vehicle position represents a few basic pieces of information about a particular vehicle on the network. The most important data is the latitude and longitude of the vehicle's position, but we can also use data on current speed and odometer readings from the vehicle.
For more information, see Vehicle Positions.