Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Конечная точка currentConditions предоставляет почасовую информацию о качестве воздуха. Вы можете управлять тем, какие показатели качества воздуха (AQI) и сопутствующая информация (например, уровень концентрации загрязняющих веществ и рекомендации по охране здоровья) будут возвращаться.
Вы можете запросить текущее почасовое качество воздуха, используя конечную точку currentConditions , отправив HTTP-запрос POST по адресу:
Включите параметры запроса в тело JSON-запроса . В теле запроса указывается местоположение, для которого вы хотите получить данные о текущем качестве воздуха, а также различные параметры, позволяющие управлять информацией о качестве воздуха, которая будет включена в ответ.
API Explorer позволяет вам делать живые запросы, чтобы вы могли ознакомиться с API и его параметрами:
Вызов, указанный выше, генерирует следующий ответ JSON . Подробнее о данных ответа см. в разделе Данные ответа .
{"dateTime":"2023-10-26T18:00:00Z","regionCode":"us","indexes":[{"code":"uaqi","displayName":"Universal AQI","aqi":52,"aqiDisplay":"52","color":{"red":0.9490196,"green":0.98039216,"blue":0.019607844},"category":"Moderate air quality","dominantPollutant":"no2"}]}
Пример запроса с несколькими параметрами
Запрос нескольких параметров
Следующий код показывает, как создать тело запроса currentConditions . В этом примере, помимо местоположения, указаны несколько дополнительных вычислений и язык ответа.
Вызов, указанный выше, генерирует следующий ответ JSON . Подробнее о данных ответа см. в разделе Данные ответа .
{"dateTime":"2023-06-15T10:00:00Z","regionCode":"us","indexes":[{"code":"uaqi","displayName":"Universal AQI","aqi":89,"aqiDisplay":"89","color":{"red":48,"green":175,"blue":55,"alpha":255},"category":"Excellent air quality","dominantPollutant":"o3"},{"code":"usa_epa","displayName":"AQI (US)","aqi":41,"aqiDisplay":"41","color":{"green":228,"alpha":255},"category":"Good air quality","dominantPollutant":"pm25"}],"pollutants":[{"code":"co","displayName":"CO","fullName":"Carbon monoxide","concentration":{"value":334.24,"units":"PARTS_PER_BILLION"},"additionalInfo":{"sources":"Typically originates from incomplete combustion...","effects":"When inhaled, carbon monoxide can prevent the blood from..."}},{"code":"no2","displayName":"NO2","fullName":"Nitrogen dioxide","concentration":{"value":13.12,"units":"PARTS_PER_BILLION"},"additionalInfo":{"sources":"Main sources are fuel burning processes, such as...","effects":"Exposure may cause increased bronchial reactivity..."}},{"code":"o3","displayName":"O3","fullName":"Ozone","concentration":{"value":13.88,"units":"PARTS_PER_BILLION"},"additionalInfo":{"sources":"Ozone is created in a chemical reaction between atmospheric oxygen...","effects":"Ozone can irritate the airways and cause coughing, a burning..."}},{"code":"pm10","displayName":"PM10","fullName":"Inhalable particulate matter (<10µm)","concentration":{"value":5.07,"units":"MICROGRAMS_PER_CUBIC_METER"},"additionalInfo":{"sources":"Main sources are combustion processes (e.g. indoor heating, wildfires)...","effects":"Inhalable particles can penetrate into the lungs. Short term exposure..."}},{"code":"pm25","displayName":"PM2.5","fullName":"Fine particulate matter (<2.5µm)","concentration":{"value":2.83,"units":"MICROGRAMS_PER_CUBIC_METER"},"additionalInfo":{"sources":"Main sources are combustion processes (e.g. power plants, indoor heating...","effects":"Fine particles can penetrate into the lungs and bloodstream. Short term..."}},{"code":"so2","displayName":"SO2","fullName":"Sulfur dioxide","concentration":{"value":0.02,"units":"PARTS_PER_BILLION"},"additionalInfo":{"sources":"Main sources are burning processes of sulfur-containing fuel in industry...","effects":"Exposure causes irritation of the respiratory tract, coughing and generates..."}}],"healthRecommendations":{"generalPopulation":"With this level of air quality, you have no limitations. Enjoy the outdoors!","elderly":"If you start to feel respiratory discomfort such as coughing or breathing difficulties...","lungDiseasePopulation":"...","heartDiseasePopulation":"...","athletes":"...","pregnantWomen":"...","children":"..."}}
Попробуйте!
API Explorer позволяет вам делать образцы запросов, чтобы вы могли ознакомиться с API и его параметрами.
Выберите значок API api на правой стороне страницы.
При желании отредактируйте параметры запроса.
Нажмите кнопку «Выполнить» . В диалоговом окне выберите учётную запись, которую вы хотите использовать для отправки запроса.
На панели обозревателя API выберите значок полноэкранного режима, чтобы развернуть окно обозревателя API.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-08-29 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ecurrentConditions\u003c/code\u003e endpoint provides access to hourly air quality data, including AQI, pollutant concentrations, and health recommendations.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize the response to include specific AQIs and extra computations like health recommendations and dominant pollutant information.\u003c/p\u003e\n"],["\u003cp\u003eRequests are made via HTTP POST to the endpoint URL with an API key and a JSON request body containing location and optional parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides current air quality information for the specified location, including relevant AQIs, pollutant concentrations, and optional health recommendations.\u003c/p\u003e\n"]]],["The `currentConditions` endpoint provides hourly air quality data. To use it, send an HTTP POST request to `https://airquality.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY`, including a JSON request body with the desired location. You can specify various options like AQIs, pollutant levels, health recommendations, and language. The response contains current conditions, indexes, pollutants details, and health advice. You can modify your request to get more specific information. The API Explorer allows testing the requests.\n"],null,["The [`currentConditions`](/maps/documentation/air-quality/reference/rest/v1/currentConditions/lookup) endpoint\nprovides current hourly air quality information. You can control which AQIs and\npertinent information are returned (such as pollutants concentration level and\nhealth recommendations).\n\nYou can request current hourly air quality using the\n[`currentConditions`](/maps/documentation/air-quality/reference/rest/v1/currentConditions/lookup)\nendpoint by sending an HTTP POST request to: \n\n```html\nhttps://airquality.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY\n```\n\nInclude your request options in the JSON\n[request body](/maps/documentation/air-quality/reference/rest/v1/currentConditions/lookup#request-body).\nThe request body contains the location for which you would like to get the air\nquality current conditions and various options to control what air quality\ninformation to include in the response.\n\nThe APIs Explorer lets you make live requests so that you can get familiar with\nthe API and the API options: \n[Try it!](#try_it)\n\nExample of basic request\n\nBasic request body\n\nThe following code shows how to construct a basic request body for a\n[`currentConditions`](/maps/documentation/air-quality/reference/rest/v1/currentConditions/lookup)\nrequest. In this example, you set only the location. \n\n```bash\ncurl -X POST -d '{\n \"location\": {\n \"latitude\": 37.419734,\n \"longitude\": -122.0827784\n }\n}' \\\n-H 'Content-Type: application/json' \\\n'https://airquality.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY'\n```\n\nBasic request response\n\nThe call above generates the following\n[JSON response](/maps/documentation/air-quality/reference/rest/v1/currentConditions/lookup#response-body).\nFor more details about the response data, see [Response data](/maps/documentation/air-quality/response-data).\n**Note:** By default, the response includes the Universal AQI with the basic AQI information. The AQI can be removed or replaced with a different AQI by setting the corresponding parameters. \n\n```json\n{\n \"dateTime\": \"2023-10-26T18:00:00Z\",\n \"regionCode\": \"us\",\n \"indexes\": [\n {\n \"code\": \"uaqi\",\n \"displayName\": \"Universal AQI\",\n \"aqi\": 52,\n \"aqiDisplay\": \"52\",\n \"color\": {\n \"red\": 0.9490196,\n \"green\": 0.98039216,\n \"blue\": 0.019607844\n },\n \"category\": \"Moderate air quality\",\n \"dominantPollutant\": \"no2\"\n }\n ]\n}\n```\n| **Note:** If a `color` field value is `0`, that field is omitted from the response.\n\nExample of request with multiple parameters\n\nMultiple parameters request\n\nThe following code shows how to construct a request body for a\n[`currentConditions`](/maps/documentation/air-quality/reference/rest/v1/currentConditions/lookup) request.\nIn this example, in addition to the location, several extra computations and\nthe response language are specified. \n\n```bash\ncurl -X POST -d '{\n \"universalAqi\": true,\n \"location\": {\n \"latitude\": 37.419734,\n \"longitude\": -122.0827784\n },\n \"extraComputations\": [\n \"HEALTH_RECOMMENDATIONS\",\n \"DOMINANT_POLLUTANT_CONCENTRATION\",\n \"POLLUTANT_CONCENTRATION\",\n \"LOCAL_AQI\",\n \"POLLUTANT_ADDITIONAL_INFO\"\n ],\n \"languageCode\": \"en\"\n}' \\\n-H 'Content-Type: application/json' \\\n'https://airquality.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY'\n```\n\nMultiple parameters response\n\nThe call above generates the following\n[JSON response](/maps/documentation/air-quality/reference/rest/v1/currentConditions/lookup#response-body).\nFor more details about the response data, see [Response data](/maps/documentation/air-quality/response-data). \n\n```json\n{\n \"dateTime\": \"2023-06-15T10:00:00Z\",\n \"regionCode\": \"us\",\n \"indexes\": [\n {\n \"code\": \"uaqi\",\n \"displayName\": \"Universal AQI\",\n \"aqi\": 89,\n \"aqiDisplay\": \"89\",\n \"color\": {\n \"red\": 48,\n \"green\": 175,\n \"blue\": 55,\n \"alpha\": 255\n },\n \"category\": \"Excellent air quality\",\n \"dominantPollutant\": \"o3\"\n },\n {\n \"code\": \"usa_epa\",\n \"displayName\": \"AQI (US)\",\n \"aqi\": 41,\n \"aqiDisplay\": \"41\",\n \"color\": {\n \"green\": 228,\n \"alpha\": 255\n },\n \"category\": \"Good air quality\",\n \"dominantPollutant\": \"pm25\"\n }\n ],\n \"pollutants\": [\n {\n \"code\": \"co\",\n \"displayName\": \"CO\",\n \"fullName\": \"Carbon monoxide\",\n \"concentration\": {\n \"value\": 334.24,\n \"units\": \"PARTS_PER_BILLION\"\n },\n \"additionalInfo\": {\n \"sources\": \"Typically originates from incomplete combustion...\",\n \"effects\": \"When inhaled, carbon monoxide can prevent the blood from...\"\n }\n },\n {\n \"code\": \"no2\",\n \"displayName\": \"NO2\",\n \"fullName\": \"Nitrogen dioxide\",\n \"concentration\": {\n \"value\": 13.12,\n \"units\": \"PARTS_PER_BILLION\"\n },\n \"additionalInfo\": {\n \"sources\": \"Main sources are fuel burning processes, such as...\",\n \"effects\": \"Exposure may cause increased bronchial reactivity...\"\n }\n },\n {\n \"code\": \"o3\",\n \"displayName\": \"O3\",\n \"fullName\": \"Ozone\",\n \"concentration\": {\n \"value\": 13.88,\n \"units\": \"PARTS_PER_BILLION\"\n },\n \"additionalInfo\": {\n \"sources\": \"Ozone is created in a chemical reaction between atmospheric oxygen...\",\n \"effects\": \"Ozone can irritate the airways and cause coughing, a burning...\"\n }\n },\n {\n \"code\": \"pm10\",\n \"displayName\": \"PM10\",\n \"fullName\": \"Inhalable particulate matter (\u003c10µm)\",\n \"concentration\": {\n \"value\": 5.07,\n \"units\": \"MICROGRAMS_PER_CUBIC_METER\"\n },\n \"additionalInfo\": {\n \"sources\": \"Main sources are combustion processes (e.g. indoor heating, wildfires)...\",\n \"effects\": \"Inhalable particles can penetrate into the lungs. Short term exposure...\"\n }\n },\n {\n \"code\": \"pm25\",\n \"displayName\": \"PM2.5\",\n \"fullName\": \"Fine particulate matter (\u003c2.5µm)\",\n \"concentration\": {\n \"value\": 2.83,\n \"units\": \"MICROGRAMS_PER_CUBIC_METER\"\n },\n \"additionalInfo\": {\n \"sources\": \"Main sources are combustion processes (e.g. power plants, indoor heating...\",\n \"effects\": \"Fine particles can penetrate into the lungs and bloodstream. Short term...\"\n }\n },\n {\n \"code\": \"so2\",\n \"displayName\": \"SO2\",\n \"fullName\": \"Sulfur dioxide\",\n \"concentration\": {\n \"value\": 0.02,\n \"units\": \"PARTS_PER_BILLION\"\n },\n \"additionalInfo\": {\n \"sources\": \"Main sources are burning processes of sulfur-containing fuel in industry...\",\n \"effects\": \"Exposure causes irritation of the respiratory tract, coughing and generates...\"\n }\n }\n ],\n \"healthRecommendations\": {\n \"generalPopulation\": \"With this level of air quality, you have no limitations. Enjoy the outdoors!\",\n \"elderly\": \"If you start to feel respiratory discomfort such as coughing or breathing difficulties...\",\n \"lungDiseasePopulation\": \"...\",\n \"heartDiseasePopulation\": \"...\",\n \"athletes\": \"...\",\n \"pregnantWomen\": \"...\",\n \"children\": \"...\"\n }\n}\n```\n\nTry it!\n\nThe APIs Explorer lets you make sample requests so\nthat you can get familiar with the API and the API options.\n\n1. Select the API icon api\n on the right side of the page.\n\n2. Optionally edit the request parameters.\n\n3. Select the **Execute** button. In the dialog, choose the account\n that you want to use to make the request.\n\n4. In the APIs Explorer panel, select the fullscreen icon\n fullscreen to expand the APIs Explorer window."]]