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


PartDescriptionOptionalExample
URLTransiCast web server instance URLhttp://transicast.appspot.com/ws/V1
Servlet descriptorarrivalsarrivals
Parameter: agency=<agency name>Agency name, as provided by the agencies callagency=Los Angeles Metro
Parameter:
locIDs=<stop id, ... >
Comma separated list of stop IDs, as provided by the stops calllocIDs=11918,3429
Parameter:
routes=<route id, ... >
Comma separated list of Route IDs, as provided by the route list callroutes=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:

AttributeDescriptionKeyUsed inExample
blockService blockblock="1244"
statusEstimation status. Use estimated tag if the value of status is estimated. Use scheduled tag if the value of status is scheduledstatus="estimated"
estimatedEstimated time of departureestimated="1319425765837"
scheduledScheduled time of departurescheduled="1319426000000"
fullSignFull destination stringfullSign="45 North to Lincoln Heights"
routeRoute ID, as provided by the route list callRoute list, as key valueroute="45"
shortSignFull destination stringshortSign="45 North to Lincoln Heights"
locidStop ID that identifies the predicted stop, as provided by the stops callStops, as key valuelocid="11918"
detourFlag. true if the predicted vehicle is operating on a detoured routedetour="false"

Where vehicle locations are available, the <arrival> tags contains a <blockPosition> tag with the following attributes:

AttributeDescriptionKeyUsed inExample
headingVehicle heading in degrees off Northheading="30"
latVehicle latitudelat="33.943523"
lngVehicle longitudelng="-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

Contact

By email  

© 2011, 2012 Joachim Pfeiffer

Powered by Google App Engine