The On-Street Parking API is used to return metadata information on one or more city blocks.
The API can return a single block or a list of blocks in a geographic region. A block represents a road from one intersection to the next. The concept of blocks is important for the OnStreet API to be map independent and to be conflatable to any third party map library.
Each block will have a list of one or more parking “segments”, which will include information about rates / hours that parking is available, as well as number of spaces. Returned results can be additionally filtered by their metadata. Segments are defined as a continuous parking restriction. Segments are represented either by their offsets or their geometry.
spacesTotal field returned by the API is specific to each segment.
The number of spaces returned here reflects the number of actual spaces in the segment,
this does not take into account whether the street is currently available, “isOpen”, “No Parking”, etc.,
but an absolute measurement of spaces.
Block queries can be made as follows:
- Querying a single block for a known
- Querying a list of blocks by
- Querying a geographic region
- by a bounded box defined by four points
- by a circle defined by a point and radius
Filtering and Pagination
A maximum number of results to be returned can be defined. The list of results can be paginated i.e. return second list of 20 results.
Additional filtering must be defined in client logic after results are returned. A wealth of metadata is returned for each lot that might be used to further filter results.
Entry Datetime and Duration
duration parameters not only change the
calculatedRates (see FAQ)
but also the
occupancy prediction. Selecting an
duration too far in the
past or future can cause additional overhead that will slow down response time.
Example /blocks request
|blockID||number||Unique ID for block|
|name||string||Street name, example “High Street”|
|address||string||To and from streets, example “From Maple Street to Walnut Street”|
|polyline||string||Block geometry (Google polyline encoded)|
|distance||number||Distance from queried point or area centroid (in meters)|
|probability||number||Predicted likelihood of finding 1 or more open legal parking spots (%), NULL = No Parking|
|bucket||number||Probability classified into colors to represent likelihood of finding 1 or more open legal parking spots: 1 = Red (unlikely), 2 = Yellow (roughly 50/50 chance), 3 = Green (likely), NULL = No Parking|
|currency||string||Currency symbol, example “$”|
|pmtTypes||array of string||Accepted payment types, example ‘[“Amex”, “coins”]’|
|photoThumbs||array of string||URL to photos of location|
|operator||string||Municipality or company that manages parking|
|offset||number||UTC time offset in seconds|
|geojson||object||Geojson linestring delineating the middle of the roadway|
|coordinates||array||Longitude, Latitutde. First point is the beginning of the block.|
|segments||object||Group of attributes that represent each (sub-block) segment|
|segmentID||string||Unique ID for segment|
|polyline||string||Segment geometry (Google polyline encoded)|
|polyline6||string||Segment geometry with additional degree of precision|
|spacesTotal||number||Capacity, total number of spaces on the segment (sum of open spaces, occupied spaces, and temporary no-parking spaces)|
|isOpen||boolean||True: “Parking allowed” or False: “No Parking”, according to the current restrictions|
|start||number||Distance between start point of this block to start point of this segment, measured along the curb (meters)|
|end||number||Distance between start point of this block to end point of this segment, measured along the curb (meters)|
|side||string||Side of street in relation to direction of the block geometry, first point in the geojson is the beginning of the block|
|rateCards||string||Full restrictions and pricing in a structured text format|
|paymentID||array of dictionaries||Meter ID for transactions, keys are “company” and “id”|
|structuredRates||object||Rate from rateCards parsed into a set of rule dictionaries:|
|dow_start||number||First day of week that rate is applicable (ISO 8601), 1 means Monday, 7 means Sunday|
|dow_end||number||Last day of week when rate is applicable (ISO 8601)|
|repeats||boolean||Cost is cumulative, example “$1 for each additional hour”|
|time_in||string||Entry time frame when rate is applicable, example “18:00-07:00” means “From 6pm to 7am (next day)”|
|increment||number||Time interval over which rate is calculated (minutes), example 60 means “one hour”|
|rate||number||Cost to park per increment, 0 means free, -1 means No Parking|
|restriction||string||One letter code for parking restrictions:
“D”: Disabled person permit only
“R”: Residential permit only
“C”: Commercial vehicles only
“E”: Electric vehicles only
|holidays||number||1 if this is a holiday-only rate;
-1 if this rate can be overridden by a holiday rate. For example, this is a Sunday rate but on some Sunday’s, holiday rates apply.
|calculatedRates||object||Group of attributes that represent the cost of parking for user specified parameters. Different segments may have different cost structures.|
|rate_cost||number||Cost of stay|
|quoted_duration||string||Length of stay (hh:mm:ss)|
|i_flag||To be deprecated|
|note||To be deprecated|
GET Get blocks in a given area.
|accesstoken||Query||String||A valid access token provided from the GET appToken API response. Alternatively, the accesstoken can be added to the request header instead of a url parameter using format 'Authorization: Bearer xxxx.xxx.xxxx'.|
|id||Query||Integer||If used, other Location parameters cannot be used. An 'id' can be a single lot id or multiple separated by | symbols."|
|alias||Query||String||If used, other Location parameters cannot be used. A pipe-delimited data source and lot id, eg:
|box||Query||String||If used, other Location parameters cannot be used. 'box' specifies two lat/long pairs (using the WGS 84 datum) that outline a bounding box. The first lat/long pair should be the northwestern most point, and the second pair the southeastern most point, eg:
|point||Query||String||Used to select a region based on a point and radius. If used, other Location parameters cannot be used, eg:
|radius||Query||Double||Used to select a region based on a point and radius in meters. If 'radius' is used, 'point' must also be used and 'box' / 'geoid' cannot be used."|
|entry_time||Query||String||yyyy-mm-ddTHH:MM format, add a Z for UTC, otherwise treated locally|
|duration||Query||Integer||Duration in minutes. Can be pipe delimited for multiple durations, eg: 60|120|720|1400|
|limit||Query||Integer||Maximum number of elements to return from a large collection (for pagination).|
|offset||Query||Integer||Starting index within the requested collection (for pagination)|
|outputfields||Query||String||Comma separated list of output fields|
|restrictions||Query||String||Comma separated list of restriction IDs as returned from the Filters API|
|locale||Query||String||The locale as defined by ISO 15897, default: en-US|
|sort||String||To optmize performance, objects are not sorted by default. Paramter value `distance` sorts to center of geo query.|