# Air Quality API, Pollen Count and Wildfire Risk by Ambee (`nabeelbaghoor/air-quality-pollen-api`) Actor

Ambee API for hourly air quality (AQI, PM2.5, PM10, NO2, O3, CO, SO2), pollen count and risk by grass, tree, weed and species, weather, North America wildfire risk and live natural disaster events. Latest, history and forecast by coordinates, place, country or continent. Bring your own key.

- **URL**: https://apify.com/nabeelbaghoor/air-quality-pollen-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Developer tools, Business, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 air quality reading returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Air Quality API, Pollen Count and Wildfire Risk by Ambee

Get hourly air quality, pollen count, weather, wildfire risk and natural disaster events for any coordinates, place, country or continent through the Ambee API, as clean dataset rows. Bring your own API key.

Ambee is an environmental intelligence company that serves hyperlocal air quality for over a million postal codes in 150+ countries at 500 metre resolution, pollen counts and risk by grass, tree, weed and individual species, global weather, a weekly wildfire risk forecast for North America, and a live feed of natural disasters such as wildfires, floods, earthquakes, tropical cyclones, severe storms and volcanoes. This actor wraps the documented Ambee API on api.ambeedata.com so you can feed AQI and pollen data into health and allergy apps, smart buildings, insurance and risk models, BI dashboards, Google Sheets or AI agents without writing an integration.

BYOK, not live tested: every route, parameter and field comes from the Ambee documentation at docs.ambeedata.com, and the routes were probed on 2026-10-25 with an invalid key. The actor has not been run against a live Ambee key.

### What it does

- **Air quality API**: AQI with its category and dominant pollutant, PM2.5, PM10, NO2, ozone, CO and SO2, under the US EPA, India, UK, China or Canada AQI standard. Latest hour, hourly history between two dates, or the hourly forecast for the next 48 hours.
- **Pollen API**: grass, tree and weed pollen counts and risk levels (such as Low or Moderate) every hour, with species counts and species risk (birch, oak, olive, ragweed, nettle and more) in `details`. Latest, history, a 48 hour hourly forecast or a 120 hour forecast every 3 hours.
- **Weather API**: temperature, feels like, humidity, dew point, wind speed, gust and bearing, precipitation intensity and probability, cloud cover, pressure, visibility, UV index and a summary. Latest, history, 48 hour or 120 hour forecast, in Ambee default units or SI.
- **Wildfire risk forecast**: predicted risk level and category for each of the next weeks, with fire weather index, FFMC, temperature, precipitation and days since the last fire (North America).
- **Natural disaster events**: events of the last month near coordinates, in a 3 letter ISO country, on a continent or inside your own polygon, filtered by type (wildfire, flood, earthquake, cyclone, storm, extreme temperature, drought, volcano, landslide, tsunami, sea ice). Pages are followed for you.
- **Disaster event footprint**: the GeoJSON polygon of a disaster event by its event ID.
- **Many places per run**: lat,lng coordinates or place names, one per line; history windows longer than 48 hours are split into 48 hour slices for you.
- **Pay only for results**: unknown places, empty searches and refused lookups are recorded as a free row that says why, never charged.

### How to use it

1. Sign up at api-dashboard.getambee.com and copy the API key shown on the dashboard. Your Ambee plan decides which datasets the key may read and how many calls it gets.
2. Paste the key into the API key field (or set the DATA_API_KEY secret). It is sent only to api.ambeedata.com in the x-api-key header and is removed from everything the actor logs.
3. Pick what to get, add locations (or countries, continents, a polygon or event IDs), choose the timeframe and start the run. Download the rows as JSON, CSV or Excel, or call the actor from your own code.

A missing or rejected key, a key without permission for a dataset or a used up quota ends the run cleanly with a status message that says what to change.

### Input

