# German Weather History (DWD Open Data) (`adamplaenitz/dwd-weather-history`) Actor

Daily and hourly weather station data of the German Weather Service (DWD): temperature, precipitation, wind, sunshine, pressure, cloud cover and humidity from 1,000+ stations, back to the 19th century. Station search by name or coordinates.

- **URL**: https://apify.com/adamplaenitz/dwd-weather-history.md
- **Developed by:** [Adam Plänitz](https://apify.com/adamplaenitz) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 daily weather records

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 Weather History (DWD Open Data)

**Daily and hourly weather observations of the German Weather Service (Deutscher Wetterdienst, DWD) as clean JSON, CSV or Excel: temperature, precipitation, snow depth, wind, sunshine, air pressure, cloud cover and humidity from the DWD station network (about 560 active climate stations with daily data, 1,300+ including closed ones, and many more precipitation stations) – from yesterday back to the 19th century. Select stations by ID, by name or by distance to a point.**

*Deutsche Kurzfassung weiter unten.*

### What does it do?

The Actor reads the station files of the **DWD Climate Data Center** on [opendata.dwd.de](https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/), unpacks them and returns:

- **Weather data** – one record per station and **day** or per station and **hour** (UTC) for any period. Recent values (about the last 500 days) and the validated historical archive are combined automatically.
- **Station search** – stations by name or within a radius around coordinates, with distance, data period and whether the station is still active.

You do not need to know the DWD folder structure, file names, ZIP archives or the column codes (`TMK`, `RSK`, `TT_TU` …): fields have readable names, missing values (`-999`) become `null`.

### Who is it for?

- **Energy, agriculture, construction and insurance** – heating degree days, rainfall, frost or storm days for a site.
- **Data scientists and analysts** – long, clean weather series as model features (sales, demand, yield).
- **Claims and expert reports** – weather on a given day at the nearest official station.
- **Journalists, researchers, hobby meteorologists** – climate comparisons and records.

### How to use it

- **Last 30 days, two cities (default):** stations `Nürnberg`, `Berlin-Tempelhof`, resolution *daily*.
- **Weather at an address on a given day:** *Latitude* `49.4521`, *Longitude* `11.0767`, *Nearest stations* `3`, start and end date `2024-07-13`.
- **Hourly series:** resolution *hourly*, parameter groups `air_temperature`, `wind`, period `2025-01-01` – `2025-01-31`.
- **Find stations:** mode *Station search*, coordinates and radius, or a name such as `München`.
- **Monthly feed:** schedule the Actor with start date `30 days` and an integration (Google Sheets, webhook).

### Input

| Field | Example | Notes |
|---|---|---|
| Stations | `03668`, `3668`, `Nürnberg`, `Hamburg-Fuhlsbüttel` | ID or name; a partial name picks the best station with data for the period |
| Latitude / Longitude | `49.4521` / `11.0767` | nearest stations with data for the period |
| Radius (km) | `25` | |
| Nearest stations to use | `3` | data mode |
| Mode | `data` / `stations` | weather values or station search |
| Resolution | `daily` / `hourly` | hourly times are UTC |
| Start date / End date | `2024-01-01`, `30 days`, `yesterday` | default: last 30 days (daily) or 7 days (hourly) |
| Parameter groups | `air_temperature`, `precipitation`, `wind`, `sun`, `pressure`, `cloudiness`, `dew_point` | default: the first four |
| Only active stations | `true` | station search |
| Max items | `10000` | charged items per run |

Stations that are not found, or that have no data for the period, are reported as free rows with an `error` field.

### Output example (daily, shortened)

```json
{
  "stationId": "03668",
  "stationName": "Nürnberg",
  "state": "Bayern",
  "latitude": 49.503,
  "longitude": 11.0549,
  "elevation": 314,
  "resolution": "daily",
  "date": "2026-10-20",
  "tempMean": 7.2,
  "tempMax": 13.7,
  "tempMin": 0.1,
  "tempMinGround5cm": -1.6,
  "humidity": 82.04,
  "precipitation": 0.9,
  "precipitationForm": 6,
  "snowDepth": 0,
  "windGustMax": 7,
  "windSpeedMean": 2,
  "sunshineHours": 6.183,
  "quality": { "air_temperature": 1, "precipitation": 1, "wind": 1, "sun": 1 },
  "license": "Creative Commons BY 4.0 (CC BY 4.0)",
  "attribution": "Source: Deutscher Wetterdienst (DWD), Climate Data Center, opendata.dwd.de"
}
```

**Fields (daily):** `tempMean`, `tempMax`, `tempMin` (°C, 2 m), `tempMinGround5cm` (°C), `humidity` (%), `precipitation` (mm), `precipitationForm` (DWD code: 0 none, 1 rain, 4 unknown form, 6 rain, 7 snow, 8 rain and snow, 9 not determinable), `snowDepth` (cm), `windGustMax`, `windSpeedMean` (m/s), `sunshineHours`, `pressureStation` (hPa, station level), `cloudCover` (eighths), `vaporPressure` (hPa).

**Fields (hourly):** `temperature` (°C), `humidity` (%), `precipitation` (mm), `precipitationIndicator` (0/1), `precipitationForm` (DWD code), `windSpeed` (m/s), `windDirection` (°), `sunshineMinutes`, `pressureSeaLevel`, `pressureStation` (hPa), `cloudCover` (eighths, -1 = not determinable), `dewPoint` (°C). Times are `timestamp` in UTC.

`quality` holds the DWD quality level per parameter group (DWD "QN" code: 1 = only formal checks, 3 = automatic checks and corrections, 10 = quality control and all corrections finished; see the DWD product description). Station search records contain `dataFrom`, `dataTo`, `active` and `distanceKm`. A `RUN-SUMMARY` record in the key-value store lists the stations used, record counts and the DWD files read.

### Pricing and speed

See the **Pricing** tab for the current price. Daily records, hourly records and station search results are charged as separate events; an hourly record costs a fraction of a daily record. Error rows are free. A few stations for one month take about 5–10 seconds; a full year of hourly data for three stations (26,000 records) about one minute. Long hourly periods download archives of several MB per station and parameter group.

### Data source, licence and privacy

- **Source:** [Deutscher Wetterdienst (DWD), Climate Data Center (CDC)](https://opendata.dwd.de/climate_environment/CDC/) – observations Germany, products *daily/kl* and *hourly* (air_temperature, precipitation, wind, sun, pressure, cloudiness, dew_point).
- **Licence:** According to the [CDC terms of use](https://opendata.dwd.de/climate_environment/CDC/Terms_of_use.txt), the data are available under **Creative Commons BY 4.0** ([dwd.de/copyright](https://www.dwd.de/copyright)). Attribution is required: please name *Deutscher Wetterdienst* as the source when you publish the data or results. Every record contains `license` and `attribution` fields for this.
- **Data quality:** recent values are checked only automatically and may still be corrected by the DWD; historical values are validated. The DWD accepts no liability for the data. Not an official weather warning service.
- **No personal data:** only stations and measurements. Observer names in the DWD metadata files are not read.
- This Actor is an independent tool and is **not affiliated with or endorsed by the Deutscher Wetterdienst**.

### Limits

- Only stations in Germany operated by or for the DWD; no forecasts and no gridded or radar data.
- Not every station measures every parameter (many stations only measure precipitation); missing values are `null`.
- Hourly values are in UTC. Daily values follow the DWD climate day definition.
- Recent data are published with a delay of about one day; the historical archive is updated once a year.
- Names are matched exactly first, then by prefix and substring; for an ambiguous name the station with data for your period and the longest record is used (the log lists the alternatives). Use the station ID for full control.

Questions or feature requests? Please open an issue in the **Issues** tab – usually answered within 1–2 working days.

***

### Deutsch (Kurzfassung)

**Tages- und Stundenwerte der Wetterstationen des Deutschen Wetterdienstes (DWD) aus dem Open-Data-Angebot des Climate Data Center – Temperatur, Niederschlag, Schneehöhe, Wind, Sonnenscheindauer, Luftdruck, Bewölkung und Luftfeuchte von rund 560 aktiven Klimastationen (über 1.300 inkl. geschlossener) und weiteren Niederschlagsstationen, vom Vortag bis ins 19. Jahrhundert.**

- Auswahl über Stations-ID (z. B. `03668`), Stationsname (`Nürnberg`) oder die nächstgelegenen Stationen zu Koordinaten.
- Ein Datensatz je Station und Tag bzw. Stunde (UTC); aktuelle und historische (geprüfte) Daten werden automatisch zusammengeführt.
- Stationssuche nach Name oder Umkreis mit Entfernung und Datenzeitraum.
- Quelle: Deutscher Wetterdienst, Lizenz CC BY 4.0 – bei Veröffentlichung bitte „Deutscher Wetterdienst“ als Quelle nennen. Keine Verbindung zum DWD.

# Actor input Schema

## `stations` (type: `array`):

DWD weather stations by station ID (e.g. 03668 or 3668) or name (e.g. Nürnberg or Nuernberg, Berlin-Tempelhof, Hamburg-Fuhlsbüttel, München-Stadt). A name that is not exact also finds stations starting with or containing it; then the station with data for your period and the longest record is used. In station search mode all matching stations are listed.

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

Optional point (decimal degrees, e.g. 49.4521) to use the nearest stations with data for the period, or to search stations nearby.

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

Longitude of the point in decimal degrees, e.g. 11.0767.

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

Search radius around the point (1–500 km).

## `maxStationsNearby` (type: `integer`):

Data mode: number of nearest stations within the radius that are used (1–100).

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

data = weather values (one item per station and day or hour). stations = station search: list stations by name and/or distance with their data period.

## `resolution` (type: `string`):

daily = daily values (mean/max/min temperature, precipitation, sunshine, wind …). hourly = hourly values (times in UTC).

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

First day (YYYY-MM-DD) or relative, e.g. '30 days' or '1 year'. Empty = 30 days (daily) or 7 days (hourly) before the end date.

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

Last day (YYYY-MM-DD), 'yesterday' or relative, e.g. '7 days'. Empty = today. DWD publishes recent values with a delay of about one day.

## `parameters` (type: `array`):

Which values to output. Empty = air temperature, precipitation, wind and sunshine. Hourly: every group is a separate DWD file per station.

## `onlyActive` (type: `boolean`):

Station search mode: list only stations that currently report data (closed historical stations are skipped).

## `maxItems` (type: `integer`):

Upper limit of charged items per run (station-days, station-hours or stations).

## Actor input object example

```json
{
  "stations": [
    "Nürnberg",
    "Berlin-Tempelhof"
  ],
  "radiusKm": 25,
  "maxStationsNearby": 3,
  "mode": "data",
  "resolution": "daily",
  "onlyActive": true,
  "maxItems": 100000
}
```

# Actor output Schema

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

One item per station and day or hour (data mode) or per station (station search).

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

Period, parameters, stations used with record counts and source files, stations not found, request statistics.

# 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 = {
    "stations": [
        "Nürnberg",
        "Berlin-Tempelhof"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("adamplaenitz/dwd-weather-history").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 = { "stations": [
        "Nürnberg",
        "Berlin-Tempelhof",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("adamplaenitz/dwd-weather-history").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 '{
  "stations": [
    "Nürnberg",
    "Berlin-Tempelhof"
  ]
}' |
apify call adamplaenitz/dwd-weather-history --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,adamplaenitz/dwd-weather-history"
        }
    }
}
```

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/jU9X4U1gjzEhFoigG/builds/eeyLJrKfc9MuIOxNG/openapi.json
