Stop Details


The stop details call returns the details of stops, based on a list of stop IDs or stop codes. The response format is identical to the stops call.

Call format


PartDescriptionOptionalExample
URLTransiCast web server instance URLhttp://transicast.appspot.com/ws/V2
Servlet descriptorstopdetailsstopdetails
Parameter:
agency=<agency ID>
Agency ID, as provided by the agencies callagency=CTA
Parameter:
locIDs=<stop ID, ...>
Comma separated list of stop IDslocIDs=2337
Parameter:
loccodes=<stop code, ...>
Alternative to stop ID. Comma separated list of stop codes, as published by the agency
+
loccodes=14505
Parameter:
routes=<route IDs>
Route IDs, as provided by the route list callroute=28

http://transicast.appspot.com/ws/V3/stopdetails?agency=NYCT Subway&locIDs=H01N&routes=A&appid=s<api_key>

Response format


The response format is identical to the format of the stops call. The <resultSet> tag of a stopdetails response contains two additional attributes, <queryLat> and <queryLon>, containing the query coordinates of the call.
Individual stops are returned through the <location> tag. The tag contains the following attributes:

AttributeDescriptionKeyUsed inExample
descStop descriptiondesc="Market & Steuart"
latStop latitude (WGS-84)lat="37.7944499"
lngStop longitude (WGS-84)lng="-122.39492"
locidStop ID
+
Next bus and train times
Route detail responses
Service Messages
locid="37227"
loccodeTraveler facing stop code. Stop codes are often printed on stop signage or included in handout schedules to make it easier for travelers to request a stop schedule or real-time arrival information for a particular stop.loccode="137227"
parentStop ID of stop's parent, if it existsparent="stoparea:11652"
URLStop URLURL="http://hea.thebus.org/nextbus.asp?s=346"
location_typeLocation type, in accordance with the GTFS definitionlocation_type="1"
desc2Alternative stop description, if provided by the agency
agencyAgency ID for the stopAgencies, as key valueagency="SFMTA"
rtFlag. true for stops that offer service messages and next bus and train times based on real-time estimatesrt="true"
typeRoute type. Values are following the definition of route_type in GTFStype="3"
destTag: Routes and destinations that service the stop, see below
childTag: Child stop, see below

Routes and the destinations of the trips servicing a stop are provided through the <dest> tag, which is nested inside <location>:

AttributeDescriptionKeyUsed inExample
routeRoute IDRoute, as provided in the route listid="2"
descDestinationDestinations of the trips servicing the stopdesc="Inbound to Market & Steuart St."

Where the original feeds provide stop parent/child relationships. Parent stops are included in the response as a collection of children stops. The <child> tag lists the children:

AttributeDescriptionKeyUsed inExample
locidStop ID of the childStop ID of the child stoplocid="33979"

Parents do not have associated routes. This means that next bus and train times cannot be called using a stop ID of a parent.
<?xml version="1.0" encoding="UTF-8"?>
<resultSet queryTime="1319338341769" ct="5" queryLat="37.794543" queryLng="-122.394922">
<location desc="Market & Steuart" dir="" lat="37.7944499" lng="-122.39492" locid="37227" loccode="137227" agency="SFMTA" rt="true">
	<dest route="2" desc="Inbound to Market & Steuart St." type="3"/>
</location>
<location desc="Market & Steuart" dir="" lat="37.7944499" lng="-122.39492" locid="7227" loccode="71227" agency="SFMTA" rt="true">
	<dest route ="2" desc="Outbound to Clement & 14 Ave" type="3"/>
</location>
<location desc="Market St & Steuart St" dir="" lat="37.7942599" lng="-122.39491" locid="5693" loccode="15693" agency="SFMTA" rt="true">
	<dest route="N OWL" desc="Inbound to Townsend & 4th St." type="3"/>
	<dest route="N OWL" desc="Outbound to La Playa & Judah" type="3"/>
	<dest route="14L" desc="Inbound to Mission St. & Main" type="3"/>
	<dest route="T OWL" desc="Inbound to Visitacion Valley" type="3"/>
	<dest route="14X" desc="Inbound to Mission St. & Spear St." type="3"/>
	<dest route="14" desc="Inbound to Steuart & Mission" type="3"/>
</location>
</resultSet>

© 2011 - 2023 TransiCast