| Field | Modes | Description |
| --- | --- | --- |
| `mode` | all | `airQuality` (default), `pollen`, `weather`, `wildfireRisk`, `disastersNearby`, `disastersByCountry`, `disastersByContinent`, `disastersInPolygon` or `disasterFootprint` |
| `locations` | air quality, pollen, weather, wildfire risk, disasters near coordinates | One per line: `lat,lng` such as `12.9889055,77.574044`, or a place name such as `Bengaluru` |
| `countryCodes` | disasters by country | 3 letter ISO codes such as USA, GBR, IND |
| `continents` | disasters by continent | AFR, ANT, ASIA, AUS, EUR, NAR, SAR, Ocean |
| `polygon` | disasters in a polygon | One `lat,lng` vertex per line, at least 3, area up to 100 km2 |
| `eventIds` | disaster event footprint | event_id values from a disaster mode |
| `timeframe` | air quality, pollen, weather | `latest`, `history` or `forecast` |
| `forecastHours` | pollen, weather | `48` (hourly) or `120` (every 3 hours) |
| `historyFrom`, `historyTo` | history | YYYY-MM-DD or YYYY-MM-DD hh:mm:ss in UTC; defaults to the last 24 hours, up to 31 days |
| `aqiStandard` | air quality | EPA, IN, UK, CN or CA |
| `speciesRisk` | pollen | Ask for sub species risk where supported |
| `units` | weather | Ambee default units or SI |
| `includeLocalTime` | air quality, pollen, weather | Add the local time of each reading |
| `eventType` | disasters near coordinates, by country, by continent | One event type code |
| `language` | all | Accept-Language for the answers (enabled by Ambee on demand) |
| `maxResults` | all | Most rows to return and charge for |
| `requestsPerMinute` | all | Pacing for calls to Ambee |
| `apiKey` | all | Your Ambee API key (secret) |

### Output

Every row has flat columns that are easy to filter and chart, and keeps the full Ambee record in `details`: `latitude`, `longitude`, `timezone`, `timestamp`, `unixTs`, `aqi`, `aqiCategory`, `dominantPollutant`, `pm25`, `pm10`, `no2`, `o3`, `co`, `so2`, `grassPollenCount`, `treePollenCount`, `weedPollenCount`, `grassPollenRisk`, `treePollenRisk`, `weedPollenRisk`, `temperature`, `apparentTemperature`, `humidity`, `windSpeed`, `precipIntensity`, `uvIndex`, `weatherSummary`, `fireWeek`, `fireRiskLevel`, `fireRiskCategory`, `fireWeatherIndex`, `eventId`, `eventType`, `eventName`, `alertLevel`, `eventDate`, `countryCode`, `state`, `city` and `geometry`. A refused lookup has `found` set to false and a `note` with Ambee's own words.

Example air quality row (values from the Ambee documentation sample):

```json
{
    "mode": "airQuality",
    "modeLabel": "Air quality",
    "recordType": "airQuality",
    "query": "12.9889055,77.574044",
    "found": true,
    "latitude": 12.9889055,
    "longitude": 77.574044,
    "timezone": "Asia/Kolkata",
    "timestamp": "2026-05-04T06:00:00.000Z",
    "unixTs": 1777874766,
    "aqi": 25,
    "aqiCategory": "Good",
    "dominantPollutant": "O3",
    "pm25": 3.508,
    "pm10": 4.653,
    "no2": 0.031,
    "o3": 26.548,
    "co": 0.056,
    "so2": 0.092,
    "details": {
        "CO": 0.056, "NO2": 0.031, "OZONE": 26.548, "PM10": 4.653, "PM25": 3.508, "SO2": 0.092, "AQI": 25,
        "aqiInfo": { "pollutant": "O3", "concentration": 27, "category": "Good" },
        "unixTs": 1777874766, "timestamp": "2026-05-04T06:00:00.000Z"
    },
    "retrievedAt": "2026-10-25T12:00:00.000Z",
    "note": null
}
```

Pollen rows fill the six pollen columns and keep `Species` and `SpeciesRisk` in `details`. Weather rows fill the weather columns. Wildfire risk rows carry `fireWeek`, `fireRiskLevel`, `fireRiskCategory` and `fireWeatherIndex`. Disaster rows carry the event columns with the event specific `details` (magnitude, burned area, casualties and so on). Footprint rows carry the GeoJSON `geometry`.

### Pricing

