This portion of the web service describes scheduling information. Under all circumstances, this is predictive data. It is based on the real-time information described by the Metro system for each route - not fixed schedule information.
It's important to understand that the API is dependent on the Metro's scheduling service. If the Metro's service is down, so are we. I'm going to do my best to differentiate the difference between "no buses running" and "service unavailable" but there are no guarantees.
Name | Value | Description |
---|---|---|
key | String (required) | API access key |
stopID | String | A four-digit value describing a valid stop in the Metro system. |
routeID | String | A two-digit value describing a valid route in the Metro system. If routeID is specified, either stopID or vehicleID must also be specified in the request. |
vehicleID | String | A three-digit value describing a valid bus vehicle in the Metro system. If vehicleID is specified, routeID must also be specified in the request. |
https://api.smsmybus.com/v1/getarrivals?key=xxx&stopID=1101
Retrieve the arrival estimates for route 19 buses traveling through stop 1101:
https://api.smsmybus.com/v1/getarrivals?key=xxx&stopID=1101&routeID=19
Retrieve the arrival estimates for future stops of the route 19 bus identifies as #915:
https://api.smsmybus.com/v1/getarrivals?key=xxx&routeID=19&vehicleID=915
The following results example is for a single stopID.
{
"status" : "0",
"timestamp" : "12:38pm",
"stop" : {
"stopID" : "1101",
"route" : [{
"routeID" : "4",
"vehicleID" : "993",
"human" : "Route 4 toward STP arrives in 10 minutes",
"minutes" : "10",
"arrivalTime" : "12:44pm",
"destination" : "STP",
},
{
"routeID" : "3",
"vehicleID" : "433",
"human" : "Route 3 toward ETP arrives in 12 minutes",
"minutes" : "12",
"arrivalTime" : "12:46pm",
"destination" : "ETP",
},
...
...
]},
...
...
}
If a vehicleID is specified, multiple stops will be returned.
{
"status" : "-1",
"description" : "Invalid request parameters",
}