INRIX documentation logo

Description

The On-Street Parking API is used to return metadata information on one or more city blocks.

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.

Segments

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.

Driveways and Fire Hydrants

In order to avoid “zebra striping” in the UI/UX, we do not represent breaks in street parking <25m in our API if they do not also represent a change in parking restriction type. This includes: driveways, fire hydrates, mailboxes, crosswalks, etc. This data is collected in our backend system and is a component of our USS and LPR offerings, however we have not found a end-user facing purpose for it yet and therefore do not have it in our API.

Spaces Total

The 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.

Usage

Query Types

Block queries can be made as follows:

  1. Querying a single block for a known blockID
  2. Querying a list of blocks by blockID
  3. Querying a geographic region
    1. by a bounded box defined by four points
    2. 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

The entry_dt and duration parameters not only change the calculatedRates (see FAQ) but also the occupancy prediction. Selecting an entry_dt or duration too far in the past or future can cause additional overhead that will slow down response time.

Example /blocks request

GET http://parking-api.inrix.com/blocks?box=47.617867|-122.352635,47.6085|-122.327074&accesstoken=YOURACCESSTOKEN HTTP/1.1
Host: parking-api.inrix.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Accept: application/json
Accept-Encoding: gzip, deflate
Authorization: Bearer
INRIXClientAgent:

Attributes list

Name/Object   Type Description
blockID   number Unique ID for block
name   string Street name
address   string To and from streets
polyline   string Block geometry (Google 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
pmtTypes   string Accepted payment types
photoThumbs   string URL to photos of location
operator   string Municipality or company that manages parking meter
offset   number UTC time offset in seconds
geojson   object Collection of points that make block geometry
  type string Always LINESTRING
  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 encoded)
  polyline6 string Segment geometry with additional degree of precision
  spacesTotal number Total number of spaces for segment
  start number Offset of where segment begins (meters)
  end number Offset of where segment ends (meters)
  side string Side of street in relation to heading. First point in the geojson is the beginning of the block.
  rateCard string Full restrictions and pricing
  isOpen string Parking allowed or No Parking
  paymentID string Meter ID for transactions, may be a range of IDs
structuredRates   object Each individual rate from rateCard parsed into parameters
  dow_start number First day of week that rate is applicable (ISO 8601)
  repeats string Rate is cumulative
  increment number Duration for how long rate is applicable (minutes)
  dow_end number Last day of week when rate is applicable
  time_in string Entry time frame when rate is applicable
  rate number Pricing
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

/blocks

GET Get blocks in a given area.

Parameters

  = required
Name Located In Type Description
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: < data_source_key >|< lot_id >
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: < lat1 >|< long1 >,< lat2 >|< long2 >.
point Query String Used to select a region based on a point and radius. If used, other Location parameters cannot be used, eg: < lat >|< long >.
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.

Responses

