SORTA’s Real-time API Now Available for Developers

January 25th, 2015

Yep. It’s finally here! :-D

Vehicle location feed:
http://developer.go-metro.com/TMGTFSRealTimeWebService/vehicle
Trip update feed:
http://developer.go-metro.com/TMGTFSRealTimeWebService/TripUpdate

The data is structured according to the GTFS real-time specification. I was able to parse it pretty easily in Python by following the instructions on that page. The fields currently included in the feed (many are optional in the specification) are as follows.

VehicleLocation feed sample data:

id: "4001"
vehicle {
  trip {
    trip_id: "940867"
  }
  position {
    latitude: 39.1043395996
    longitude: -84.3908996582
  }
  timestamp: 1421889007
  vehicle {
    label: "4001"
  }
}
...

TripUpdate feed sample data:

id: "938755"
trip_update {
  trip {
    trip_id: "938755"
    start_time: "17:07:00"
    start_date: "20150121"
    route_id: "1"
  }
  stop_time_update {
    stop_sequence: 5
    departure {
      delay: 60
      time: 1421878357
    }
    stop_id: "EZZJOHe"
  }
...
  stop_time_update {
    stop_sequence: 32
    arrival {
      delay: 60
      time: 1421880000
    }
    stop_id: "PAR2610e"
  }
  vehicle {
    label: "1001"
  }
}
...

The feeds update every 30 seconds, which seems a little slow, but oh well.

Right now, my understanding is that these feeds have been tentatively released as-is for developers only, and that SORTA is not ready yet to make a general public announcement that real-time data is available. Tim Harrington at SORTA, who shared the links with us, has politely asked to see the neat stuff that we’re able to develop with this data. I imagine that the sooner someone sends him a link to a decent, working app, the sooner they’ll give us the go-ahead and the sooner we’ll all be able to use this data in every-day situations.

So who’s gonna make an app? There must be a dozen open-source applications that are already designed to work with GTFS-realtime. We probably just need to plug this feed in and maybe make a few localization tweaks. If you or anyone you know has the skills and/or interest to make an app…then for the love of transit, let’s make this happen ASAP!

12 responses to “SORTA’s Real-time API Now Available for Developers”

  1. John says:

    Did Tim mention publishing this data feed to Google Maps? They have the feeds (vehicle positions and trip updates) all set up properly to integrate with Google Maps: https://developers.google.com/transit/gtfs-realtime/

    • Nate Wessel says:

      Not to my knowledge. My impression is that you kind of have to spoon feed them these things. You should send him an email! I would, but I seem to have a reputation around the office there…

  2. Kenneth Fechter says:

    Myself and a group of students at the University of Cincinnati are interested in making apps for this. How would we go about testing with this data?

    • Nate Wessel says:

      Well, the APIs are live and reporting what looks to me like legit data, so technically you can just do it. Tim did mention though that they may be ‘working on it’ (or something like that) in the next few weeks though, so I wouldn’t be surprised if it wasn’t perfectly stable before a big public announcement from SORTA. I’m not sure if there is anything that could be removed from the data, but maybe they’ll add another field or two??

      If you mean socially, I think that Tim is just asking that he be notified before anything goes out to a general audience so they can make sure the data and/or agency aren’t being misrepresented.

      • Kenneth Fechter says:

        sweet. just trying to figure out how to read the GTFS data in java right now.

        probably would be a while before we had anything ready to go public.

        thanks for the info, and we’ll make sure to contact the proper parties before going public with any apps.

  3. […] SORTA Releases Real-Time API Data for Developers (Cincinnati Transit Blog) […]

  4. Shiva Charan says:

    I have made website to track Cincinnati’s buses real-time
    http://www.cincibus.com

  5. […] many other transit operators throughout the nation, to open up their data to the public. But just four months after opening the data, the region’s largest transit agency is now the beneficiary of a free real-time bus tracking […]