Skip to content

Get locations

GET
/v2/locations

Provides a list of locations

Parameters

Query Parameters

limit
Any of:
integer

Change the number of results returned. e.g. limit=1000 will return up to 1000 results

page
Any of:
integer

Paginate through results. e.g. page=1 will return first page of results

offset
Any of:
integer
sort
Any of:
string
Allowed values: asc desc

Sort Direction e.g. sort=desc

parameter_id
Any of:
integer

(optional) A parameter ID to filter measurement results. e.g. parameter_id=2 (i.e. PM2.5) will limit measurement results to only PM2.5 measurements

parameter
Any of:
Array<string>

(optional) A parameter name or ID by which to filter measurement results. e.g. parameter=pm25 or parameter=pm25&parameter=pm10

unit
Any of:
Array<string>
coordinates
Any of:
string

Coordinate pair in form lat,lng. Up to 8 decimal points of precision e.g. 38.907,-77.037

radius

Search radius from coordinates as center in meters. Maximum of 25,000 (25km) defaults to 1000 (1km) e.g. radius=10000

integer
default: 1000

Search radius from coordinates as center in meters. Maximum of 25,000 (25km) defaults to 1000 (1km) e.g. radius=10000

country_id
Any of:
integer

Limit results by a certain country using two digit country ID. e.g. 13

country
Any of:
Array<string>

Limit results by a certain country using two letter country code. e.g. ?country=US or ?country=US&country=MX

city
Any of:
Array<string>

Limit results by a certain city or cities. (e.g. ?city=Chicago or ?city=Chicago&city=Boston)

location_id
Any of:
Array<integer>
location
Any of:
Array<string>
order_by

Order by a field

string
Allowed values: city country location sourceName firstUpdated lastUpdated count random distance

Order by a field

is_mobile
Any of:
boolean

Location is mobile e.g. ?isMobile=true

is_analysis
Any of:
boolean

Data is the product of a previous analysis/aggregation and not raw measurements e.g. ?isAnalysis=true

source_name
Any of:
Array<string>

Name of the data source e.g. ?sourceName=Houston%20Mobile

entity
Any of:
string
Allowed values: government community research

Source entity type. e.g. ?entity=government

sensor_type
Any of:
string
Allowed values: reference grade low-cost sensor

Type of Sensor e.g. ?sensorType=reference%20grade

model_name
Any of:
Array<string>

Model Name of Sensor e.g. ?modelName=AE33

manufacturer_name
Any of:
Array<string>

Manufacturer of Sensor e.g. ?manufacturer=Ecotech

dump_raw
Any of:
boolean

Responses

200

Successful Response

object
meta
object
name
string
default: openaq-api
license
string
""
website
string
default: /
page
integer
default: 1
limit
integer
default: 100
found
Any of:
integer
results
required
Array<object>
object
id
required
integer
city
Any of:
string
name
Any of:
string
entity
Any of:
string
country
Any of:
string
sources
Any of:
Array<object>
object
url
Any of:
string
name
required
string
id
Any of:
string
readme
Any of:
string
organization
Any of:
string
lifecycle_stage
Any of:
string
isMobile
required
boolean
isAnalysis
Any of:
boolean
parameters
Any of:
Array<object>
object
id
required
integer
unit
required
string
count
required
integer
average
required
number
parameter
required
string
lastValue
Any of:
number
displayName
Any of:
string
lastUpdated
required
string
parameterId
required
integer
firstUpdated
required
string
manufacturers
Any of:
Array<object>
object
modelName
required
string
manufacturerName
required
string
sensorType
Any of:
string
coordinates
Any of:
object
latitude
Any of:
number
longitude
Any of:
number
lastUpdated
Any of:
string
firstUpdated
Any of:
string
measurements
required
integer
bounds
Any of:
Array<number>
manufacturers
Any of:
Array<object>
object
modelName
required
string
manufacturerName
required
string

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string