Get locations
GET
/v3/locations
const url = 'https://example.com/v3/locations?coordinates=38.907%2C-77.037&radius=1000&providers_id=1&limit=100&page=1&order_by=id&sort_order=asc&iso=US&countries_id=1&bbox=-77.1200%2C38.7916%2C-76.9094%2C38.9955';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v3/locations?coordinates=38.907%2C-77.037&radius=1000&providers_id=1&limit=100&page=1&order_by=id&sort_order=asc&iso=US&countries_id=1&bbox=-77.1200%2C38.7916%2C-76.9094%2C38.9955' \ --header 'X-API-Key: <X-API-Key>'Provides a list of locations
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” coordinates
radius
providers_id
Any of:
Array<integer>
null
Limit the results to a specific provider or multiple providers with a single provider ID or a comma delimited list of IDs
parameters_id
Any of:
Array<integer>
null
limit
Limit
Change the number of results returned. e.g. limit=100 will return up to 100 results
integer
Change the number of results returned. e.g. limit=100 will return up to 100 results
page
Page
Paginate through results. e.g. page=1 will return first page of results
integer
Paginate through results. e.g. page=1 will return first page of results
owner_contacts_id
Any of:
Array<integer>
null
Limit the results to a specific owner by owner ID with a single owner ID or comma delimited list of IDs
manufacturers_id
Any of:
Array<integer>
null
order_by
sort_order
licenses_id
Any of:
Array<integer>
null
instruments_id
Any of:
Array<integer>
null
iso
countries_id
Any of:
Array<integer>
null
Limit the results to a specific country or countries by country ID as a single country ID or a comma delimited list of IDs
Responses
Section titled “ Responses ”Successful Response
Media type application/json
LocationsResponse
object
meta
results
required
Results
Array<object>
Locationobject
id
required
Id
integer
timezone
required
Timezone
string
country
required
owner
required
EntityBase
object
id
required
Id
integer
name
required
Name
string
provider
required
ProviderBase
object
id
required
Id
integer
name
required
Name
string
isMobile
required
Ismobile
boolean
isMonitor
required
Ismonitor
boolean
instruments
required
Instruments
Array<object>
InstrumentBaseobject
id
required
Id
integer
name
required
Name
string
sensors
required
coordinates
required
licenses
Any of:
Array<object>
LocationLicense null
bounds
required
Bounds
Array<number>
datetimeFirst
Any of:
DatetimeObject
object
utc
required
Utc
string format: date-time
local
required
Local
string format: date-time
null
datetimeLast
Any of:
DatetimeObject
object
utc
required
Utc
string format: date-time
local
required
Local
string format: date-time
null
Example
{ "meta": { "name": "openaq-api", "website": "/", "page": 1, "limit": 100 }}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}