OpenWeatherMap Air Pollution API

Current, forecast, and historical air pollution data with AQI.

GitHub OpenAPI
Business capability
Weather & Environment AE-230.10

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /air_pollution Get current air pollution for a location · Current Air Pollution Data #
Ask an LLM
“What is the current air quality index and pollutant levels at a given latitude and longitude?”
“Can I get today's air pollution data for a city?”
Tell an agent
Get current air pollution for {lat}, {lon}.
Show the AQI and pollutant concentrations at {lat}, {lon}.
GET /air_pollution/forecast Get the next 5 days of air pollution forecast · Hourly Air Pollution Forecast #
Ask an LLM
“What does the air pollution forecast look like for the next five days at a location?”
“Can I see hourly pollution predictions for a city?”
Tell an agent
Get the 5-day air pollution forecast for {lat}, {lon}.
Show the hourly pollution forecast at {lat}, {lon}.
GET /air_pollution/history Get historical air pollution data · Historical Air Pollution Data #
Ask an LLM
“What were the air pollution levels at a location in the past?”
“How far back does historical air pollution data go?”
Tell an agent
Get historical air pollution from {start} to {end} at {lat}, {lon}.
Show past pollution levels at {lat}, {lon} between {start} and {end}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/openweathermap:openweathermap-air-pollution-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

openweathermap-air-pollution-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenWeatherMap Air Pollution API
  version: 2.5.0
  description: Returns current, forecast, and historical air pollution data including the Air Quality Index and concentrations of CO, NO, NO2, O3, SO2, NH3, PM2.5, and PM10 for any coordinates on the globe.
  contact:
    name: OpenWeather
    url: https://openweathermap.org/api/air-pollution
  license:
    name: Creative Commons Attribution-ShareAlike 4.0 International
    url: https://creativecommons.org/licenses/by-sa/4.0/
servers:
- url: https://api.openweathermap.org/data/2.5
  description: Air Pollution API base URL
security:
- appid: []
tags:
- name: Air Pollution
  description: Current, forecast, and historical air pollution data with AQI.
paths:
  /air_pollution:
    get:
      operationId: getCurrentAirPollution
      summary: Current Air Pollution Data
      description: Returns current air pollution data including the Air Quality Index and concentrations of common pollutants for the supplied latitude and longitude.
      tags:
      - Air Pollution
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Current air pollution response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AirPollutionResponse'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
  /air_pollution/forecast:
    get:
      operationId: getAirPollutionForecast
      summary: Hourly Air Pollution Forecast
      description: Returns the hourly air pollution forecast for the next 5 days for the supplied latitude and longitude.
      tags:
      - Air Pollution
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Air pollution forecast response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AirPollutionResponse'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
  /air_pollution/history:
    get:
      operationId: getAirPollutionHistory
      summary: Historical Air Pollution Data
      description: Returns historical hourly air pollution data for the supplied coordinates and time window. Data is available from 27 November 2020 onwards.
      tags:
      - Air Pollution
      parameters:
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - name: start
        in: query
        required: true
        description: Unix UTC start timestamp.
        schema:
          type: integer
          format: int64
      - name: end
        in: query
        required: true
        description: Unix UTC end timestamp.
        schema:
          type: integer
          format: int64
      - $ref: '#/components/parameters/Appid'
      responses:
        '200':
          description: Historical air pollution response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AirPollutionResponse'
        '400':
          description: Invalid request parameters.
        '401':
          description: Unauthorized.
        '429':
          description: Too many requests.
components:
  parameters:
    Lat:
      name: lat
      in: query
      required: true
      description: Latitude in decimal degrees, range -90 to 90.
      schema:
        type: number
        format: float
    Appid:
      name: appid
      in: query
      required: true
      description: OpenWeather API key.
      schema:
        type: string
    Lon:
      name: lon
      in: query
      required: true
      description: Longitude in decimal degrees, range -180 to 180.
      schema:
        type: number
        format: float
  schemas:
    AirPollutionResponse:
      type: object
      properties:
        coord:
          type: object
          properties:
            lat:
              type: number
              format: float
            lon:
              type: number
              format: float
        list:
          type: array
          items:
            $ref: '#/components/schemas/AirPollutionListItem'
    AirPollutionComponents:
      type: object
      properties:
        co:
          type: number
          format: float
        'no':
          type: number
          format: float
        no2:
          type: number
          format: float
        o3:
          type: number
          format: float
        so2:
          type: number
          format: float
        pm2_5:
          type: number
          format: float
        pm10:
          type: number
          format: float
        nh3:
          type: number
          format: float
    AirPollutionListItem:
      type: object
      properties:
        dt:
          type: integer
          format: int64
        main:
          type: object
          properties:
            aqi:
              type: integer
              description: Air Quality Index. 1 Good, 2 Fair, 3 Moderate, 4 Poor, 5 Very Poor.
        components:
          $ref: '#/components/schemas/AirPollutionComponents'
  securitySchemes:
    appid:
      type: apiKey
      in: query
      name: appid