Get a location by ID
GET
/v3/locations/{locations_id}
const url = 'https://example.com/v3/locations/1';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/1 \ --header 'X-API-Key: <X-API-Key>'Provides a location by location ID
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” locations_id
required
Locations Id
Limit the results to a specific location by id
integer
Limit the results to a specific location by id
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" } ]}