SMSMyBus exposes its data via a programming interface. This page describes that interface.

Kiosk Kit

December 11, 2011
I recently got a request to create another kiosk display like the one shown at Mother Fool's coffee house and Sector67. Rather then build another one by hand, I went ahead and created a template that enables anyone to display a custom kiosk.

Very similar to the Google Gadget, there is a single URL that anyone can point their browser at to view real-time arrival estimates for any two stops in the Metro system.

https://smsmybus.com/kiosk?s=0100,0161&d=WORK,HOME

The two, four digit numbers after the 's=' string in that URL indicate the stop IDs to display. The two direction labels are optional, but if you include them, order matters. They should correspond to the stops listed.

Enjoy!

API snags a giant new user

September 10, 2011
Over a year ago, I smiled when I found SMSMyBus getting repurposed in the form of a kiosk at the Mother Fool's Coffeehouse. I wrote then about the personal satisfaction of seeing a pet project growing into something bigger.

Well, last week, that satisfaction blossomed into gratification when I learned that the University of Wisconsin had included the SMSMyBus API in the latest version of their app released for the 2011 academic year. Now students using the app can get real time bus arrival estimates throughout the city rather than relying on the fixed schedule right from their iPhone and Android devices.

Mostly because this is exactly the kind of application that can get the attention of the Metro and the City of Madison as an example of what can be accomplished if more public data becomes accessible in an easy to consume (programmable APIs) interface.

Super proud.

Metro Bus Kiosk

April 23, 2011
The very first iteration of the API - never released - was a total hack and was not only hard coded for a handful of Metro stops. But it utilized inside knowledge of how the SMS app was built to make the data accessible. While it may have been a wart, it made the data available and produced the very first Metro bus kiosk at Mother Fool's Coffehouse.

When the real API was produced, the goal was to replace those legacy implementations with native API implementations. That's now been done and rolled out to all of the various businesses deploying a kiosk. You can see the Mother Fool's kiosk here and the Sector67 kiosk here.

If you'd like to deploy your own, feel free to use these as a starting point. They are good examples for consuming the API in JavaScript. You can find the example code on the github repo - https://github.com/gtracy/smsmybus-dev. Enjoy!

Google Gadgets!

April 17, 2011
Gadget example One of the very first uses of the API was to create a Google Gadget that displays the arrival times right inside your Gmail window. But it never really worked quite right so it wasn't published. But now it's been cleaned up!

So with the help of a little XML, JavaScript and of course the API, you can now get bus arrival estimates for your favorite Metro stops alongside your chat sessions and gmail folders! This post provides some instructions for adding the gadget.

1. Open up your gmail settings.

2. Select the 'Gadgets' tab.

3. Add the XML path of the gadget to the text field using the desired stop ID number in the URL path. For example, for the eastbound stop outside of Trader Joe's, I would add, https://www.smsmybus.com/gadgets/metro/2749.xml


Gadget instructions image


To specify a different stop, just replace '2749' with your own four digit stop ID. And don't worry, you can always check other stops from inside the gadget once it loads.

That's it! Interested in changing this? I've posted the xml on github if you'd like to use it as a starting point - https://github.com/gtracy/smsmybus-dev.