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 ID, trip ID, destination, route and, where available, heading and vehicle location.

Call format

URLTransiCast web server instance URL
Servlet descriptorarrivalsarrivals
agency=<agency ID>
Agency ID, as provided by the agencies callagency=Los Angeles Metro
locIDs=<stop id, ... >
Comma separated list of stop IDs, as provided by the stops calllocIDs=11918,3429
routes=<route id, ... >
Comma separated list of Route IDs, as provided by the route list callroutes=45,45,83,83,834
Timezone in Java TimeZone formatdbgETA=America/Los_Angeles,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 and tags:

AttributeDescriptionKeyUsed inExample
blockService blockblock="1244"
tripService triptrip="52229"
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"
dbgETAIf dbgETA set in request: Time of departure in clear textdbgETA="Sat, Aug 10, 2013 10:55:05 AM PDT"
routeRoute ID, as provided by the route list callRoute list, as key valueroute="45"
destTrip destinationdest="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=""
blockPositionTag: Block position, see below

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

AttributeDescriptionKeyUsed inExample
headingVehicle heading in degrees off Northheading="121.5"
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" route="45" dest="North to Lincoln Heights" status="estimated" locid="3429" detour="">
	<blockPosition heading="30.8" lat="34.04995" lng="-118.249184"> </blockPosition>
<arrival block="7406874" estimated="1319425899200" route="83" dest="North to York-Eagle Rock" status="estimated" locid="3429" detour="">
	<blockPosition heading="30.2" lat="34.044395" lng="-118.255867"> </blockPosition> 
<arrival block="7406884" estimated="1319426942011" route="84" dest="South to The Shops At Montebello Via Downtown LA" status="estimated" locid="11918" detour="">



By email  

© 2011 - 2017 TransiCast

Powered by Google App Engine