# AirNow API

> AirNow returns current air quality, pollutant readings, and forecasts, available as a workflow and API.

AirNow returns current air quality, pollutant readings, and today’s and tomorrow’s forecasts. Get air quality needs a US city and state or five-digit ZIP code, or a covered Canadian or Mexican city.

- Page: https://fous.com/workflows/airnow
- Handle: `@airnow`
- Category: [Weather](https://fous.com/workflows/category/weather)
- Source website: https://airnow.gov
- Last verified: Sep 29, 2026
- Fous is not affiliated with AirNow.

## Methods

### Get air quality

Operation `get_air_quality`, version 1. 1 credit per call.

Get AirNow current air quality, reported pollutant readings, and today’s and tomorrow’s forecasts for a US city or ZIP code, or a covered Canadian or Mexican city. A forecast AQI or an entire forecast may be unavailable even when a category or current reading is shown.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `location` | string | yes | `"Denver, CO"` | City and state, a five-digit US ZIP code, or a covered Canadian or Mexican city, for example Denver, CO or 94103. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "location"
  ],
  "properties": {
    "location": {
      "type": "string",
      "description": "City and state, a five-digit US ZIP code, or a covered Canadian or Mexican city, for example Denver, CO or 94103.",
      "examples": [
        "Denver, CO",
        "94103"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "location": "Denver, CO"
    },
    {
      "location": "94103"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `aqi` | integer or null | `42` |  |
| `category` | string or null | `"Good"` |  |
| `airnow_url` | string | `"https://www.airnow.gov/?reportingArea=Denver-Boulder&stateCode=CO"` |  |
| `pollutants` | array |  |  |
| `pollutants[].aqi` | integer or null | `26` |  |
| `pollutants[].category` | string or null | `"Good"` |  |
| `pollutants[].pollutant` | string | `"Ozone"` |  |
| `health_advice` | string or null | `"Air quality is good. Enjoy outdoor activities."` |  |
| `main_pollutant` | string or null | `"PM10"` |  |
| `reporting_area` | string | `"Denver-Boulder, CO"` |  |
| `observation_time` | string or null | `"2026-09-29T05:00:00-06:00"` |  |
| `today_forecast_aqi` | integer or null | `53` |  |
| `forecast_discussion` | string or null |  |  |
| `today_forecast_date` | string or null | `"2026-09-29"` |  |
| `tomorrow_forecast_aqi` | integer or null |  |  |
| `tomorrow_forecast_date` | string or null | `"2026-09-30"` |  |
| `today_forecast_category` | string or null | `"Good"` |  |
| `tomorrow_forecast_category` | string or null | `"Moderate"` |  |

**Example input**

```json
{
  "location": "Denver, CO"
}
```

**Example output**

```json
{
  "aqi": 42,
  "category": "Good",
  "airnow_url": "https://www.airnow.gov/?reportingArea=Denver-Boulder&stateCode=CO",
  "pollutants": [
    {
      "aqi": 26,
      "category": "Good",
      "pollutant": "Ozone"
    },
    {
      "aqi": 16,
      "category": "Good",
      "pollutant": "PM2.5"
    },
    {
      "aqi": 42,
      "category": "Good",
      "pollutant": "PM10"
    }
  ],
  "health_advice": "Air quality is good. Enjoy outdoor activities.",
  "main_pollutant": "PM10",
  "reporting_area": "Denver-Boulder, CO",
  "observation_time": "2026-09-29T05:00:00-06:00",
  "today_forecast_aqi": null,
  "forecast_discussion": null,
  "today_forecast_date": "2026-09-29",
  "tomorrow_forecast_aqi": null,
  "tomorrow_forecast_date": "2026-09-30",
  "today_forecast_category": "Good",
  "tomorrow_forecast_category": null
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@airnow",
  "visibility": "public",
  "operation": "get_air_quality",
  "version": 1,
  "input": {
    "location": "Denver, CO"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@airnow\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_air_quality\",\n  \"version\": 1,\n  \"input\": {\n    \"location\": \"Denver, CO\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@airnow",
  "visibility": "public",
  "operation": "get_air_quality",
  "version": 1,
  "input": {
    "location": "Denver, CO"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@airnow","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Check reported air quality for a location
- Compare pollutant readings across locations
- Review today’s and tomorrow’s air quality forecasts
- Share health advice with local teams

## FAQ

### Is Fous affiliated with AirNow?

No. Fous is not affiliated with AirNow. This workflow reads the public airnow.gov website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a AirNow account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from airnow.gov when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What air quality is reported for a location?

Get air quality returns current air quality, its category, and observation time for the supplied location.

### Which pollutants and pollutant categories are reported?

Get air quality returns reported pollutants, their readings, and categories.

### What are today’s and tomorrow’s air quality forecasts?

Get air quality returns available forecasts and forecast categories. An AQI or an entire forecast may be unavailable.

## Related

- [IQAir API](https://fous.com/workflows/iqair.md): City air quality readings and forecasts from IQAir.
- [AccuWeather API](https://fous.com/workflows/accuweather.md): AccuWeather provides current conditions and RealFeel, plus up to 15 available daily forecasts; shorter public forecasts may return fewer days.
- [MSN Weather API](https://fous.com/workflows/msn-weather.md): MSN Weather provides current conditions and forecasts for places worldwide, including up to 10 days ahead and optional hourly forecasts for the next 24 hours.
- [National Weather Service API](https://fous.com/workflows/national-weather-service.md): National Weather Service provides U.S. day-and-night forecasts for seven days, hourly forecasts for up to 156 hours where available, active alerts, and latest nearby station observations.
- [Pollen.com API](https://fous.com/workflows/pollen-com.md): Pollen levels and allergy forecasts for locations in the United States.
- [The Weather Channel API](https://fous.com/workflows/the-weather-channel.md): The Weather Channel returns current conditions, today’s high/low, up to 15 daily forecasts (sometimes fewer), 1–48 local hourly forecasts, and active severe weather alerts.
- [NOAA Space Weather API](https://fous.com/workflows/noaa-space-weather.md): NOAA Space Weather provides near-term aurora chances, current geomagnetic activity, a three-day Kp outlook, and NOAA alerts from the past 1–7 days.
- [Weather Underground API](https://fous.com/workflows/weather-underground.md): Historical and current weather conditions from stations worldwide.
- [All Weather workflows](https://fous.com/workflows/category/weather)
