Route Details
The route details call returns the stops of a route and and their sequence.
Each stop record includes the stop's id, stop code, stop name, coordinates, the stop's predecessors within the route, and data that indicates if the stop is a terminus (last) stop on the route.
The parameter <routename> can be used to filter the result by the route longname. This is effective for agency's that maintain multiple, identical route ID's differentiated by route longname.
Call format
Part | Description | Optional | Example |
URL | TransiCast web server instance URL | http://transicast.appspot.com/ws/V3 | |
Servlet descriptor | termini | termini | |
Parameter: agency=<agency ID> | Agency ID, as provided by the agencies call | agency=CTA | |
Parameter: route=<route ID> | Route ID, as provided by the route list call | route=28 | |
Parameter: trip=<trip ID> | Trip ID, as provided by the departures call. Querying stop details by trip ID returns the sequence of stops of the trip. On patterned (skip stop) routes, expect the pattern of a trip to differ from the route pattern. The route list call indicates if a route is patterned or not. | trip=22554 | |
Parameter: transfers=<flag> | For each stop on the route, include transfer opportunities to other routes. This includes routes of agencies other than the queried route's agency. Transfers are through stops that lie within a 350m radius from the stop on the route. | transfers=true | |
Parameter: routename=<longname> | Query by route longname, as provided by the route list call | routename=CAMDEN - WASHINGTON | |
Parameter: all=<mode> |
This parameter controls how the resulting list of stops is filtered. There are three settings:
|
all=full |
http://transicast.appspot.com/ws/V3/termini?agency=CTA&route=28&appid=<api_key>
Response format
Individual routes are returned through the <route> tag. It contains the following attributes and tags:
Attribute | Description | Key | Used in | Example |
locid | Stop ID, as provided by stops call | Stops, as key value | locid="7131" | |
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" | ||
route | Route ID, as provided by the route list call. In full call mode, the presence of this attribute indicates terminus stops | Route list, as key value | route="28" | |
color | RGB route color, in hexadecimal values. In full call mode, the presence of this attribute indicates terminus stops | color="E12D27" | ||
type | Route type in accordance with the GTFS definition | type="3" | ||
desc | Stop description | desc="Lake Park & 47th Street Terminal" | ||
lat | Stop latitude | lat="41.78601833" | ||
lng | Stop longitude | lng="-87.5864924" | ||
pre | Tag: Stop predecessor on route pattern, see below | |||
transfer | Tag: Transfer opportunities (if requested), see below |
The predecessor stops of a stop are listed with the <pre> tag. It contains the locid attribute that identifies the processor stop.
Attribute | Description | Key | Used in | Example |
locid | Stop ID of the predecessor stop | Stops, as key value | locid="1515" |
The optional transfers are listed with the <transfer> tag. It contains the following attributes and tags:
Attribute | Description | Key | Used in | Example |
agencyid | Agency ID of the transfer stop | Agencies, as key value | agencyid="CTA" | |
locid | Stop ID of the transfer stop | Stops, as key value | locid="15312" | |
loccode | Stop code of the transfer stop | loccode="15312" | ||
desc | Stop description of the transfer stop | desc="Michigan & Cermak" | ||
lat | Latitude of the transfer stop | lat="41.85318625" | ||
lng | Longitude of the transfer stop | lng="-87.62370873" | ||
route | Tag: Transfer route, see below |
Route and destination that run through the transfer stop are listed with the <route> tag. It contains the following attributes:
Attribute | Description | Key | Used in | Example |
routeid | Route ID of the transfer route | Routes, as key value | routeid="4" | |
dest | Destination of the transfer route | dest="Illinois Center" |
<?xml version="1.0" encoding="UTF-8"?> <resultSet queryTime="1319383523699" ct="58"> <stop locid="70061" loccode="" route="Red Line" color="E12D27" type="1" desc="Alewife Station" lat="42.395428" lng="-71.142483"> <pre locid="70064"/> </stop> <stop locid="70063" loccode="" desc="Davis Station" lat="42.39674" lng="-71.121815"> <pre locid="70061"/> </stop> <stop locid="70065" loccode="" desc="Porter Square Station" lat="42.3884" lng="-71.119149"> <pre locid="70063"/> </stop> <stop locid="70067" loccode="" desc="Harvard Square Station" lat="42.373362" lng="-71.118956"> <pre locid="70065"/> </stop> <stop locid="70069" loccode="" desc="Central Square Station" lat="42.365486" lng="-71.103802"> <pre locid="70067"/> </stop> . . . <stop locid="70276" loccode="" desc="Mattapan Station" lat="42.267762" lng="-71.092241"> <pre locid="70276"/> </stop> </resultSet>
Contact
By email  
© 2011 - 2023 TransiCast |