The Current Conditions endpoint provides hourly air quality information in more than 100 countries, up to a 500 x 500 meters resolution. Includes over 70 local indexes and global air quality index and categories.
HTTP request
POST https://airquality.googleapis.com/v1/currentConditions:lookup
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "location": { object ( |
Fields | |
---|---|
location |
Required. The longitude and latitude from which the API looks for air quality current conditions data. |
extraComputations[] |
Optional. Additional features that can be optionally enabled. Specifying extra computations will result in the relevant elements and fields to be returned in the response. |
uaqiColorPalette |
Optional. Determines the color palette used for data provided by the 'Universal Air Quality Index' (UAQI). This color palette is relevant just for UAQI, other AQIs have a predetermined color palette that can't be controlled. |
customLocalAqis[] |
Optional. Expresses a 'country/region to AQI' relationship. Pairs a country/region with a desired AQI so that air quality data that is required for that country/region will be displayed according to the chosen AQI. This parameter can be used to specify a non-default AQI for a given country, for example, to get the US EPA index for Canada rather than the default index for Canada. |
universalAqi |
Optional. If set to true, the Universal AQI will be included in the 'indexes' field of the response. Default value is true. |
languageCode |
Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF standard. Default value is en. |
Response body
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "dateTime": string, "regionCode": string, "indexes": [ { object ( |
Fields | |
---|---|
dateTime |
A rounded down timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. For example: "2014-10-02T15:00:00Z". |
regionCode |
The ISO_3166-1 alpha-2 code of the country/region corresponding to the location provided in the request. This field might be omitted from the response if the location provided in the request resides in a disputed territory. |
indexes[] |
Based on the request parameters, this list will include (up to) two air quality indexes:
|
pollutants[] |
A list of pollutants affecting the location specified in the request. Note: This field will be returned only for requests that specified one or more of the following extra computations: POLLUTANT_ADDITIONAL_INFO, DOMINANT_POLLUTANT_CONCENTRATION, POLLUTANT_CONCENTRATION. |
healthRecommendations |
Health advice and recommended actions related to the reported air quality conditions. Recommendations are tailored differently for populations at risk, groups with greater sensitivities to pollutants, and the general population. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the OAuth 2.0 Overview.