Chicago Transit API
Please note: This post was written some time ago (16 years ago). My perspectives, knowledge, and opinions may have evolved significantly since then. While the content might still offer valuable insights, I encourage readers to consider it in the context of its publication date.
I have been working hard to release the work that I have been doing to expose some of the more interesting real time data about chicago transit. Currently it is very bus-centric, but that is hopefully changing.
The genesis for this API is some work I did awhile ago reverse engineering the CTA Bus Tracker mashup. I was able to expose the endpoints that powered their google maps mashup. In its original state - you can get some pretty awesome functionality and data. I am attempting to clean it up and make it more robust.
The native endpoints thus far are:
- getRoutePoints: Returns latitude/longitude, stop IDs, and stop names for bus stops along a particular route.
- getPatternPoints:
- getStopPredictions: Gets stop predictions. Timing and whatnot.
- getBusPredictions: Returns arrival predictions for a particular bus.
- getBusesForRoute: Gets buses for specific route
- getBusesForRouteAll: Gets information about every bus in the system.
- Schedule: Download the Schedule (pdf! w00t)
- getTimeAndTemp: Outputs the current time and temp
I also did some work to push the UPOC alerts from the CTA riders community into a usable form. That endpoint is the first of hopefully many that can be used to grab real time information about the CTA. You can access it at:
- Community Upoc alerts: Outputs the last alert sent from the UPOC group
Moving forward with the API, I want to do a couple key things. The first is to return JSON instead of that terrible XML. The second is to create a couple endpoints that will help with finding the right bus at the right location. I am always looking for help with this stuff - so if you have any ideas - please let me know in the comments.
So far, there are not a whole lot of applications using this API. The only ones I have thus far are:
If you know of any others - let me know. I have a couple projects brewing myself that will hopefully add a shortcode, and a jabber bot for bus notifications and queries. Are there any things yall would like to see? I personally want a really solid native iphone app. It would be awesome to be able to have the iphone pinpoint your location and then tell you what the nearest buses are that are arriving soon. Also - replicating the bus tracker in an easier to use fashion would be excellent.All of this API work wouldn’t have been possible without the help of Dylan Richard, Dan X O’Neil and Kevin Zolkiewicz. The CTA has also been amazingly cool with all of this - I really like those guys.
#chicago-transit #public-transportation #real-time-data #api-development #bus-tracker