Next bus and train times
The call for next bus and train times returns the predicted next bus and train times for a list of stops.
Each next bus and train time record includes the time prediction, block number, destination, route and, where available, heading and vehicle location.
Call format
| Part | Description | Optional | Example |
| URL | TransiCast web server instance URL | http://transicast.appspot.com/ws/V1 | |
| Servlet descriptor | arrivals | arrivals | |
| Parameter: agency=<agency name> | Agency name, as provided by the agencies call | agency=Los Angeles Metro | |
| Parameter: locIDs=<stop id, ... > | Comma separated list of stop IDs, as provided by the stops call | locIDs=11918,3429 | |
| Parameter: routes=<route id, ... > | Comma separated list of Route IDs, as provided by the route list call | routes=45,45,83,83,834 |
http://transicast.appspot.com/ws/V1/arrivals?locIDs=11918,3429&routes=45,45,83,83,834&agency=Los%20Angeles%20Metro&appid=sample0
Response format
The call for next bus and train times first returns the list of stops through the <location> tag.
Following the locations, the individual predicted vehicles are returned through the <arrival> tag. It contains the following attributes:
| Attribute | Description | Key | Used in | Example |
| block | Service block | block="1244" | ||
| status | Estimation status. Use estimated tag if the value of status is estimated. Use scheduled tag if the value of status is scheduled | status="estimated" | ||
| estimated | Estimated time of departure | estimated="1319425765837" | ||
| scheduled | Scheduled time of departure | scheduled="1319426000000" | ||
| fullSign | Full destination string | fullSign="45 North to Lincoln Heights" | ||
| route | Route ID, as provided by the route list call | Route list, as key value | route="45" | |
| shortSign | Full destination string | shortSign="45 North to Lincoln Heights" | ||
| locid | Stop ID that identifies the predicted stop, as provided by the stops call | Stops, as key value | locid="11918" | |
| detour | Flag. true if the predicted vehicle is operating on a detoured route | detour="false" |
Where vehicle locations are available, the <arrival> tags contains a <blockPosition> tag with the following attributes:
| Attribute | Description | Key | Used in | Example |
| heading | Vehicle heading in degrees off North | heading="30" | ||
| lat | Vehicle latitude | lat="33.943523" | ||
| lng | Vehicle longitude | lng="-118.27845" |
<?xml version="1.0" encoding="UTF-8"?> <resultSet queryTime="1319425536165" ct="3"> <location locid="11918"/> <location locid="3429"/> <arrival block="7409626" estimated="1319425765837" fullSign="45 North to Lincoln Heights" route="45" shortSign="45 North to Lincoln Heights" status="estimated" locid="3429" detour="false"> <blockPosition heading="30" lat="34.04995" lng="-118.249184"> </blockPosition> </arrival> <arrival block="7406874" estimated="1319425899200" fullSign="83 North to York-Eagle Rock" route="83" shortSign="83 North to York-Eagle Rock" status="estimated" locid="3429" detour="false"> <blockPosition heading="30" lat="34.044395" lng="-118.255867"> </blockPosition> </arrival> <arrival block="7406884" estimated="1319426942011" fullSign="84 South to The Shops At Montebello Via Downtown LA" route="84" shortSign="84 South to The Shops At Montebello Via Downtown LA" status="estimated" locid="11918" detour="false"> </arrival> </resultSet>
Notes
- • If not provided by the original agency feed, TransiCast / Rasa might fill in block numbers automatically
- • TransiCast / Rasa returns the detour status as false where the original agency feed does not provide a route based detour status
- • Although some original feeds do not require routes as a query parameter for next bus and train times, others do. In the aggregate, TransiCast / Rasa requires the routes parameter for all calls. As original feeds may not need this parameter, and return next buses or trains times of all routes, TransiCast / Rasa directly returns the content of the original feed, including next buses and trains of routes that may not have been requested in the call
Contact
By email  
| © 2011, 2012 Joachim Pfeiffer |
|
