Skip to content

Get cities

Deprecated
GET
/v2/cities

Provides a list of cities supported by the platform

Authorizations

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

Define sort order. e.g. ?sort=asc

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)

order_by

Order by a field e.g. ?order_by=city

string
Allowed values: city country firstUpdated lastUpdated

Order by a field e.g. ?order_by=city

entity
Any of:
string

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
country
required
string
city
required
string
count
required
integer
locations
required
integer
firstUpdated
required
string
lastUpdated
required
string
parameters
required
Array<string>

422

Validation Error

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