Description Usage Arguments Value See Also
Returns the predicted arrival and departure times for a given trip.
1  |  Tpredictionsbytrip(trip_id, api_key) 
 | 
trip_id | 
 GTFS-compatible trip_id value for which vehicle positions should be returned. Data type: String. Example: "CR-Providence-CR-Weekday-807"  | 
api_key | 
 API key for MBTA API. To obtain one, visit the MBTA Developer Portal (http://realtime.mbta.com/Portal/)  | 
route_id | 
 The unique GTFS-compatible identifier for the route for which vehicle positions are returned. Example: "CR-Providence"  | 
route_name | 
 The human-readable name for the route for which vehicle positions are returned. Example: "Providence/Stoughton Line"  | 
route_type | 
 The GTFS-compatible identifier for the type of service (mode). Example: "2"  | 
mode_name | 
 The human-readable name for the type of service (mode). Example: "Commuter Rail"  | 
trip_id | 
 The unique GTFS-compatible identifier for the trip for which vehicle positions are returned. Example: "CR-Providence-CR-Weekday-815"  | 
trip_name | 
 The human-readable for the trip for which schedule is returned. Example: "815 (4:35 pm from South Station)"  | 
trip_headsign | 
 The text that identifies the trip's destination to passengers. Example: "North Station"  | 
direction_id | 
 The GTFS-compatible identifier for the direction. Example: "0"  | 
direction_name | 
 The human-readable name for the direction. Example: "Outbound"  | 
vehicle_id | 
 The GTFS-compatible unique identifier for the vehicle. Example: "1531"  | 
vehicle_lat | 
 The GTFS-compatible latitude of the vehicle. Example: "42.08997"  | 
vehicle_lon | 
 The GTFS-compatible longitude of the vehicle. Example: "-71.4388"  | 
vehicle_bearing | 
 GTFS-compatable bearing of the vehicle. This can be the compass bearing, or the direction towards the next stop or intermediate location. May be empty. Example: "259"  | 
vehicle_speed | 
 Identifies the vehicle's momentary speed, in meters per second. Example: "21"  | 
vehicle_timestamp | 
 Identifies the moment when the content of this feed has been created, in epoch time. Example: "1400855704"  | 
stop_sequence | 
 Identifies where the stop comes in the sequence of stops for this trip. Example: "2"  | 
stop_id | 
 The GTFS-compatible unique identifier for the stop. Example: "Back Bay"  | 
stop_name | 
 The GTFS-compatible name for the stop. Example: "Back Bay"  | 
sch_arr_dt | 
 Scheduled arrival time at the stop for the trip, in epoch time. Example: "1361986080"  | 
sch_dep_dt | 
 Scheduled departure time at the stop for the trip, in epoch time. Example: "1361986080"  | 
pre_dt | 
 Predicted time at the stop - departure time for origin stop and arrival time for all other stops - for the trip, in epoch time. Example: "1400855700"  | 
pre_away | 
 Predicted amount of time until the vehicle arrives at the stop, in seconds. Example: "339"  | 
Tpredictionsbyroute Tpredictionsbystop 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.