# German Air Quality Index & Pollutants (Umweltbundesamt) (`opendata-souce2026/german-air-quality-uba`) Actor

Official hourly air quality for about 400 German measuring stations from the Umweltbundesamt: air quality index plus NO2, PM10, PM2.5, ozone, SO2 and CO. Latest hour or any period since 2016, by state, city or near a location.

- **URL**: https://apify.com/opendata-souce2026/german-air-quality-uba.md
- **Developed by:** [Taylor Ford](https://apify.com/opendata-souce2026) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

## German Air Quality Index & Pollutants (Umweltbundesamt)

Get **official, hourly air quality data for Germany** – the air quality index plus **NO₂, PM10, PM2.5, ozone, SO₂ and CO** – for about **400 measuring stations** run by the federal states and the Umweltbundesamt (German Environment Agency).

Ask for the **latest hour**, the last 24 hours, the last 7 days, or **any period back to 2016**. Filter by **federal state**, **city**, **station**, or **near any location** ("the 3 stations closest to my address"). No API key, no scraping, no login.

### What can I use it for?

- 🏠 **Real estate & location reports** – air quality around an address or district.
- 📱 **Apps & smart home** – show current air quality, warn when it turns "poor".
- 🌱 **ESG and sustainability reporting** – NO₂ and particulate matter near sites and offices.
- 📰 **Journalism & research** – compare cities, track trends since 2016.
- 🤖 **AI agents** – call it as a tool via the Apify MCP server: *"How is the air quality in Munich right now?"*

### Data you get

One row per station and hour:

| Field | Meaning |
|---|---|
| `stationName`, `stationCode`, `city`, `state`, `stateCode`, `postalCode`, `street` | Where the station is |
| `latitude`, `longitude`, `areaType`, `sourceType` | Location; urban/suburban/rural; traffic/industry/background |
| `start`, `end`, `timestampUtc` | The hour measured (CET as published, plus UTC) |
| `airQualityIndex`, `airQualityLabel` | 0 = very good, 1 = good, 2 = moderate, 3 = poor, 4 = very poor |
| `no2`, `pm10`, `pm25`, `o3`, `so2` (µg/m³), `co` (mg/m³) | Pollutant values, each with its own index (`no2Index`, …) |
| `distanceKm` | Distance to your location (when you give coordinates) |
| `incomplete` | `true` if not all pollutants were available for that hour |

A **summary** (average index, counts per level, best and worst stations) is saved in the key-value store under `OUTPUT`.

### Example input

```json
{
  "period": "latest",
  "latitude": "48.137",
  "longitude": "11.575",
  "maxStations": 3
}
```

#### Example output

```json
{
  "stationName": "München/Stachus",
  "stationCode": "DEBY115",
  "city": "München",
  "stateCode": "BY",
  "areaType": "urban",
  "sourceType": "traffic",
  "start": "2026-10-06T12:00:00+01:00",
  "timestampUtc": "2026-10-06T11:00:00.000Z",
  "airQualityIndex": 1,
  "airQualityLabel": "good",
  "no2": 31,
  "pm10": 18,
  "pm25": 9,
  "o3": 52,
  "distanceKm": 0.4
}
```

(Values above are illustrative.)

### Notes

- The source publishes times in CET (UTC+1) all year; `timestampUtc` gives the exact instant.
- Data for the current year is provisional; the Umweltbundesamt publishes validated data the following June.
- Not every station measures every pollutant; missing values are `null`.

### Pricing

You pay only per row returned – no monthly fee.

### Source and license

Data: **Umweltbundesamt mit Daten der Messnetze der Länder und des Bundes**, licensed under [Datenlizenz Deutschland – Namensnennung – Version 2.0](https://www.govdata.de/dl-de/by-2-0). Please keep this attribution when you publish the data. This tool is independent and not affiliated with or endorsed by the Umweltbundesamt.

# Actor input Schema

## `period` (type: `string`):

Latest = the most recent published hour for every station. Data is updated hourly and goes back to 2016.

## `startDate` (type: `string`):

Format YYYY-MM-DD. Earliest: 2016-01-01.

## `endDate` (type: `string`):

Format YYYY-MM-DD. Defaults to today.

## `states` (type: `array`):

Only stations in these states. Leave empty for all of Germany.

## `city` (type: `string`):

For example "München", "Berlin" or "Osnabrück". Case-insensitive.

## `stationCodes` (type: `array`):

Exact station codes, e.g. DEBE010. Leave empty for all.

## `latitude` (type: `string`):

With longitude, sorts stations by distance and adds a distanceKm field. Example: 52.52

## `longitude` (type: `string`):

Example: 13.405

## `radiusKm` (type: `integer`):

Only stations within this distance of the location above.

## `maxStations` (type: `integer`):

Keep only the N stations closest to the location above.

## `maxRows` (type: `integer`):

Safety limit for very long custom periods.

## Actor input object example

```json
{
  "period": "latest",
  "maxRows": 100000
}
```

# Actor output Schema

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

One row per station and hour with the air quality index and pollutant values.

## `summary` (type: `string`):

Average index, counts per level, and the best and worst stations.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("opendata-souce2026/german-air-quality-uba").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("opendata-souce2026/german-air-quality-uba").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 '{}' |
apify call opendata-souce2026/german-air-quality-uba --silent --output-dataset

```

## MCP server setup

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

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/Oz5nnU3ZYWTS7WaPr/builds/NCUOtFl8LIeYlqWOX/openapi.json
