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.

Please contact TransiCast for an APi key.


The current version of the TransiCast API is /V3.

General call format


The general call format of API calls consists of four parts:

As an example, the following call to the general TransiCast web server instance, using a sample appid, calls the agency list for a location as determined by the call parameters lat and lon:
http://transicast.appspot.com/ws/V3/agencies?ll=41.727122,-87.55947&appid=<api_key>

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: As an example, the sample call above may return the following response:
<?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:

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=<api_key>

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=<api_key>&meters=1300&ll=%5Bapp:user-lat%5D,%5Bapp:user-lon%5D

Contact

By email  

© 2011 - 2023 TransiCast