200 block segments returned
{
    "result": [
      {
        "name": "10th Street",
        "probability": 53,
        "reservations": [
        ],
        "segments": [
          {
            "end": 185,
            "side": "RIGHT",
            "start": 142,
            "polyline": "chsnEz}drUr@}@",
            "amenities": [
              {
                "id": 1,
                "name": "Free"
              },
              {
                "id": 2,
                "name": "Metered parking"
              },
              {
                "id": 3,
                "name": "Overnight parking"
              }
            ],
            "paymentID": [
            ],
            "polyline6": "ezi{_A~sz~`FlOmR",
            "rateCards": [
              "Each Hour (Mon-Tue | Thu-Sat; 9am-6pm; 9 Hour Max): $1",
              "1 Hour (Wed; 9am-10am): $1",
              "Wed (10am-12pm): No Parking",
              "Each Hour (Wed; 12pm-6pm; 6 Hour Max): $1",
              "Mon-Sat (6pm-9am): Free",
              "Sun: Free"
            ],
            "segmentID": "826357f3-9897-45c4-bd40-a0783aec3950",
            "paymentIDs": [
            ],
            "spacesTotal": 16,
            "structuredRates": [
              {
                "rate": 1,
                "dow_end": 2,
                "repeats": true,
                "time_in": "09:00-18:00",
                "dow_start": 1,
                "increment": 540
              },
              {
                "rate": 1,
                "dow_end": 3,
                "time_in": "09:00-10:00",
                "dow_start": 3,
                "increment": 60
              },
              {
                "rate": -1,
                "dow_end": 3,
                "time_in": "10:00-12:00",
                "dow_start": 3
              },
              {
                "max": 360,
                "rate": 1,
                "dow_end": 3,
                "repeats": true,
                "time_in": "12:00-18:00",
                "dow_start": 3,
                "increment": 60
              },
              {
                "rate": 0,
                "dow_end": 6,
                "time_in": "18:00-09:00",
                "dow_start": 1
              },
              {
                "rate": 0,
                "dow_end": 7,
                "repeats": true,
                "dow_start": 7,
                "increment": 1440
              },
              {
                "rate": 1,
                "dow_end": 6,
                "repeats": true,
                "time_in": "09:00-18:00",
                "dow_start": 4,
                "increment": 540
              }
            ],
            "isOpen": true,
            "calculatedRates": [
              {
                "rate_cost": 0,
                "quoted_duration": "1:00:00",
                "rate_type": "B"
              }
            ]
          },
          {
            "end": 122,
            "side": "RIGHT",
            "start": 60,
            "polyline": "kksnExaerUjA{A",
            "amenities": [
              {
                "id": 1,
                "name": "Free"
              },
              {
                "id": 3,
                "name": "Overnight parking"
              },
              {
                "id": 4,
                "name": "Residential parking"
              }
            ],
            "paymentID": [
            ],
            "polyline6": "_{j{_A|z{~`F~Vm[",
            "rateCards": [
              "Mon-Tue | Thu-Sun (7am-2am; Residential Permit Only): Free",
              "Wed (7am-10am; Residential Permit Only): Free",
              "Wed (10am-12pm): No Parking",
              "Wed (12pm-2am; Residential Permit Only): Free",
              "2am-7am: Free"
            ],
            "segmentID": "91819789-620d-44c4-ae77-6456f5c7e3aa",
            "paymentIDs": [
            ],
            "spacesTotal": 11,
            "structuredRates": [
              {
                "rate": 0,
                "dow_end": 2,
                "repeats": true,
                "time_in": "07:00-02:00",
                "dow_start": 1,
                "increment": 1140,
                "restriction": "R"
              },
              {
                "rate": 0,
                "dow_end": 3,
                "repeats": true,
                "time_in": "07:00-10:00",
                "dow_start": 3,
                "increment": 180,
                "restriction": "R"
              },
              {
                "rate": -1,
                "dow_end": 3,
                "time_in": "10:00-12:00",
                "dow_start": 3
              },
              {
                "rate": 0,
                "dow_end": 3,
                "repeats": true,
                "time_in": "12:00-02:00",
                "dow_start": 3,
                "increment": 840,
                "restriction": "R"
              },
              {
                "rate": 0,
                "time_in": "02:00-07:00"
              },
              {
                "rate": 0,
                "dow_end": 7,
                "repeats": true,
                "time_in": "07:00-02:00",
                "dow_start": 4,
                "increment": 1140,
                "restriction": "R"
              }
            ],
            "isOpen": true,
            "calculatedRates": [
              {
                "rate_cost": 0,
                "quoted_duration": "1:00:00",
                "rate_type": "B"
              }
            ]
          },
          {
            "end": 186,
            "side": "LEFT",
            "start": 180,
            "polyline": "}fsnEt{drUDE",
            "amenities": [
              {
                "id": 1,
                "name": "Free"
              },
              {
                "id": 2,
                "name": "Metered parking"
              },
              {
                "id": 3,
                "name": "Overnight parking"
              }
            ],
            "paymentID": [
            ],
            "polyline6": "cni{_Ab~y~`Fr@{@",
            "rateCards": [
              "Each Hour (Mon | Wed-Sat; 9am-6pm; 9 Hour Max): $1",
              "1 Hour (Tue; 9am-10am): $1",
              "Tue (10am-12pm): No Parking",
              "Each Hour (Tue; 12pm-6pm; 6 Hour Max): $1",
              "Mon-Sat (6pm-9am): Free",
              "Sun: Free"
            ],
            "segmentID": "f49049f7-36d7-4014-95d4-7a5b32de2254",
            "paymentIDs": [
            ],
            "spacesTotal": 1,
            "structuredRates": [
              {
                "rate": 1,
                "dow_end": 1,
                "repeats": true,
                "time_in": "09:00-18:00",
                "dow_start": 1,
                "increment": 540
              },
              {
                "rate": 1,
                "dow_end": 2,
                "time_in": "09:00-10:00",
                "dow_start": 2,
                "increment": 60
              },
              {
                "rate": -1,
                "dow_end": 2,
                "time_in": "10:00-12:00",
                "dow_start": 2
              },
              {
                "max": 360,
                "rate": 1,
                "dow_end": 2,
                "repeats": true,
                "time_in": "12:00-18:00",
                "dow_start": 2,
                "increment": 60
              },
              {
                "rate": 0,
                "dow_end": 6,
                "time_in": "18:00-09:00",
                "dow_start": 1
              },
              {
                "rate": 0,
                "dow_end": 7,
                "repeats": true,
                "dow_start": 7,
                "increment": 1440
              },
              {
                "rate": 1,
                "dow_end": 6,
                "repeats": true,
                "time_in": "09:00-18:00",
                "dow_start": 3,
                "increment": 540
              }
            ],
            "isOpen": true,
            "calculatedRates": [
              {
                "rate_cost": 0,
                "quoted_duration": "1:00:00",
                "rate_type": "B"
              }
            ]
          },
          {
            "end": 179,
            "side": "LEFT",
            "start": 165,
            "polyline": "ogsnEl|drUNQ",
            "amenities": [
            ],
            "paymentID": [
            ],
            "polyline6": "cti{_Afez~`FxCuD",
            "rateCards": [
              "No Parking"
            ],
            "segmentID": "f7326a5f-ef52-471f-9334-118d10f085da",
            "paymentIDs": [
            ],
            "spacesTotal": 2,
            "structuredRates": [
              {
                "rate": -1,
                "repeats": true,
                "increment": 1440
              }
            ],
            "isOpen": false,
            "calculatedRates": [
            ]
          }
        ],
        "pmtTypes": [
          "Amex",
          "Coins",
          "Debit card",
          "Discover",
          "MC/Visa"
        ],
        "photoThumbs": [
          "https://d13esfgglb25od.cloudfront.net/realtimeparking_media/core/img/default.png"
        ],
        "i_flag": 0,
        "blockID": "46502752",
        "bucket": 2,
        "currency": "$",
        "polyline": "_nsnEnderUbGqH",
        "address": "",
        "operator": "City of Santa Monica",
        "geojson": {
          "type": "LineString",
          "coordinates": [
            [
              -118.48792,
              34.01968
            ],
            [
              -118.487155,
              34.019035
            ],
            [
              -118.48639,
              34.01839
            ]
          ]
        },
        "note": "",
        "amenities": [
          {
            "id": 1,
            "name": "Free"
          },
          {
            "id": 2,
            "name": "Metered parking"
          },
          {
            "id": 3,
            "name": "Overnight parking"
          },
          {
            "id": 4,
            "name": "Residential parking"
          }
        ],
        "distance": 735,
        "offset": -25200
      }
    ]
}
400 Bad request
401 invalid or expired token
404 instance not found