TransLink API

 

So, TransLink released an iPhone app! The app is written with phoneGAP, and I noticed that visiting m.translink.ca on an iPhone gives you the same interface as the app, minus the geo-location. I pulled up the wesbite in Safari, and it turns out the browser-sniffing treats Safari as an iPhone without even needing to change the user agent. I poked around in the website, using the Safari Activity window to monitor the ajax requests and seem to have stumbled across an official, private JSON-based API for accessing TransLink schedule data.

Initially, I thought I would sit on the discovery, but after reading about a similar API being unofficially opened-up in Chicago on Joe Hughes's blog, I have decided to share my findings. This may not be the complete API, but it is what I have uncovered. If you find something I am missing, or have wrong, let me know and I will update this page. Please be gentle on the translink servers and do not abuse this information.