| Event | Price | Charged for |
| --- | --- | --- |
| `air-quality-reading` | 0.005 USD | Each hourly air quality record |
| `pollen-reading` | 0.006 USD | Each hourly pollen record |
| `weather-reading` | 0.005 USD | Each hourly or 3 hourly weather record |
| `wildfire-risk-forecast` | 0.01 USD | Each weekly wildfire risk forecast |
| `disaster-event` | 0.01 USD | Each natural disaster event |
| `event-footprint` | 0.01 USD | Each disaster event polygon |

Unknown places, empty searches and refused lookups are never charged. Your Ambee plan is billed separately by Ambee.

### FAQ

#### What is the Ambee API?

Ambee is an environmental data company that offers REST APIs for air quality, pollen, weather, wildfire risk, natural disasters, solar parameters and influenza like illness forecasts. Its answers are JSON, authenticated with an `x-api-key` header, on api.ambeedata.com.

#### Do I need my own Ambee API key?

Yes. This is a bring your own key actor: it calls Ambee with your key, under your plan, its quota and its terms. Get the key from the Ambee API dashboard at api-dashboard.getambee.com.

#### How do I get the AQI for a city or postal code?

Choose Air quality, put the place name (such as Bengaluru or London) or its lat,lng coordinates in Locations, and run with the latest timeframe. Coordinates are the most precise; Ambee resolves place names itself. Pick the AQI standard your users expect, such as US EPA or India.

#### How do I get a pollen forecast for allergy alerts?

Choose Pollen, set the timeframe to forecast and pick 48 hours (hourly) or 120 hours (every 3 hours). Each row has grass, tree and weed pollen counts and risk; tick species level pollen risk to ask Ambee for sub species risk where it supports it. Ambee pollen coverage excludes South America, the Arctic, Antarctica and the oceans.

#### Can I get historical air quality, pollen and weather data?

Yes. Set the timeframe to history and give a start and end in UTC. Ambee serves history 48 hours per call, so longer windows are split into 48 hour slices automatically, up to 31 days per run. Overlapping hours are never charged twice.

#### Where does the wildfire risk forecast work?

Ambee documents its fire risk forecast for North America. Each row is one week with the predicted risk level and category (such as moderate) and the fire weather index. For live fires anywhere, use the natural disaster modes with the WF (wildfire) event type.

#### Which natural disasters are covered?

Tsunamis, earthquakes, tropical cyclones, wildfires, floods, extreme temperature, droughts, severe storms, sea ice, volcanoes, landslides and miscellaneous events, updated every 6 hours, for the last month, worldwide. Search near coordinates, by country, by continent or inside a polygon of up to 100 km2, then fetch an event's polygon footprint by its event ID.

#### What do I pay?

Pay per result: 0.005 USD per air quality or weather reading, 0.006 USD per pollen reading and 0.01 USD per wildfire risk week, disaster event or event footprint. Refused and empty lookups are free.

### Keyword map

air quality API, AQI API, air pollution API, PM2.5 API, air quality forecast API, historical air quality data, pollen API, pollen count API, pollen forecast API, allergy API, tree pollen, grass pollen, ragweed pollen, weather API, weather forecast API, wildfire risk API, fire risk forecast, natural disaster API, disaster alerts API, earthquake API, flood alerts, environmental data API, Ambee API, Ambee air quality, Ambee pollen.

### Routes: probed vs documented

Every route comes from the Ambee documentation (docs.ambeedata.com, checked on 2026-10-25). On 2026-10-25 each route was called with an invalid key of realistic length, alongside invented paths as a control. Ambee checks the key before the route: real and invented paths alike answered 401 `{"message":"Invalid authentication key"}`, so the probe confirms the host, the header name and the refusal the actor reports as a key problem, but cannot tell a real path from an invented one. Response shapes come from the documentation samples. Older Ambee routes by postal code or city (v1 and v2) are no longer documented, so this actor uses the v3 coordinates and place search.

### Licensing and data use

This actor works only with your own Ambee account and API key, and Ambee's terms apply to the data. Ambee's terms forbid selling, sublicensing or transferring its service without permission, and redistributing raw Ambee data to others needs a separate reseller agreement with Ambee; caching results for your own product follows your Ambee services agreement. This actor is not affiliated with or endorsed by Ambee.

# Actor input Schema

