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

parking

Overview

The parking API provides real-time parking data from both the City of Madison Parking Utility and the UW Transportation Service. In addition to lot availability, API consumers can include current or future special events for a given lot which aides in detecting potential changes to the lot's payment policy.

URL

https://api.smsmybus.com/parking/v2/lots

Parameters

Name Value Required Description
expand specialevents No If "expand=specialevents" is included as a query string parameter, any current or future special event(s) that apply to a given lot will be embedded in the lot payload as members of the specialEvents collection.

Example 1: GET all parking lots without special events (no parameters)

GET https://api.smsmybus.com/parking/v2/lots

Response

{ "lots": [ { "name": "Capitol Square North Garage", "shortName": "north", "totalSpots": 613, "openSpots": 301, "operatedBy": "city", "webUrl": "https://www.cityofmadison.com/parkingUtility/garagesLots/facilities/capSquareNorth.cfm", "address": { "postalCode": "53703", "city": "Madison", "state": "WI", "street": "218 East Mifflin Street" }, "coordinates": { "lat": 43.077627, "lng": -89.38321499999999 }, "entrances": [ "100 North Butler Street", "200 East Mifflin Street", "100 North Webster Street" ] }, { "name": "University Bay Drive Ramp", "shortName": "76", "totalSpots": 1290, "openSpots": 40, "operatedBy": "uw", "webUrl": "https://fpm-www1.fpm.wisc.edu/smomap/lot.aspx?lot=76", "address": { "postalCode": "53705", "city": "Madison", "state": "WI", "street": "2501 University Bay Drive" }, "coordinates": { "lat": 43.0813065, "lng": -89.4282504 }, "entrances": [ ] }, ... ] }

Example 2: Get all parking lots including current and future special events for given lots.

GET https://api.smsmybus.com/parking/v2/lots?expand=specialevents

Response

{ "lots": [ { "name": "Capitol Square North Garage", "shortName": "north", "totalSpots": 613, "openSpots": 301, "operatedBy": "city", "webUrl": "https://www.cityofmadison.com/parkingUtility/garagesLots/facilities/capSquareNorth.cfm", "address": { "postalCode": "53703", "city": "Madison", "state": "WI", "street": "218 East Mifflin Street" }, "coordinates": { "lat": 43.077627, "lng": -89.38321499999999 }, "entrances": [ "100 North Butler Street", "200 East Mifflin Street", "100 North Webster Street" ], "specialEvents": [ { "eventName": "Graduation - Madison East & Madsion LaFollette", "eventVenue": "Kohl Center", "webUrl": "https://www.cityofmadison.com/parkingUtility/calendar/index.cfm", "eventDatetime": "2014-06-13T17:00:00", "parkingStartDatetime": "2014-06-13T15:00:00", "parkingEndDatetime": "2014-06-13T19:35:00" } ] }, { "name": "University Bay Drive Ramp", "shortName": "76", "totalSpots": 1290, "openSpots": 40, "operatedBy": "uw", "webUrl": "https://fpm-www1.fpm.wisc.edu/smomap/lot.aspx?lot=76", "address": { "postalCode": "53705", "city": "Madison", "state": "WI", "street": "2501 University Bay Drive" }, "coordinates": { "lat": 43.0813065, "lng": -89.4282504 }, "entrances": [ ], "specialEvents": [ { "eventName": "WIAA Boys Individual Tennis", "eventVenue": null, "webUrl": "https://transportation.wisc.edu/newsAndEvents/events.aspx", "eventDatetime": "2014-06-05T12:00:00", "parkingStartDatetime": null, "parkingEndDatetime": null }, { "eventName": "WIAA Softball", "eventVenue": null, "webUrl": "https://transportation.wisc.edu/newsAndEvents/events.aspx", "eventDatetime": "2014-06-12T07:00:00", "parkingStartDatetime": null, "parkingEndDatetime": null } ] }, ... ] }

Special Event Information

Special event information and pricing policies vary between city and UW operated lots making it difficult to provide a consistent, intuitive return payload across the two operators. UW makes it worse by having a dizzying array of pricing policies depending on the event type. The API had to take the simplest approach possible and push the complexity down to the API consumer (highly unfortunate).

In addition to pricing complexity, UW does not provide parkingStartDatetime and parkingEndDatetime, which makes explicit determination of special event windows impossible. To mitigate the following steps were taken: