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
Part | Description | Optional | Example |
URL | TransiCast web server instance URL | http://transicast.appspot.com/ws/V2 | |
Servlet descriptor | stopdetails | stopdetails | |
Parameter: agency=<agency ID> | Agency ID, as provided by the agencies call | agency=CTA | |
Parameter: locIDs=<stop ID, ...> | Comma separated list of stop IDs | locIDs=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 call | route=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:
Attribute | Description | Key | Used in | Example | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
desc | Stop description | desc="Market & Steuart" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lat | Stop latitude (WGS-84) | lat="37.7944499"lng | Stop longitude (WGS-84) | lng="-122.39492" | locid | Stop ID | Next bus and train times | Route detail responses Service Messages locid="37227" | loccode | Traveler 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" | parent | Stop ID of stop's parent, if it exists | parent="stoparea:11652" | URL | Stop URL | URL="http://hea.thebus.org/nextbus.asp?s=346" | location_type | Location type, in accordance with the GTFS definition | location_type="1" | desc2 | Alternative stop description, if provided by the agency | agency | Agency ID for the stop | Agencies, as key value | agency="SFMTA" | rt | Flag. true for stops that offer service messages and next bus and train times based on real-time estimates | rt="true" | type | Route type. Values are following the definition of route_type in GTFS | type="3" | dest | Tag: Routes and destinations that service the stop, see below | child | Tag: 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>:
Attribute | Description | Key | Used in | Example |
route | Route ID | Route, as provided in the route list | id="2" | |
desc | Destination | Destinations of the trips servicing the stop | desc="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:
Attribute | Description | Key | Used in | Example |
locid | Stop ID of the child | Stop ID of the child stop | locid="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 |