Got Parking Data?

The City of Santa Monica is providing this API free of charge, for both commercial and private use.

Using the API

All requests must be made over HTTPS to the parking.api.smgov.net domain.

CORS is supported for all GET requests, from any origin.

Include an Accept header in the request to specify the response format. The supported formats are application/json and text/xml.

If you have problems or questions about using the API, please Submit an issue on our GitHub repository.

The Data

lot

Represents static information about public parking lots and structures, and the current number of available spaces. Historical counts are maintained separately.

Fields

available_spaces integer

The current number of spaces available.

description string

Textual description of the location.

id integer

Unique numeric identifier for a lot or structure.

last_updated UTC datetime

The most recent date and time that available_spaces was updated.

latitude decimal

Latitude coordinate of the location.

longitude decimal

Longitude coordinate of the location.

name string

Unique identifier for a lot or structure.

street_address string

Approximate street address.

zip_code integer

Zip code of the location.

The collection of lots and structures, with their current space availability

GET  /lots/:id

optional

:id is the unique numeric identifier for a public lot or structure.

The collection of lots and structures with matching names, with their current space availability

GET  /lots/matching/:name

required

:name is a (partial) name of a public lot or structure.

metered_space

Represents static information about metered parking spaces in Santa Monica.

Fields

active boolean

true if the meter is functioning normally (accepting payment, etc.), false if the meter is otherwise out of service.

area string

Description of the general location of a meter.

latitude decimal

Latitude coordinate where the meter is located.

longitude decimal

Longitude coordinate where the meter is located.

meter_id string

Unique identifier for a meter.

street_address string

Approximate street address of a meter.

The collection of metered spaces

GET  /meters/:meter_id

optional

:meter_id is the unique identifier for a metered space.

sensor_event

Sensor events are recorded each time a vehicle pulls into or out of one of the metered parking spaces in Santa Monica.

Corresponding SS and SE sensor events share a common session_id

Fields

event_id integer Unique identifier for a sensor event.
event_time UTC datetime The date and time an event is recorded by the meter.
event_type string
SS Indicates the event corresponds to a vehicle pulling into a metered space.
SE Indicates the event corresponds to a vehicle pulling out of a metered space.
meter_id string Unique identifier for the metered space at which an event occurred.
ordinal integer

Defines the order in which events are received on this API.

session_id integer

Identifier tying a particular SS event to the corresponding SE event.

Recent sensor events

GET  /meters/events

Recent sensor events at a metered space

GET  /meters/:meter_id/events

required

:meter_id is the unique identifier for a metered space.

The most recent sensor event

GET  /meters/events/latest

The most recent sensor event at a metered space

GET  /meters/:meter_id/events/latest

required

:meter_id is the unique identifier for a metered space.

Sensor events occurring on or after a datetime

GET  /meters/events/since/:datetime

required

:datetime is an ISO 8601 (basic) formatted date/time in UTC (e.g. 20150101T133000Z)

:datetime should be within an acceptable range defined by /meters/events/lifetime/max

Sensor events at a metered space occurring on or after a datetime

GET  /meters/:meter_id/events/since/:datetime

required

:meter_id is the unique identifier for a metered space.

required

:datetime is an ISO 8601 (basic) formatted date/time in UTC (e.g. 20150101T133000Z)

:datetime should be within an acceptable range defined by /meters/events/lifetime/max

Sensor events occurring sequentially after an ordinal number

GET  /meters/events/since/:ordinal

required

:ordinal is the sequence number of a past sensor event.

Sensor events at a metered space occurring sequentially after an ordinal number

GET  /meters/:meter_id/events/since/:ordinal

required

:meter_id is the unique identifier for a metered space.

required

:ordinal is the sequence number of a past sensor event.

lifetime

Represents the amount of time (after event_time) that sensor events are available on the public API.

Fields

length decimal

The amount of time in units specified by units

units string The unit of time this lifetime measures; one of "hours", "minutes", "seconds".
since UTC datetime

The earliest date and time a sensor_event is available from this API.

The default lifetime for sensor events

GET  /meters/events/lifetime

The maximum lifetime for sensor events

GET  /meters/events/lifetime/max