I want an API for Edmonton Transit (ETS)

edmonton transit When the new edmonton.ca website launched back in the fall, I was hopeful that the Edmonton Transit portion of the site would receive more than just a facelift. Unfortunately, that didn’t happen. Though I’m disappointed, I can understand why. Edmonton Transit is not in the business of developing websites or software, it’s in the business of transportation. They’ve got to make sure buses and trains run efficiently and effectively first, and then they can focus on everything else.

That’s not to say that the website, or BusLink (over the phone), or the other services they offer aren’t important, just that ETS has limited resources and must deploy them accordingly. That’s why I think an Edmonton Transit API makes a lot of sense.

To build an application for looking up transit information, you need both an interface and data (I’m simplifying things a bit). ETS has all of the data of course – they know all of the route numbers, bus stops, and schedule information. What they lack are great interfaces. If ETS exposed their data through an API, third party developers could build great interfaces on top with relative ease.

Here’s the kind of information I’d like to see exposed through an ETS API:

  • Route Information – return name, start and end point, and other details for a given route
  • Stop Information – return coordinates, address, photo, and other information for a given stop
  • Route Stops with Stop Times – return a list of all stops along a given route with stop times
  • Routes at Stop with Times – return a list of routes for a given stop with stop times for each one
  • Search for Stop by Location – return the closest stops for a given address or set of coordinates

That list is similar to the information exposed by the unofficial TransLink API. A good starting point would be to simply clone what they’ve done! More advanced API features could include:

  • Route Interruptions – return a list of routes currently affected by construction or other interruptions
  • Stop Interruptions – return a list of stops currently affected by construction or other interruptions
  • Search for Stop by Landmark – return the closest stops for a given landmark
  • Trip Planner – return a list of route and transfer options for a given location of origin and destination
  • Information for St. Albert Transit and Strathcona County Transit

In the future, the sky is the limit. I know ETS is testing GPS technology on buses, so why not expose “distance from stop” information for a given route? That would be wicked, and incredibly useful when the weather dips below –25 C.

It’s not feasible for ETS to develop interfaces for each new platform that emerges. They have a website, but what about an iPhone application? Or a BlackBerry application? Or a Twitter bot? If they focused their limited software development energies on building an API, I’m confident that local entrepreneurs and software developers would build a plethora of interfaces on top of it. I would definitely build a Twitter bot!

There don’t seem to be many transit systems with APIs available, but that won’t be true for long. Here are a few others I’ve found: TransLink (unofficial), Bay Area Rapid Transit (official), Portland’s TriMet (official), Chicago Transit Authority (unofficial), Charlottetown Transit (unofficial). And here are a couple other resources I’ve come across: the Public Transit Openness Index, and a list of publicly available official GTFS (Google Transit Feed Specification) schedule data feeds.

I’d love to see Edmonton Transit take the lead and offer a completely free, fully functional transit API, and I’d be willing to help make it happen. In the meantime, don’t forget that you can now use Google Maps to find ETS trip plans.

  • I’ve been looking up trips through my Google Maps app on my cell phone since the beginning of December. It works really well but isn’t always the most accurate.

  • Kaleb D

    This is an amazingly common gripe amongst my peers and I… An api would be great if for no other reason than we’d feel empowered to do something about it.

  • Rob

    I wonder how Google gets the info to put on Google Maps….?

  • Rob

    Wow, BART has a sense of humor…

    “Getting an API key
    Psyche: you don’t need one. We’re opting for “open” without a lot of strings attached. Just follow our simple License Agreement, give our customers good information and don’t hog resources. If that doesn’t work for you, we can certainly manage usage with keys and write more terms and conditions. But who wants that?”

    Something you don’t see often out of gov orgs

  • Rob – they worked with ETS to get the data. I suspect ETS already has a GTFS feed available somewhere.

  • Rob

    You should send an email to ETS. Maybe they want to give an API/Feed, but don’t know people like you want it

  • Grant B

    Aw damnit, I just spent 10 minutes writing a billion-page rant wholeheartedly agreeing with you and thanking you for reading my mind (I’m pretty sure I’m to whom Kaleb refers above), but then my firefox ate it.
    Basically, it said that there are lots of features I would love and really irk my by their non-existence, and I would be so willing to write my own and give it for free to the Edmonton community if they would just expose some sort of access…
    And that we should start a facebook group to campaign for it. Maybe it IS an issue of them not realizing people care about it?

  • Rob

    Why start a facebook group that they don’t know about? It’s not like ETS’s IT people are sitting on facebook searching for groups about them.

    Write a well-written email and send it to anyone and everyone who might have say in this (Councilors, City Admin, etc)

  • I don’t have details yet, but there WILL be an excellent opportunity to share this with ETS and the City in a few months. I’ll keep you posted. In the meantime, feel free to email this post to ETS 🙂

  • Ah, I missed this.

    Definitely, definitely build something. I wish they had an API for us to do something about this issue. I haven’t used Trip Planner in a very, very long time, but since I saw that it was the same as it was then when I first did it, I ran.

    I would suggest hitting news publications around town as well for this issue as it would raise awareness for the Edmonton and the surrounding area.

  • Amen! I would get an smartphone if only this was possible.

  • James

    and I thought I was alone… sorry to say but they SHOULD have web-services! For the amount of code they have written this should be a given!

    For all the code in aspx at their website, the code for such services exist, (has been written), they did’nt make that a goal (providing web services). If this was their first website then I would be at ease, however it is not.

    If the bus info is in a database it would be simple – I would work for free to make that happen!

    I would trade modex and wifi in for published webservices and gps’d bus stops (fed’s or the province hire a student(s) to collect the information – cool summer job eh).

    My windows client app works well but would be so much better with webservices and gps data!