GTFS Realtime - Service Alerts - Metro Train
GTFS Realtime Metro Train Service Alerts data feed provides real time information about planned and unplanned disruptions affecting metropolitan train services including cancellations or unforeseen events affecting a station, route or the entire network in Melbourne, Victoria. Note: This API endpoint has a rate limit of 24 calls per minute and caching time of 30 seconds. To obtain an 'API Key' please continue to sign up using our Data Exchange Platform (https://data-exchange.vicroads.vic.gov.au/).
Data Dictionary
Field Name | Name | Type | Description | Fixed Values |
---|---|---|---|---|
entity | Feed Entity | FeedEntity() | A definition (or update) of an entity in the transit feed. If the entity is not being deleted, exactly one of trip_update, vehicle, and alert fields should be populated. This field can be repeated as many times as needed. | |
header | Feed Header | FeedHeader() | Metadata about a feed, included in feed messages. | |
header. gtfs_realtime_version | GTFS Realtime Version | STRING() | Version of the feed specification. The current version is 2.0. | |
header. incrementality | Incrementality | ENUM() | Determines whether the current fetch is incremental. Options include: -FULL_DATASET: this feed update will overwrite all preceding realtime information for the feed. Thus this update is expected to provide a full snapshot of all known realtime information. -DIFFERENTIAL: currently, this mode is unsupported and behavior is unspecified for feeds that use this mode. There are discussions on the GTFS Realtime mailing list around fully specifying the behavior of DIFFERENTIAL mode and the documentation will be updated when those discussions are finalized. |
FULL_DATASET, DIFFERENTIAL |
header. timestamp | Feed Header Timestamp | int64() | This timestamp identifies the moment when the content of this feed has been created (in server time). In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC). To avoid time skew between systems producing and consuming realtime information it is strongly advised to derive timestamp from a time server. It is completely acceptable to use Stratum 3 or even lower strata servers since time differences up to a couple of seconds are tolerable. | |
entity. id | Feed Entity ID | STRING() | Feed-unique identifier for this entity. The ids are used only to provide incrementality support. The actual entities referenced by the feed must be specified by explicit selectors (see EntitySelector below for more info). | |
entity. alert | Feed Entity Alert | Alert() | An alert, indicating some sort of incident in the public transit network. | |
alert. active_period | Alert Active Period | TIMERANGE() | Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. This field can be repeated as many times as needed. | |
alert. active_period. start | Alert Active Period Start | int64() | Start time, in POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC). If missing, the interval starts at minus infinity. If a TimeRange is provided, either start or end must be provided - both fields cannot be empty. | |
alert. active_period. end | Alert Active Period End | int64() | End time, in POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC). If missing, the interval ends at plus infinity. If a TimeRange is provided, either start or end must be provided - both fields cannot be empty. | |
alert. informed_entity | Alert Informed Entity | EntitySelector() | Entities whose users we should notify of this alert. At least one informed_entity must be provided. This field can be repeated as many times as needed. | |
alert. informed_entity. agency_id | Alert Informed Entity Agency ID | STRING() | The agency_id from the GTFS feed that this selector refers to. | |
alert. informed_entity. route_id | Alert Informed Entity Route ID | STRING() | The route_id from the GTFS that this selector refers to. If direction_id is provided, route_id must also be provided. | |
alert. informed_entity. stop_id | Alert Informed Entity Stop ID | STRING() | The stop_id from the GTFS feed that this selector refers to. | |
alert. informed_entity. direction_id | Alert Informed Entity Direction ID | UINT32() | The direction_id from the GTFS feed trips.txt file, used to select all trips in one direction for a route, specified by route_id. If direction_id is provided, route_id must also be provided. | |
alert. cause | Alert Cause | ENUM() | Cause of this alert. Options include: -UNKNOWN_CAUSE -OTHER_CAUSE -TECHNICAL_PROBLEM -STRIKE -DEMONSTRATION -ACCIDENT -HOLIDAY -WEATHER -MAINTENANCE -CONSTRUCTION -POLICE_ACTIVITY -MEDICAL_EMERGENCY |
UNKNOWN_CAUSE, OTHER_CAUSE, TECHNICAL_PROBLEM, STRIKE, DEMONSTRATION, ACCIDENT, HOLIDAY, WEATHER, MAINTENANCE, CONSTRUCTION, POLICE_ACTIVITY, MEDICAL_EMERGENCY |
alert. effect | Alert Effect | ENUM() | The effect of this problem on the affected entity. Options include: -NO_SERVICE -REDUCED_SERVICE -SIGNIFICANT_DELAYS -DETOUR -ADDITIONAL_SERVICE -MODIFIED_SERVICE -OTHER_EFFECT -UNKNOWN_EFFECT -STOP_MOVED |
NO_SERVICE, REDUCED_SERVICE, SIGNIFICANT_DELAYS, DETOUR, ADDITIONAL_SERVICE, MODIFIED_SERVICE, OTHER_EFFECT, UNKNOWN_EFFECT, STOP_MOVED, NO_EFFECT, ACCESSIBILITY_ISSUE |
alert. url | Alert URL | TranslatedString() | The URL which provides additional information about the alert. | |
alert. url. translation | Alert URL Translation | Translation() | A localized string mapped to a language. This field can be repeated as many times as needed. | |
alert. url. translation. text | Alert URL Translation Text | STRING() | A UTF-8 string containing the message. | |
alert. url. translation. language | Alert URL Translation Language | STRING() | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. | |
alert. header_text | Alert Header Text | TranslatedString() | Header for the alert. This plain-text string will be highlighted, for example in boldface. | |
alert. header_text. translation | Alert Header Text Translation | Translation() | A localized string mapped to a language. This field can be repeated as many times as needed. | |
alert. header_text. translation. text | Alert Header Text Translation Text | STRING() | A UTF-8 string containing the message. | |
alert. header_text. translation. language | Alert Header Text Translation Language | STRING() | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. | |
alert. description_text | Alert Description Text | TranslatedString() | Description for the alert. This plain-text string will be formatted as the body of the alert (or shown on an explicit "expand" request by the user). The information in the description should add to the information of the header. | |
alert. header_text. translation | Alert Description Text Translation | Translation() | A localized string mapped to a language. This field can be repeated as many times as needed. | |
alert. header_text. translation. text | Alert Description Text Translation Text | STRING() | A UTF-8 string containing the message. | |
alert. header_text. translation. language | Alert Description Text Translation Language | STRING() | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. | |
alert. informed_entity. trip | Alert Informed Entity Trip | TripDescriptor() | The trip instance from the GTFS that this selector refers to. This TripDescriptor must resolve to a single trip instance in the GTFS data (e.g., a producer cannot provide only a trip_id for exact_times=0 trips). If the ScheduleRelationship field is populated within this TripDescriptor it will be ignored by consumers when attempting to identify the GTFS trip. | |
alert. informed_entity. trip. trip_id | Alert Informed Entity Trip ID | STRING() | The trip_id from the GTFS feed that this selector refers to. Whether trip_id is required depends on the type of trip: - Non-frequency-based trips: The trip_id field alone is enough to uniquely identify these trips. Note that non-frequency-based trips aren't defined in GTFS frequencies.txt. - Frequency-based trips: The trip_id, start_time, and start_date fields are all required. Frequency-based trips are defined in GTFS frequencies.txt. - Schedule-based trips: The trip_id field can be omitted only if the trip can be uniquely identified by a combination of the provided route_id, direction_id, start_time, and start_date fields. Note that scheduled-based trips aren't defined in GTFS frequencies.txt. |
|
alert. informed_entity. trip. start_time | Alert Informed Entity Trip Start Time | STRING() | The initially scheduled start time of this trip instance. The field type Time defines the format of this field, for example 11:15:35 or 25:15:35. Whether the start_time field is required depends on the type of trip: • The trip_id corresponds to a non-frequency-based trip: The start_time field needs to either be omitted or be equal to the value of departure_time in the GTFS feed's stop_times.txt file. • The trip_id corresponds to a frequency-based trip: start_time is always required and must be specified for trip updates and vehicle positions. Frequency-based trips are defined in GTFS frequencies.txt. ◦ If the frequency-based trip corresponds to an exact_times=1 GTFS record: The start_time field must be some multiple, including zero, of headway_secs later than the frequencies.txt start_time for the corresponding time period. ◦ If the frequency-based trip corresponds to an exact_times=0 GTFS record: The start_time can be arbitrary, and it's initially expected to be the first departure of the trip. After it's established, the start_time of this frequency-based exact_times=0 trip is considered immutable, even if the first departure time changes. Any subsequent time changes can instead be reflected in a StopTimeUpdate message. • The trip_id is omitted: start_time must be provided. |
|
alert. informed_entity. trip. start_date | Alert Informed Entity Trip Start Date | STRING() | The start date of this trip instance in YYYYMMDD format. Whether start_date is required depends on the type of trip: - Scheduled trips: start_date must be provided. This is to disambiguate trips that are so late that they collide with a scheduled trip on the next day. For example, suppose a train departs at 8:00 and 20:00 every day. If the train is 12 hours late, then there would be two distinct trips scheduled for the same time. Note: This field is optional for scheduled trips in which such collisions are impossible. For example, this could happen if a service runs on an hourly schedule, and a vehicle that's one hour late isn't considered related to the schedule anymore. - Frequency-based trips: start_date must be provided. Note that frequency-based trips are defined in the GTFS frequencies.txt file, while scheduled trips aren't. - trip_id is omitted: start_date must be provided. |
|
alert. informed_entity. trip. route_id | Alert Informed Entity Trip Route ID | STRING() | The route_id from the GTFS feed that this selector refers to. If trip_id is omitted, then route_id, direction_id, start_time, and schedule_relationship=SCHEDULED must all be set to identify a trip instance. | |
alert. informed_entity. trip. direction_id | Alert Informed Entity Trip Direction ID | UINT32() | The direction_id from the GTFS feed trips.txt file, which indicates the direction of travel. If trip_id is omitted, direction_id must be provided. Caution: This field is still experimental and subject to change. It might be formally adopted in the future. |
Additional information
Field | Value |
---|---|
Format | API |
License | Creative Commons Attribution 4.0 |
Open Data Title | GTFS Realtime - Service Alerts - Metro Train |
Dataset Security Value | BIL1 OFFICIAL - Authorised Public Release |
Geographic Coordinate System | WGS84 |
Geographic Coverage | Metropolitan Melbourne |