# Weather Alerts API - NWS & DWD Severe Warnings, No Key (`martin10291/weather-alerts-api`) Actor

Active official severe weather warnings as JSON, no API key: all US National Weather Service alerts (tornado, flood, winter storm, heat, fire weather, marine) and all German DWD warnings in one CAP-style schema: event, severity, urgency, certainty, onset, expires, headline, instructions, area and st

- **URL**: https://apify.com/martin10291/weather-alerts-api.md
- **Developed by:** [Martin Petrov](https://apify.com/martin10291) (community)
- **Categories:** Developer tools, Automation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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.
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

## Weather Alerts API - NWS & DWD Severe Weather Warnings

**Problem:** your logistics, events, insurance, smart-home or travel app (or AI agent) must know whether an official severe-weather warning is active for a place: tornado, flood, blizzard, heat, storm. Each weather service has its own format (NWS GeoJSON with zone codes, DWD German JSONP and WFS), point lookups need zone matching, and most alerts carry no polygon at all (only 9 of 434 active NWS alerts had one when we measured).

**This API:** one JSON call, no API key, one CAP-style schema for both services.

- **US (National Weather Service):** every active alert in all states, territories and coastal waters: event, severity, urgency, certainty, onset, expires, ends, headline, description, instructions, area, state codes, NWS zones, sender office, link.
- **Germany (Deutscher Wetterdienst):** every active district warning (thunderstorm, wind, rain, snow, fog, frost, black ice, heat, UV) with DWD level 1-4 mapped to CAP severity, English event type, state code and warn-cell ID; text in German as published.
- **Point lookup:** up to 25 `lat,lon` places per call (NWS zone matching for the US, municipality polygons for Germany). A place with no warning returns `activeAlerts: 0`, so you always know it was checked.
- **Filters:** states (`TX`, `Florida`, `BY`, `Bavaria`), `minSeverity` (Minor < Moderate < Severe < Extreme), event words (`tornado`, `flood`, `Gewitter`). Most severe first.
- **Speed:** country/state queries answer from a 2-minute cache in milliseconds.
- **Source on every row:** NWS (public domain) or DWD (CC BY 4.0).

### Example (API)

```bash
curl -X POST "https://api.apify.com/v2/acts/martin10291~weather-alerts-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "area", "country": "US", "minSeverity": "Severe"}'
```

Output row (measured 2026-11-13, text shortened):

```json
{"id": "urn:oid:2.49.0.1.840.0.aaea4f45d822f39dbea817b7f4aac1b21ef430fd.002.1", "country": "US",
 "event": "Blizzard Warning", "severity": "Extreme", "urgency": "Expected", "certainty": "Likely",
 "headline": "Blizzard Warning issued November 12 at 3:33PM AKST until November 15 at 7:00AM AKST by NWS Fairbanks AK",
 "description": "* WHAT...Blizzard conditions. Additional snow accumulations up to 2 inches...",
 "instruction": "Travel should be restricted to emergencies only...",
 "areaDesc": "Northern Arctic Coast", "states": ["AK"], "zones": ["AKZ803"],
 "onset": "2026-11-13T00:33:00Z", "expires": "2026-11-13T16:00:00Z", "ends": "2026-11-15T16:00:00Z",
 "senderName": "NWS Fairbanks AK", "source": "U.S. National Weather Service (api.weather.gov), public domain"}
```

Germany (`{"country": "DE", "states": ["SH"]}`):

```json
{"id": "DWD-bfdf89fabb71411213bd", "country": "DE", "event": "STURMBÖEN", "eventType": "Wind", "severity": "Severe", "dwdLevel": 3,
 "headline": "Amtliche WARNUNG vor STURMBÖEN", "areaDesc": "Insel Helgoland", "states": ["SH"], "stateName": "Schleswig-Holstein",
 "onset": "2026-11-12T20:55:00Z", "expires": "2026-11-13T17:00:00Z", "source": "Deutscher Wetterdienst (dwd.de), CC BY 4.0"}
```

More inputs:

- `{"mode": "point", "locations": ["29.7604,-95.3698", "50.44,9.25"]}` -> warnings for Houston and a town in Hesse, or `activeAlerts: 0`.
- `{"country": "US", "states": ["FL"], "events": ["hurricane", "flood"]}`
- `{"country": "DE", "minSeverity": "Severe"}` -> only DWD level 3-4 (Unwetter).

### Use from agents (MCP)

Add the Apify MCP server (`https://mcp.apify.com?tools=martin10291/weather-alerts-api`) to Claude, Cursor or any MCP client and ask: "Is there any severe weather warning for our warehouses in Houston and Denver right now?".

### Schedule it (alerts monitor)

Set `onlyNew: true` and a `monitorId`, schedule every 5-15 minutes: each run returns only warnings not seen before for that watch (connect a webhook, Slack or e-mail integration for instant notice).

### Input

| Field | Meaning |
|---|---|
| `mode` | area (default) or point |
| `country` | US (default) or DE |
| `states` | optional state codes or names |
| `lat`, `lon` / `locations` | point mode, up to 25 places |
| `minSeverity` | Minor, Moderate, Severe, Extreme |
| `events` | words matched in event/headline |
| `includeGeometry` | add the NWS polygon when there is one |
| `limit` | max rows (default 1000) |
| `onlyNew`, `monitorId` | monitor mode |

### Limits (honest)

- Coverage: United States (NWS) and Germany (DWD). Other European services are not included because their redistribution terms need separate registration.
- DWD texts are in German, as published (event type is also given in English).
- Point lookups call the weather service live (about 0.2-2 s per place, run in parallel).

### Pricing

$1.00 per 1,000 rows.

### FAQ

- **How fresh is the data?** Country/state queries use a copy refreshed every 2 minutes; point queries ask the weather service live (cached 60 s). Every row has `fetchedAt`; if a service is down, the last copy (max 30 min old) is returned with `stale: true`.
- **Why did a place return `activeAlerts: 0`?** No official warning covers it right now. That row tells you the check ran.
- **Errors:** a place outside the US or Germany, an unknown state or a bad `lat,lon` returns a clear message in the run status and `RUN_SUMMARY.lastError`; the run does not fail and you are not charged for rows.
- **Expired warnings** disappear from the feed when the service cancels or lets them expire; use `onlyNew` to log each one once.

# Actor input Schema

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

area = every active warning in a country (US or DE), optionally only some states; point = warnings that cover one or more lat,lon locations (US and Germany).

## `country` (type: `string`):

For area: US (National Weather Service: states, territories, coastal waters) or DE (Germany, Deutscher Wetterdienst).

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

For area: optional state filter. US: TX, FL or Texas; Germany: BY, NW or Bavaria. Empty = whole country.

## `lat` (type: `number`):

For point: latitude, e.g. 39.7392.

## `lon` (type: `number`):

For point: longitude, e.g. -104.9903.

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

For point: up to 25 places as 'lat,lon', e.g. 29.7604,-95.3698. A place with no warning returns one row with activeAlerts 0.

## `minSeverity` (type: `string`):

Only warnings at this level or higher (CAP severity: Minor < Moderate < Severe < Extreme). Empty = all.

## `events` (type: `array`):

Only warnings whose event or headline contains one of these words, e.g. tornado, flood, winter, frost, Gewitter.

## `includeGeometry` (type: `boolean`):

Add the warning polygon (GeoJSON) when the source has one (NWS storm-based warnings).

## `includeTests` (type: `boolean`):

Also return NWS test/keep-alive messages (normally hidden).

## `limit` (type: `integer`):

Maximum rows returned, most severe first. Between 1 and 5000.

## `onlyNew` (type: `boolean`):

Return only warnings not returned before for this Monitor ID. Schedule every 5-15 minutes to get each new warning once.

## `monitorId` (type: `string`):

Name of the watch for only-new mode, e.g. warehouse-texas. Each Monitor ID keeps its own memory.

## Actor input object example

```json
{
  "mode": "area",
  "country": "US",
  "states": [
    "TX",
    "CA",
    "FL"
  ],
  "includeGeometry": false,
  "includeTests": false,
  "limit": 1000,
  "onlyNew": false,
  "monitorId": "default"
}
```

# Actor output Schema

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

One row per active warning: event, severity, urgency, certainty, onset, expires, headline, description, instruction, area, states, source. Point mode adds location and activeAlerts.

# 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 = {
    "mode": "area",
    "country": "US",
    "states": [
        "TX",
        "CA",
        "FL"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("martin10291/weather-alerts-api").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 = {
    "mode": "area",
    "country": "US",
    "states": [
        "TX",
        "CA",
        "FL",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("martin10291/weather-alerts-api").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 '{
  "mode": "area",
  "country": "US",
  "states": [
    "TX",
    "CA",
    "FL"
  ]
}' |
apify call martin10291/weather-alerts-api --silent --output-dataset

```

## MCP server setup

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

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/rmlun4FjO2raVdHjW/builds/1jkgNyUcOj1MXIj5W/openapi.json
