# German Weather Data API (DWD) – Hourly Observations & Forecast (`fast_data_asap/german-weather-dwd-open-data`) Actor

Hourly weather observations and forecasts for any place in Germany from Deutscher Wetterdienst (DWD) open data via Bright Sky. Temperature, rain, wind, gusts, clouds, sunshine, humidity, pressure as flat JSON rows. 50 big cities and postal codes built in. $1 per 1,000 locations.

- **URL**: https://apify.com/fast_data_asap/german-weather-dwd-open-data.md
- **Developed by:** [Fast Data](https://apify.com/fast_data_asap) (community)
- **Categories:** Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 locations

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 Data (DWD Open Data) – hourly observations and forecasts as JSON

Get **hourly weather for any place in Germany** from the official open data of the **Deutscher Wetterdienst (DWD)**, delivered through the free [Bright Sky](https://brightsky.dev) JSON API. Past hours come from DWD weather stations, future hours from the DWD MOSMIX forecast – all in one flat table, one row per location and hour.

No API key, no login, no scraping. Just give city names, postal codes or coordinates.

### What you get

For each location and hour: temperature, precipitation, wind speed and gusts, cloud cover, sunshine minutes, relative humidity, pressure, a weather condition (dry, rain, snow, …), the nearest DWD station with its distance, and an `isForecast` flag that separates measured values from forecast values.

- **Hourly mode** – a date range (default: today + 2 days), mixing observations and forecast. Historical data back to 2010 is available.
- **Current mode** – one row per location with the latest station observation.

### Who it is for

- **Shops and retail** – demand forecasting (ice cream, umbrellas, garden, BBQ, fashion) with weather as a feature.
- **Delivery and logistics** – plan routes and staffing around rain, storms and frost.
- **Energy** – solar (sunshine, clouds) and wind input for load and yield models.
- **Events and hospitality** – outdoor events, beer gardens, construction sites.
- **AI agents and automations** – simple, flat JSON that LLMs and n8n/Make/Zapier flows can use directly.

### Why this actor

- Official **DWD data**, not scraped weather websites.
- **Flat rows** with clear units in the field names (`temperatureC`, `windSpeedKmh`, `precipitationMm`) – no nested JSON to unpack.
- **Built-in lookup** for the 50 largest German cities (German and English names, e.g. München/Munich, Köln/Cologne) and their postal codes; any other place works with lat/lon.
- **Cheap and fast**: a typical run finishes in a few seconds, $0.001 per location, no start fee. Errors are free.

### Input

```json
{
  "locations": [
    "Berlin",
    "München",
    "50667",
    { "name": "Shop Hamburg-Altona", "lat": 53.55, "lon": 9.93 }
  ],
  "mode": "hourly",
  "dateFrom": "2026-11-06",
  "dateTo": "2026-11-08",
  "maxHoursPerLocation": 48
}
```

| Field | Description |
|---|---|
| `locations` | City names (50 largest German cities), 5-digit postal codes of those cities, `"lat,lon"` strings or `{name, lat, lon}` objects. Unknown cities produce a free error row. |
| `mode` | `hourly` (default) or `current`. |
| `dateFrom` / `dateTo` | Hourly mode only, `YYYY-MM-DD`. Default: today until today + 2 days. Forecasts reach about 10 days ahead. |
| `maxHoursPerLocation` | Cap on hourly rows per location (default 72). |

Postal codes are resolved at city level (the city's centre coordinates), not to the exact street.

### Output

Real rows from a test run (Berlin, München, 6 Nov 2026):

```json
[
  {
    "location": "Berlin", "lat": 52.52, "lon": 13.405, "mode": "hourly",
    "stationName": "BERLIN-TEMPELHOF", "distanceKm": 5.6,
    "timestamp": "2026-11-06T14:00:00+01:00",
    "temperatureC": 5.3, "precipitationMm": 0, "windSpeedKmh": 16.9, "windGustKmh": 40,
    "cloudCoverPct": 100, "sunshineMin": 0, "relativeHumidityPct": 88, "pressureHpa": 1030.1,
    "condition": "dry", "isForecast": false, "status": "ok", "error": null
  },
  {
    "location": "München", "lat": 48.137, "lon": 11.575, "mode": "hourly",
    "stationName": "MUENCHEN STADT", "distanceKm": 5,
    "timestamp": "2026-11-06T21:00:00+01:00",
    "temperatureC": 3.5, "precipitationMm": 0, "windSpeedKmh": 5.5, "windGustKmh": 11.1,
    "cloudCoverPct": 100, "sunshineMin": 0, "relativeHumidityPct": null, "pressureHpa": 1024.6,
    "condition": "dry", "isForecast": true, "status": "ok", "error": null
  },
  {
    "location": "Atlantis", "lat": null, "lon": null, "mode": "hourly", "status": "error",
    "error": "Unknown city; built-in lookup covers the 50 largest German cities - pass lat/lon instead"
  }
]
```

Some values can be `null` when a station or the forecast does not provide them (e.g. humidity in some forecast hours). Units: °C, mm, km/h, %, minutes, hPa; timestamps in Europe/Berlin time.

### Pricing

**$0.001 per location** with weather data returned (all of its hourly rows included) – $1 per 1,000 locations. Unknown locations and failed requests are not charged. No start fee.

### Use via API, n8n and MCP

**API** (run synchronously and get rows back):

```bash
curl -X POST "https://api.apify.com/v2/acts/fast_data_asap~german-weather-dwd-open-data/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"locations": ["Hamburg", "Köln"], "mode": "current"}'
```

**n8n / Make / Zapier**: use the Apify node/app, choose this actor and pass the same JSON input.

**MCP (Claude, Cursor, other AI agents)**: add the server `https://mcp.apify.com?tools=fast_data_asap/german-weather-dwd-open-data` and ask, for example, “Will it rain in Munich tomorrow afternoon?”.

### Data source and credits

- Weather data: **Deutscher Wetterdienst (DWD)**, [DWD Open Data](https://opendata.dwd.de). Source: Deutscher Wetterdienst. DWD provides its open data free of charge; reuse, including commercial use, requires naming the source. Check the current terms on [opendata.dwd.de](https://opendata.dwd.de) and credit “Deutscher Wetterdienst” when you publish the data.
- API: **[Bright Sky](https://brightsky.dev)** by Jakob de Maeyer – a free, open-source JSON API for DWD open data. Please be considerate with request volume.

This actor is not affiliated with DWD or Bright Sky. Forecasts are model outputs and may be wrong; do not use them for safety-critical decisions.

# Actor input Schema

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

German city names (50 largest cities built in, e.g. Berlin, München, Köln), 5-digit postal codes of those cities (e.g. 10115), 'lat,lon' strings, or objects {"name": "Shop 1", "lat": 52.52, "lon": 13.40}. Unknown cities return an error row (free).

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

hourly = one row per hour for the date range (past observations + DWD MOSMIX forecast for future hours). current = one row per location with the latest observation.

## `dateFrom` (type: `string`):

Hourly mode: first day (YYYY-MM-DD). Default: today. Historical data back to 2010 is available.

## `dateTo` (type: `string`):

Hourly mode: last date/time (YYYY-MM-DD). Default: dateFrom + 2 days (forecast up to ~10 days ahead).

## `maxHoursPerLocation` (type: `integer`):

Caps the number of hourly rows per location.

## Actor input object example

```json
{
  "locations": [
    "Berlin",
    "München"
  ],
  "mode": "hourly",
  "maxHoursPerLocation": 48
}
```

# Actor output Schema

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

No description

# 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": [
        "Berlin",
        "München"
    ],
    "mode": "hourly",
    "maxHoursPerLocation": 48
};

// Run the Actor and wait for it to finish
const run = await client.actor("fast_data_asap/german-weather-dwd-open-data").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": [
        "Berlin",
        "München",
    ],
    "mode": "hourly",
    "maxHoursPerLocation": 48,
}

# Run the Actor and wait for it to finish
run = client.actor("fast_data_asap/german-weather-dwd-open-data").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": [
    "Berlin",
    "München"
  ],
  "mode": "hourly",
  "maxHoursPerLocation": 48
}' |
apify call fast_data_asap/german-weather-dwd-open-data --silent --output-dataset

```

## MCP server setup

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

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/TD3uOUBI56VKPx4MT/builds/6iFj6NiL2Zvqs0XPo/openapi.json
