OpenAQ is a nonprofit, community-run aggregator of government and research air-quality monitoring data from thousands of stations worldwide, unified into one API. Access requires a free API key (registered via the OpenAQ site) but the service itself carries no paid tier.
AuthenticationAPI KeySign up with the provider to obtain credentials.
HTTPSSupportedTraffic is encrypted in transit.
CORSEnabledCallable directly from browser JavaScript.
PricingFreeNo paid tier — free for the documented use case.
FormatsJSONResponses can be requested as JSON.
GreatAPIs Score
Score84out of 100
Authentication15/25API key required
Pricing20/20Free to use
Docs20/20Machine-readable spec file bundled
Formats9/15Single response format
Freshness20/20Verified within 6 months
Embed this badge
<a href="https://greatapis.com/api/openaq/"><img src="https://greatapis.com/badge/openaq.svg" alt="Scored 84 on greatapis.com"></a>
Auth quickstart
Sign up with the provider to get an API key.
Send it on every request as a headerX-API-Key: <key>
Stored keyNo key stored
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Endpoints
Auth
APIKeyHeader
v339
GET/v3/countriesGet countries
Parameters
Name
In
Required
Type
order_by
query
no
—
sort_order
query
no
—
providers_id
query
no
—
parameters_id
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
CountriesResponse
422
Validation Error
HTTPValidationError
GET/v3/countries/{countries_id}Get a country by ID
Parameters
Name
In
Required
Type
countries_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
CountriesResponse
422
Validation Error
HTTPValidationError
GET/v3/instrumentsGet instruments
Parameters
Name
In
Required
Type
order_by
query
no
—
sort_order
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
InstrumentsResponse
422
Validation Error
HTTPValidationError
GET/v3/instruments/{instruments_id}Get an instrument by ID
Parameters
Name
In
Required
Type
instruments_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
InstrumentsResponse
422
Validation Error
HTTPValidationError
GET/v3/licensesGet licenses
Parameters
Name
In
Required
Type
order_by
query
no
—
sort_order
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
LicensesResponse
422
Validation Error
HTTPValidationError
GET/v3/licenses/{licenses_id}Get a license by ID
Parameters
Name
In
Required
Type
licenses_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
LicensesResponse
422
Validation Error
HTTPValidationError
GET/v3/locationsGet locations
Parameters
Name
In
Required
Type
coordinates
query
no
—
radius
query
no
—
providers_id
query
no
—
parameters_id
query
no
—
limit
query
no
integer
page
query
no
integer
owner_contacts_id
query
no
—
manufacturers_id
query
no
—
order_by
query
no
—
sort_order
query
no
—
licenses_id
query
no
—
monitor
query
no
—
mobile
query
no
—
instruments_id
query
no
—
iso
query
no
—
countries_id
query
no
—
bbox
query
no
—
Responses
Status
Description
Schema
200
Successful Response
LocationsResponse
422
Validation Error
HTTPValidationError
GET/v3/locations/{locations_id}Get a location by ID
Parameters
Name
In
Required
Type
locations_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
LocationsResponse
422
Validation Error
HTTPValidationError
GET/v3/locations/{locations_id}/flagsGet flags by location ID
Parameters
Name
In
Required
Type
locations_id
path
yes
integer
limit
query
no
integer
page
query
no
integer
datetime_from
query
no
—
datetime_to
query
no
—
Responses
Status
Description
Schema
200
Successful Response
LocationFlagsResponse
422
Validation Error
HTTPValidationError
GET/v3/locations/{locations_id}/latestGet a location's latest measurements
Parameters
Name
In
Required
Type
locations_id
path
yes
integer
limit
query
no
integer
page
query
no
integer
datetime_min
query
no
—
Responses
Status
Description
Schema
200
Successful Response
LatestResponse
422
Validation Error
HTTPValidationError
GET/v3/locations/{locations_id}/sensorsGet sensors by location ID
Parameters
Name
In
Required
Type
locations_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
SensorsResponse
422
Validation Error
HTTPValidationError
GET/v3/manufacturersGet manufacturers
Parameters
Name
In
Required
Type
order_by
query
no
—
sort_order
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
ManufacturersResponse
422
Validation Error
HTTPValidationError
GET/v3/manufacturers/{manufacturers_id}Get a manufacturer by ID
Parameters
Name
In
Required
Type
manufacturers_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
ManufacturersResponse
422
Validation Error
HTTPValidationError
GET/v3/manufacturers/{manufacturers_id}/instrumentsGet instruments by manufacturer ID
Parameters
Name
In
Required
Type
manufacturers_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
InstrumentsResponse
422
Validation Error
HTTPValidationError
GET/v3/ownersGet owners
Parameters
Name
In
Required
Type
order_by
query
no
—
sort_order
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
OwnersResponse
422
Validation Error
HTTPValidationError
GET/v3/owners/{owners_id}Get a owner by ID
Parameters
Name
In
Required
Type
owners_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
OwnersResponse
422
Validation Error
HTTPValidationError
GET/v3/parametersGet a parameters
Parameters
Name
In
Required
Type
order_by
query
no
—
sort_order
query
no
—
parameter_type
query
no
—
coordinates
query
no
—
radius
query
no
—
bbox
query
no
—
iso
query
no
—
countries_id
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
ParametersResponse
422
Validation Error
HTTPValidationError
GET/v3/parameters/{parameters_id}Get a parameter by ID
Parameters
Name
In
Required
Type
parameters_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
ParametersResponse
422
Validation Error
HTTPValidationError
GET/v3/parameters/{parameters_id}/latestGet latest measurements by parameters ID
Parameters
Name
In
Required
Type
parameters_id
path
yes
integer
limit
query
no
integer
page
query
no
integer
datetime_min
query
no
—
Responses
Status
Description
Schema
200
Successful Response
LatestResponse
422
Validation Error
HTTPValidationError
GET/v3/providersGet providers
Parameters
Name
In
Required
Type
order_by
query
no
—
sort_order
query
no
—
parameters_id
query
no
—
monitor
query
no
—
iso
query
no
—
countries_id
query
no
—
bbox
query
no
—
coordinates
query
no
—
radius
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
ProvidersResponse
422
Validation Error
HTTPValidationError
GET/v3/providers/{providers_id}Get a provider by ID
Parameters
Name
In
Required
Type
providers_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
ProvidersResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensor_id}/flagsGet flags by sensor ID
Parameters
Name
In
Required
Type
sensor_id
path
yes
integer
limit
query
no
integer
page
query
no
integer
datetime_from
query
no
—
datetime_to
query
no
—
Responses
Status
Description
Schema
200
Successful Response
LocationFlagsResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}Get a sensor by ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
Responses
Status
Description
Schema
200
Successful Response
SensorsResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/daysGet measurements aggregated to day by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
date_to
query
no
—
date_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
DailyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/days/dayofweekGet measurements aggregated from day to day of week by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
date_to
query
no
—
date_from
query
no
—
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/days/monthlyGet measurements aggregated from day to month by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
date_to
query
no
—
date_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/days/monthofyearGet measurements aggregated from day to month of year by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
date_to
query
no
—
date_from
query
no
—
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/days/yearlyGet measurements aggregated from day to year by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
date_to
query
no
—
date_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/hoursGet precomputed hourly measurements by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/hours/dailyGet measurements aggregated from hour to day by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/hours/dayofweekGet measurements aggregated from hour to day of week by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/hours/hourofdayGet measurements aggregated from hour to hour of day by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/hours/monthlyGet measurements aggregated from hour to month by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/hours/monthofyearGet measurements aggregated from hour to month of year by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/hours/yearlyGet measurements aggregated from hour to year by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
HourlyDataResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/measurementsGet measurements by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
MeasurementsResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/measurements/dailyGet measurements aggregated to days by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
MeasurementsResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/measurements/hourlyGet measurements aggregated to hours by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
datetime_to
query
no
—
datetime_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
MeasurementsResponse
422
Validation Error
HTTPValidationError
GET/v3/sensors/{sensors_id}/yearsGet measurements aggregated to year by sensor ID
Parameters
Name
In
Required
Type
sensors_id
path
yes
integer
date_to
query
no
—
date_from
query
no
—
limit
query
no
integer
page
query
no
integer
Responses
Status
Description
Schema
200
Successful Response
AnnualDataResponse
422
Validation Error
HTTPValidationError
Try it
Developer reference
Base URLhttps://api.openaq.org
Rate limit
OpenAQ's free tier allows 60 requests/minute and 2,000 requests/hour by default (higher limits available on request); every response carries x-ratelimit-limit/x-ratelimit-used/x-ratelimit-remaining/x-ratelimit-reset headers, and exceeding either window returns HTTP 429 (docs.openaq.org/using-the-api/rate-limits).