With all our feeds, and as part of the conditions under the License Agreement, you may retrieve data directly from Metra's APIs. However, you must redistribute the data through your own host or web service and must not direct your application users to access data directly from Metra's servers.
GTFS Static Data
The static file is updated periodically, reflecting the most recent schedule for Metra trains. For convenience, we provide a text file with the date and time that the schedule was published. The schedule may be updated at any given time, so developers are encouraged to use this to determine if it is necessary to grab and rebuild the schedule.
For planned schedule updates, the new file will be published at 3:00:00 AM. However, there may be instances when sudden changes require an immediate update. Checking the published.txt file every few minutes will ensure you get the most recent schedule, regardless of when updates occur.
Raw GTFS Schedule Feed
Schedule Publishing Time
GTFS Realtime Data
This data is updated every 30 seconds, so there is no need to check any more frequently. If realtime data is unavailable for any schedule or trip, it is assumed that the static schedule is correct.
Alerts - Regardless of the active_period defined in an alert, if an alert is in the feed it is assumed to be active. Conversely, if an alert is not in the feed (regardless of the end specified in active_period) it is assumed to no longer be active.
Vehicle Positions - Occasionally, when a train is underground or at a terminal it will lose sight with the GPS satellites. When a train is scheduled to have begun a trip and no vehicle position is available it is assumed that the train is in route.
Trip Updates - Trip updates will provide realtime information for scheduled trips. When a train is actively reporting GPS coordinates, a corresponding trip update will be available. If no trip update is available and a trip is scheduled to have begun, assume the train is operating according to schedule. Note that a trip update does not always indicate that a train is running; trip updates may be provided hours in advance for annulled or added trains. If a trip is modified (e.g., stops added or removed), a trip update will be available regardless of the trip’s start time.
Realtime data feeds are hosted at: https://gtfspublic.metrarr.com
All requests must include an API authentication key, provided either as:
- A bearer token in the authorization header
- An ‘api_token’ query parameter in the URL
Example: GET - /gtfs/public/alerts?api_token=your_token_here
To request an API key, fill out the form available here.
Raw GTFS Realtime Feeds
These feeds use Protocol Buffers and follow the official GTFS-realtime specifications.
- GET - /gtfs/public/alerts
- GET - /gtfs/public/positions
- GET - /gtfs/public/tripupdates