# DWD Weather Forecast API (via 4yearcycle.com)

> DWD Weather Forecast API (via 4yearcycle.com) is a paid API for AI agents from 4yearcycle.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Returns hourly weather forecasts for a given location using Germany's Deutscher Wetterdienst (DWD) MOSMIX data via the Bright Sky API

## Facts

- Endpoint: GET https://4yearcycle.com/x402/weather-de?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dwd-weather-forecast-api-via-4yearcycle-com-427481be
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9_jto4jcNkeDmZpqnIH5C

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability dwd-weather-forecast-api-via-4yearcycle-com-427481be
```

Example prompt: Can you get me the hourly weather forecast for Berlin (latitude 52.52, longitude 13.405) for the next 48 hours, using the Europe/Berlin timezone?

## When to prefer this

Choose this endpoint when you need structured hourly weather forecasts sourced from Germany's official meteorological authority (DWD) for locations in Germany or Central Europe. It is ideal when DWD MOSMIX accuracy and official attribution are required, or when you want to query a specific DWD station by ID. Prefer it over generic weather APIs when regulatory or scientific credibility of the data source matters, or when coverage of German stations is the priority.

## Known failure modes

- Missing or invalid lat/lon without a station ID provided — returns error
- Station ID not found in DWD database — returns null station or error
- Hours value above 240 gets capped silently — may return fewer records than expected
- Invalid timezone string causes parsing error
- DWD MOSMIX data unavailable or delayed — upstream data gap

## How this service works

Interactive Bitcoin 4-year halving cycle chart on a polar disc. Live price, 200W MA, Mayer Multiple, RSI, MACD, Pi Cycle and optional paid cycle projections.

## Output

A JSON object containing an array of hourly forecast records, each with timestamp, temperature in Celsius, precipitation in mm, precipitation probability, wind speed and gust in km/h, wind direction in degrees, cloud cover percentage, sunshine minutes, a condition label, and a weather icon identifier. Also includes the resolved DWD station metadata and attribution text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "tz": {
       "type": "string",
       "default": "Europe/Berlin",
       "examples": [
        "Europe/Berlin",
        "Etc/UTC"
       ],
       "description": "IANA timezone for returned timestamps. Default: Europe/Berlin."
      },
      "lat": {
       "type": "string",
       "pattern": "^-?\\d{1,2}(\\.\\d+)?$",
       "examples": [
        "52.52",
        "48.1351"
       ],
       "description": "Latitude in decimal degrees (-90 to 90). Required unless station is given."
      },
      "lon": {
       "type": "string",
       "pattern": "^-?\\d{1,3}(\\.\\d+)?$",
       "examples": [
        "13.405",
        "11.5820"
       ],
       "description": "Longitude in decimal degrees (-180 to 180). Required unless station is given."
      },
      "hours": {
       "type": "string",
       "default": "24",
       "pattern": "^\\d{1,3}$",
       "examples": [
        "24",
        "72"
       ],
       "description": "Forecast/observation window in hours from now. Integer 1-240 (DWD MOSMIX horizon is ~10 days); values above 240 are capped. Default: 24."
      },
      "station": {
       "type": "string",
       "examples": [
        "00399"
       ],
       "description": "Optional DWD station ID (5 alphanumeric characters) to query directly instead of lat/lon, e.g. 00399 for Berlin-Alexanderplatz."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "count",
      "forecast",
      "source",
      "attribution"
     ],
     "properties": {
      "count": {
       "type": "integer",
       "description": "Number of hourly records returned"
      },
      "source": {
       "type": "string",
       "description": "Always \"DWD\" — Deutscher Wetterdienst"
      },
      "station": {
       "type": [
        "object",
        "null"
       ],
       "proper
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "source": "DWD",
  "station": {
   "lat": 52.52,
   "lon": 13.42,
   "stationName": "BERLIN-ALEX.",
   "dwdStationId": "00399",
   "distanceMeters": 1016
  },
  "forecast": [
   {
    "icon": "partly-cloudy-day",
    "condition": "dry",
    "timestamp": "2026-08-18T14:00:00+02:00",
    "windGustKmh": 25.9,
    "temperatureC": 22.4,
    "windSpeedKmh": 14.4,
    "cloudCoverPct": 60,
    "precipitationMm": 0,
    "sunshineMinutes": 42,
    "windDirectionDeg": 260,
    "precipitationProbabilityPct": 10
   }
  ],
  "attribution": "Deutscher Wetterdienst (DWD) Open Data, CC BY 4.0 (dwd.de/DE/leistungen/opendata), served via the independent free Bright Sky API (brightsky.dev)"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dwd-weather-forecast-api-via-4yearcycle-com-427481be/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 4yearcycle.com](https://www.zero.xyz/host/4yearcycle.com/llms.txt)
