# Air Quality Scraper — Global AQI, PM2.5 & Pollutants (`hipersoft/air-quality-scraper`) Actor

Get current air quality for any place name or coordinates: US & European AQI, PM2.5, PM10, ozone, NO2, SO2, CO, dust and UV, plus optional hourly series — as JSON, CSV or Excel for apps, dashboards, alerts and n8n.

- **URL**: https://apify.com/hipersoft/air-quality-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0002 / location scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Scraper — Global AQI, PM2.5 & Pollutants

Get **live air quality for anywhere on Earth** with the **Air Quality Scraper**. Enter place names or coordinates and export the **US and European AQI, PM2.5, PM10, ozone, nitrogen dioxide, sulphur dioxide, carbon monoxide, dust and UV index** for each — one clean row per location as **JSON, CSV or Excel**.

Built for **health and wellness apps, smart-home and IoT dashboards, air-quality alerts, real-estate and travel tools, and environmental research**, it turns messy pollutant readings into a structured dataset you can drop into any product or workflow.

### What it does

- 🌍 **Global coverage** — air quality for any place name or latitude/longitude, worldwide.
- 🏭 **Full pollutant panel** — US AQI, European AQI, PM2.5, PM10, ozone, NO₂, SO₂, CO, dust and UV index.
- 🌱 **Pollen ready** — request grass, birch, alder and ragweed pollen where available.
- ⏱️ **Current + hourly** — a live snapshot plus an optional hourly forecast series.
- 📍 **Name or coordinates** — type "Delhi" or pass exact coordinates; mix both in one run.
- 📤 **Export anywhere** — JSON, CSV or Excel, or straight into an app, alert or dashboard.

### Example output

```json
{
  "name": "Delhi",
  "country": "India",
  "latitude": 28.65,
  "longitude": 77.23,
  "time": "2026-09-22T05:00",
  "usAqi": 168,
  "pm2_5": 91.4,
  "pm10": 142.7,
  "ozone": 38.0,
  "nitrogenDioxide": 44.1,
  "uvIndex": 6.2,
  "timezone": "Asia/Kolkata"
}
```

### How to use it

1. Add **place names** (one per line) and/or exact **coordinates**.
2. Optionally adjust the **current variables** and add an **hourly** series.
3. Run, and download the results as **JSON, CSV or Excel**.

### Input fields

| Field | Description |
|-------|-------------|
| **Places (by name)** | Place names to resolve and look up (e.g. Singapore, Delhi, Los Angeles). |
| **Locations (by coordinates)** | Exact `{name, latitude, longitude}` objects when you already know the coordinates. |
| **Current variables** | Which current-conditions metrics to include (AQI, PM2.5, ozone, UV…). |
| **Hourly variables** | Optional hourly series (leave empty for current conditions only). |
| **Forecast days** | Days of hourly data to fetch, 1–7 (affects the hourly series). |
| **Timezone** | `auto` for each location's local time, or an IANA name like `Asia/Singapore`. |

### Output fields

`name`, `query`, `latitude`, `longitude`, `country`, `admin1`, `elevation`, `timezone`, `time`, `usAqi`, `europeanAqi`, `pm2_5`, `pm10`, `ozone`, `nitrogenDioxide`, `sulphurDioxide`, `carbonMonoxide`, `dust`, `uvIndex`, `ammonia`, `aerosolOpticalDepth`, `current`, `hourly`, `scrapedAt`.

### Popular use cases

- **Health & wellness apps** — show a live AQI and pollutant breakdown by city.
- **Air-quality alerts** — trigger notifications when PM2.5 or AQI crosses a threshold.
- **Smart-home & IoT dashboards** — enrich indoor sensors with outdoor reference readings.
- **Real estate & travel** — compare air quality across neighborhoods or destinations.
- **Research & analytics** — build multi-city pollutant datasets for study and reporting.

### FAQ

**Do I need an account or key?**
No. Enter your places or coordinates and run.

**Which pollutants are included?**
US AQI and European AQI plus PM2.5, PM10, ozone, nitrogen dioxide, sulphur dioxide, carbon monoxide, dust and UV — with pollen available in supported regions.

**Can I get an hourly forecast, not just current conditions?**
Yes — add hourly variables (e.g. `pm2_5`, `ozone`) and set the number of forecast days.

**Can I look up many cities at once?**
Yes — add as many place names or coordinate objects as you like; each returns its own row.

**Can I export to Excel or Google Sheets?**
Yes — results download as JSON, CSV or Excel and integrate with apps, alerts and dashboards.

***

Structured **global air-quality data** — AQI, PM2.5, PM10, ozone, NO₂ and UV by place or coordinates — clean and export-ready for apps, alerts, dashboards and research.

# Actor input Schema

## `places` (type: `array`):

Place names to look up, one per line (e.g. "Singapore", "Delhi", "Los Angeles"). Each name is resolved to coordinates automatically before its air quality is fetched. Use this OR the Locations field below (you can combine both).

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

Exact coordinates as a list of objects: {"name": "HQ", "latitude": 1.29, "longitude": 103.85}. The optional name is used as a label; latitude and longitude are required. Use this when you already know the coordinates.

## `current` (type: `array`):

Current-conditions variables to include, one per line. Common options: us_aqi, european_aqi, pm2_5, pm10, ozone, nitrogen_dioxide, sulphur_dioxide, carbon_monoxide, dust, uv_index, ammonia, aerosol_optical_depth. Pollen (Europe): alder_pollen, birch_pollen, grass_pollen, ragweed_pollen. Leave as-is for a sensible default set.

## `hourly` (type: `array`):

Optional hourly series variables, one per line (e.g. pm2_5, pm10, ozone, us_aqi). Leave empty to return only current conditions.

## `forecastDays` (type: `integer`):

How many days of hourly forecast to fetch, from today forward (1–7). Only affects the hourly series.

## `timezone` (type: `string`):

Timezone for the returned timestamps. Use "auto" to match each location's local time, or an IANA name like "Asia/Singapore" or "UTC".

## `proxyConfiguration` (type: `object`):

Optional proxy settings for the run. Not required — the data is fetched over plain HTTP.

## Actor input object example

```json
{
  "places": [
    "Singapore",
    "Delhi",
    "Los Angeles"
  ],
  "locations": [],
  "current": [
    "us_aqi",
    "pm2_5",
    "pm10",
    "ozone",
    "nitrogen_dioxide",
    "sulphur_dioxide",
    "carbon_monoxide",
    "dust",
    "uv_index"
  ],
  "hourly": [],
  "forecastDays": 3,
  "timezone": "auto",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# 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 = {
    "places": [
        "Singapore",
        "Delhi",
        "Los Angeles"
    ],
    "locations": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/air-quality-scraper").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 = {
    "places": [
        "Singapore",
        "Delhi",
        "Los Angeles",
    ],
    "locations": [],
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/air-quality-scraper").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 '{
  "places": [
    "Singapore",
    "Delhi",
    "Los Angeles"
  ],
  "locations": []
}' |
apify call hipersoft/air-quality-scraper --silent --output-dataset

```

## MCP server setup

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

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/IboaMrrlfRoN0IYcG/builds/b8qOOBhQY8jLqGSyi/openapi.json
