CaBi XML feed location and information
Our Community › Forums › Capital Bikeshare › Capital Bikeshare Software Developers › CaBi XML feed location and information
- This topic has 3 replies, 3 voices, and was last updated 12 years, 1 month ago by
cephas.
-
AuthorPosts
-
February 3, 2012 at 7:41 pm #935697
Kyle Hill
ParticipantIf you liked it, then you shoulda an put an API on it! Oh wait, let’s do that.
This is all stuff I slapped together in a few hours about a year ago, but it still works — bounces off the CaBi XML feed. Use a GET request, it returns JSON. Doesn’t have an API key or rate limiting or anything; just please try to not completely overwhelm my free shared hosting plan? I need it to host my months-out-of-date resume.
Example:
{“hasData”:true,”stationName”:”20th & Bell St”,”latitude”:38.8561,”longitude”:-77.0512,”stationId”:1,”bikesAvailable”,”docksOpen”:8,”isInstalled”:true,”isLocked”:false,”isOnline”:true,”distance”:0}
http://kylehill.net/transit/GetNearestWithBike – returns data about a specific CaBi station.
Mandatory Parameter:
id: Station ID number.http://kylehill.net/transit/GetStations – returns all CaBi Stations, including those locked/deactivated.
Optional Parameters:
lat, lon: Show station’s distance, in as-the-crow-files miles, from current coordinates. (Obviously if you use lat or lon, use both.)
ct: Number of stations to show. Defaults to all.
(http://kylehill.net/transit/GetStations?lat=38.905278&lon=-77.057590&ct=5 shows the nearest five stations from my office front door. I have one literally across the street. Be jealous, kids.)http://kylehill.net/transit/GetNearestWithBike – returns nearest CaBi stations with available bikes.
Mandatory Parameters:
lat, lon: Show station’s distance, in as-the-crow-files miles, from current coordinates.
Optional Parameter:
ct: Number of stations to show. Defaults to all.http://kylehill.net/transit/GetNearestWithDock – returns nearest CaBi stations with available docks.
Mandatory Parameters:
lat, lon: Show station’s distance, in as-the-crow-files miles, from current coordinates.
Optional Parameter:
ct: Number of stations to show. Defaults to all.February 8, 2012 at 7:53 pm #935935dgohlke
ParticipantKyle, I think you should create a new post with this information, as it deserves its own space. I’ll even have some stuff to add to it.
March 26, 2013 at 3:41 pm #965684cephas
Participant@dgohlke 14237 wrote:
Capital Bikeshare uses an XML feed to publish data station data. The feed is located at http://www.capitalbikeshare.com/data/stations/bikeStations.xml
That’s great. I’m surprised it shows the Nannie Helen Burroughs & Minnesota Ave NE station. It’s not yet installed, but set to public. That explains the one white bubble on the map (which I’d been finding odd, as it’s not referenced in the key). It also identified one station as temporary.
-
AuthorPosts
- You must be logged in to reply to this topic.