TransiCast - API Documentation
The TransiCast Web Service breaks down into six calls:
agency list,
stops,
routes,
route details,
next bus and train times and
service messages. The TransiCast Web Service is XML based, and uses REST GET method calls. Responses in JSON are provided on request.
For test purposes, please feel free to use the test application ID appid=sample522are3 and calls to the general TransiCast transit data server at (http://transicast.appspot.com/ws/V3). This opens all API calls, and the transit data loaded on the general TransiCast transit data server. Please add the test application ID as the last parameter of the call. User facing release of your product or service requires an application ID on a TransiCast production plan. Separate transit data licensing requirements of transit agencies may also apply. Please contact us for more information. |
The current version of the TransiCast API is /V3.
General call format
The general call format of API calls consists of four parts:
- TransiCast web server address: http://<yourapp>.appspot.com/ws/V3
- The identifier of the servlet of an API call
- Required and optional request parameters such as WGS-84 coordinates (lat/lon), stop numbers and route numbers
- appid license key issued by TransiCast
http://transicast.appspot.com/ws/V3/agencies?ll=41.727122,-87.55947&appid=sample522are3
General response format
The responses of the TransiCast Web Service are in XML. They are wrapped in a <ResultSet> tag which contains the following two attributes:
- queryTime: Server time of the request
- ct: Number of records that the call returns without filters
<?xml version="1.0" encoding="UTF-8"> <resultSet queryTime="1319328820274" ct="2"> <agency region="NA" country="CA" name="GO Ontario" top="44.44" left="-80.55" bottom="43.09" right="-78.28" stopcodes="false"/> <agency region="NA" country="CA" common="Toronto" name="TTC" rt="true" top="43.92" left="-79.66" bottom="43.6" right="-79.11" stopcodes="true"/> </resultSet>
TransiCast uses the following formats and encodings:
- Requests are case sensitive
- Coordinates are WGS-84 decimal values
- Times are in elapsed milliseconds since midnight, January 1, 1970 UTC
- Special characters contained in result strings are HTML encoded
- Color values are RGB encoded, using hexadecimal values
- If a flag element is not included in a response, the default value of "false" is assumed. A return value of "" indicates an unknown flag value.
JSON
Responses in JSON can be requested with the optional parameter format=json.
http://transicast.appspot.com/ws/V3/agencies?ll=41.727122,-87.55947&format=json&appid=sample522are3
Error handling
TransiCast returns errors in XML, using the error tag to provide a description of the error. As an example, the following call is not well formatted, and will trigger a data format error:
http://transicast.appspot.com/ws/V3/stops?max=4&appid=sample522are3&meters=1300&ll=%5Bapp:user-lat%5D,%5Bapp:user-lon%5D
Contact
By email  
© 2011 - 2017 TransiCast |
![]() |