Routes
The routes call returns a list an agency's routes.
Each route record includes the route id, type and real-time flag, and, where provided in the originating data feed, the route color. Routes flagged as "patterned" are skip stop routes with potentially varying stop sequence patterns between trips.
Call format
Part | Description | Optional | Example |
URL | TransiCast web server instance URL | http://transicast.appspot.com/ws/V3 | |
Servlet descriptor | routes | routes | |
Parameter: agency=<agency ID> | Agency ID, as provided by the agencies call | agency=SFMTA |
http://transicast.appspot.com/ws/V3/routes?agency=SFMTA&appid=<api_key>
Response format
Individual routes are returned through the <stop> tag. It contains the following attributes:
Attribute | Description | Key | Used in | Example |
id | Route ID | Stops responses Route detail calls Next bus and train time calls Service Messages | id="1AX" | |
color | Route color | color="339999" | ||
type | Route type. Values are following the definition of route_type in GTFS | type="3" | ||
patterned | Patterned (skip stop) flag | patterned="false" | ||
rt | Flag. true for stops that offer service messages and next bus and train times based on real-time estimates | rt="true" | ||
long | Tag: Route long name, see below |
Where route longnames are defined in the originating data feed, the <route> tag contains a <long> tag with the following attributes:
Attribute | Description | Key | Used in | Example |
name | Route longname | name="ROLLING ROAD - DOWNTOWN EXPRESS" |
<?xml version="1.0" encoding="UTF-8"?> <resultSet queryTime="1319343181700" ct="4"> <route id="1" color="cc6600" type="3" rt="true" patterned="false"> <long name="1-California"/></route> <route id="1AX" color="990000" type="3" rt="true" patterned="false"> <long name="1AX-California A Express"/></route> <route id="1BX" color="cc3333" type="3" rt="true" patterned="false"> <long name="1BX-California B Express"/></route> <route id="2" color="000000" type="3" rt="true" patterned="false"> <long name="2-Clement"/></route> </resultSet>
Notes
- Some agencies are flagged as not providing real-time bus and train departures in the agencies call. The following individual routes provide real-time data:
MBTA Rapid Transit - Red Line, Orange Line, Blue Line NYCT Subway - 1, 2, 3, 5, 6, 7, L NYCT Bus Brooklyn - B61, B63 - The ct element represents the number of unique combinations of route IDs and route longnames.
- The route id element is not a unique element. Individual agencies may maintain multiple instances of routes under a single route ID, differentiated by the route's longname.
Contact
By email  
© 2011 - 2023 TransiCast |