## `mode` (type: `string`):

Air quality: hourly AQI, PM2.5, PM10, NO2, ozone, CO and SO2. Pollen: hourly grass, tree and weed pollen counts and risk, with species detail. Weather: hourly temperature, humidity, wind, precipitation and more. These three take a timeframe (latest, history or forecast). Wildfire risk forecast: weekly risk for the next 4 weeks in North America. Natural disasters near coordinates, by country, by continent or in a polygon: events of the last month such as wildfires, floods, earthquakes and cyclones. Disaster event footprint: the polygon of one event.

## `locations` (type: `array`):

Air quality, pollen, weather, wildfire risk and disasters near coordinates. One location per line: lat,lng coordinates such as 12.9889055,77.574044, or a place name such as Bengaluru or Leon, Mexico. Disasters near coordinates take coordinates only.

## `countryCodes` (type: `array`):

Natural disasters by country only. 3 letter ISO country codes, one per line, such as USA, GBR or IND.

## `continents` (type: `array`):

Natural disasters by continent only. One or more continents.

## `polygon` (type: `array`):

Natural disasters in a polygon only. One lat,lng vertex per line, at least 3; the ring is closed for you. Ambee accepts areas of up to 100 km2.

## `eventIds` (type: `array`):

Disaster event footprint only. One event_id per line, as returned in the eventId column of a disaster mode.

## `timeframe` (type: `string`):

Air quality, pollen and weather only. Latest is the current hour; history reads every hour between the history start and end; forecast reads the next 48 hours (or 120 hours for pollen and weather).

## `forecastHours` (type: `string`):

Pollen and weather forecasts only. Ambee forecasts air quality 48 hours ahead.

## `historyFrom` (type: `string`):

History timeframe only. YYYY-MM-DD or YYYY-MM-DD hh:mm:ss, read as UTC. Defaults to 24 hours before the end. The window is read in slices of 48 hours, up to 31 days.

## `historyTo` (type: `string`):

History timeframe only. YYYY-MM-DD or YYYY-MM-DD hh:mm:ss, read as UTC. Defaults to the current hour.

## `aqiStandard` (type: `string`):

Air quality only. The standard Ambee uses to calculate the AQI value and its category.

## `speciesRisk` (type: `boolean`):

Pollen only. Asks Ambee for sub species risk where the region supports it.

## `units` (type: `string`):

Weather only. SI sends units=si to Ambee.

## `includeLocalTime` (type: `boolean`):

Air quality, pollen and weather only. Asks Ambee to add the localTime of each reading.

## `eventType` (type: `string`):

Natural disasters near coordinates, by country or by continent, optional. Keeps only events of this type.

## `language` (type: `string`):

Optional. Sent as the Accept-Language header; Ambee enables languages other than English on demand.

## `maxResults` (type: `integer`):

The most rows this run returns and charges for.

## `requestsPerMinute` (type: `integer`):

Pacing for calls to the Ambee API. Your Ambee plan sets the real ceiling.

## `apiKey` (type: `string`):

Your own Ambee API key from api-dashboard.getambee.com. Stored as a secret and sent only to api.ambeedata.com in the x-api-key header; it is never logged. You can instead set the DATA_API_KEY environment secret.

## Actor input object example

```json
{
  "mode": "airQuality",
  "locations": [
    "12.9889055,77.574044"
  ],
  "timeframe": "latest",
  "forecastHours": "48",
  "aqiStandard": "EPA",
  "speciesRisk": false,
  "units": "imperial",
  "includeLocalTime": false,
  "maxResults": 100,
  "requestsPerMinute": 60
}
```

# Actor output Schema

## `records` (type: `string`):

One row per reading, wildfire risk week, disaster event or event footprint.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "locations": [
        "12.9889055,77.574044"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/air-quality-pollen-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "locations": ["12.9889055,77.574044"] }

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/air-quality-pollen-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "locations": [
    "12.9889055,77.574044"
  ]
}' |
apify call nabeelbaghoor/air-quality-pollen-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nabeelbaghoor/air-quality-pollen-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/IwYq0zD56WHyZVlcN/builds/QrpppmsKOJh9iCDZ0/openapi.json
