# getAirQuality

**Identifier:** `openweather_getAirQuality`

**Provider:** [OpenWeather](https://kirha.com/providers/openweather.md)

Get current air quality data including Air Quality Index (AQI) and pollutant concentrations for a specific location.

## Run it with the CLI

```bash
kirha tools run openweather_getAirQuality \
  --input '{
    "latitude": -90,
    "longitude": -180
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "openweather_getAirQuality",
  "input": {
    "latitude": -90,
    "longitude": -180
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "latitude": {
      "description": "Latitude of the location",
      "maximum": 90,
      "minimum": -90,
      "type": "number"
    },
    "longitude": {
      "description": "Longitude of the location",
      "maximum": 180,
      "minimum": -180,
      "type": "number"
    }
  },
  "required": [
    "latitude",
    "longitude"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "aqi": {
      "type": "number"
    },
    "aqiCategory": {
      "type": "string"
    },
    "context": {
      "type": "string"
    },
    "coordinates": {
      "additionalProperties": false,
      "properties": {
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        }
      },
      "required": [
        "latitude",
        "longitude"
      ],
      "type": "object"
    },
    "pollutants": {
      "additionalProperties": false,
      "properties": {
        "co": {
          "type": "number"
        },
        "nh3": {
          "type": "number"
        },
        "no": {
          "type": "number"
        },
        "no2": {
          "type": "number"
        },
        "o3": {
          "type": "number"
        },
        "pm10": {
          "type": "number"
        },
        "pm2_5": {
          "type": "number"
        },
        "so2": {
          "type": "number"
        }
      },
      "required": [
        "co",
        "no",
        "no2",
        "o3",
        "so2",
        "pm2_5",
        "pm10",
        "nh3"
      ],
      "type": "object"
    },
    "timestamp": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "coordinates",
    "aqi",
    "aqiCategory",
    "pollutants",
    "timestamp"
  ],
  "type": "object"
}
```

-----

[All OpenWeather tools](https://kirha.com/providers/openweather.md) · [< Back to tools list](https://kirha.com/tools.md)