# NWS Weather Alerts Delta Monitor (`apex-nexus/nws-weather-alerts-delta-monitor`) Actor

Watchlist-based delta monitor of U.S. National Weather Service active weather alerts — emits one dataset item per newly observed alert matching your state/zone/event-type/severity watchlist. Free when nothing changes. Public data: https://api.weather.gov/alerts/active

- **URL**: https://apify.com/apex-nexus/nws-weather-alerts-delta-monitor.md
- **Developed by:** [Valunex](https://apify.com/apex-nexus) (community)
- **Categories:** News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 alert delivereds

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

## NWS Weather Alerts Delta Monitor

Watchlist-based delta monitor of U.S. National Weather Service (NWS) active
weather alerts. Emits one dataset alert per newly observed NWS alert matching
a state / zone / event-type / severity watchlist — **"free when nothing
changes"** (unchanged replays emit nothing).

### Discovery (search terms)

NWS weather alerts monitor · National Weather Service alert watchlist · severe
weather alert tracker · api.weather.gov alerts monitor · weather.gov active
alerts delta · NOAA weather alert monitor · NWS tornado flood winter weather
fire weather watchlist

### Who it is for

Commercial insurers (hail/wind/storm claims), construction and site managers,
event venues and organizers, schools, and logistics and fleet operators that
need early severe-weather signal to reduce property loss and downtime.

### What it monitors

The NWS active-alerts feed
(https://api.weather.gov/alerts/active?status=actual) for new active weather
alerts — tornado, severe thunderstorm, flood, flash flood, winter weather and
fire weather — matching the watchlist. The Actor emits one dataset item per
newly observed alert since the last run.

### Data source

Public NWS data only — no API key, no login, no proxies:

- https://api.weather.gov/alerts/active — official NWS alerts API. Public, no
  API key (requires only a courtesy User-Agent header identifying the
  application — not a credential or secret), returns GeoJSON, US government
  public domain data.
  Source: https://www.weather.gov/documentation/services-web-api

No credentials, no proxies, no scraping of anti-bot pages, no commercial
inference (no LLMs) inside the product.

### Input

See `actor/.actor/input_schema.json`. All fields optional; the default input
watches every active alert nationwide.

- `watchlist`: array of pipe-separated filter strings
  `"state|zone|eventType|severity"` (max 50). Every field is optional — leave
  it empty to match anything (e.g. `"CA||Flash Flood|Severe"` matches
  California flash-flood alerts of any severity; `"|||"` matches everything).
  Leave the watchlist empty to monitor every active alert nationwide. One
  checkpoint is kept per entry so repeat runs emit only new alerts.
  - `state`: U.S. state 2-letter ANSI code (e.g. `"CA"`). Matched against the
    alert's UGC zone state prefix and area description.
  - `zone`: NWS UGC zone code (e.g. `"NMC007"`). Matched against the alert's
    geocode UGC zones and affected zones.
  - `eventType`: case-insensitive substring matched against the NWS event name
    (e.g. `"Tornado"`, `"Severe Thunderstorm"`, `"Flash Flood"`, `"Winter Storm"`,
    `"Fire Weather"`).
  - `severity`: alert severity (e.g. `"Extreme"`, `"Severe"`, `"Moderate"`,
    `"Minor"`). Case-insensitive.
- `sinceDays` (1-365, default 1): how far back to look for active alerts on
  the first run; repeat runs only emit alerts newer than the last checked
  state.
- `maxResults` (1-200, default 50): cap on alerts emitted in a single run.

Example (severe flood watchlist for California):

```json
{
  "watchlist": [
    "CA||Flash Flood|Severe",
    "CA||Flood|Severe"
  ],
  "sinceDays": 1,
  "maxResults": 50
}
```

### Output

One dataset item per new weather alert alert. Sample:

```json
{
  "alertId": "urn:oid:2.49.0.1.840.0.c23205fe48dff016d59bd5b73fabc636b758456a.002.1",
  "event": "Severe Thunderstorm Watch",
  "severity": "Severe",
  "urgency": "Future",
  "certainty": "Possible",
  "effective": "2026-11-01T19:00:00-07:00",
  "expires": "2026-11-01T21:00:00-07:00",
  "onset": "2026-11-01T19:00:00-07:00",
  "sent": "2026-11-01T11:45:00-07:00",
  "areaDesc": "Colfax, NM; Guadalupe, NM; Lincoln, NM",
  "state": "NM",
  "zones": ["NMC007", "NMC019", "NMC027"],
  "senderName": "NWS Albuquerque NM",
  "status": "Actual",
  "messageType": "Update",
  "category": "Met",
  "web": "https://alerts.weather.gov/cap/...php",
  "eventTimeMs": 1790000200000,
  "newSinceLastRun": true,
  "watchlistMatched": { "state": "NM", "zone": null, "eventType": null, "severity": null },
  "source": "https://api.weather.gov/alerts/active"
}
```

### Checkpoint / delta behaviour

State (a per-entry since-time checkpoint plus a set of seen alert ids) is
kept per watchlist entry in the Actor default key-value store. Repeat runs
emit only genuinely new alerts matching the watchlist; unchanged replays emit
nothing ("free when nothing changes"). Resetting the store re-emits the
baseline.

### Limits

- Max 50 watchlist entries, 200 alerts per run, 365-day lookback.
- The full set of currently active alerts is fetched once per run (~400-500
  alerts, ~1 second) and filtered client-side; one API failure never aborts
  the run.

### Files

- `actor/main.py` — Apify SDK Python Actor
- `actor/requirements.txt` — pinned deps (`apify==4.1.0`, `httpx==0.27.2`)
- `actor/tests/test_monitor.py` — deterministic unit tests, no network
- `actor/.actor/actor.json`, `.actor/input_schema.json`,
  `.actor/output_schema.json`, `.actor/dataset_schema.json` — Apify platform
  metadata

### Verification

Run `pytest actor/tests` before release (builder acceptance criterion). The
suite is deterministic and needs no network. Run `ruff check actor/` and
`ruff format --check actor/` to keep the source clean.

### Licensing

Only Apify SDK + httpx. Original code; no competitor code copied; no Apex
code; no secrets committed. Public domain US government data.

# Actor input Schema

## `watchlist` (type: `array`):

Each entry is a pipe-separated filter "state|zone|eventType|severity" (U.S. state 2-letter ANSI code such as CA, NWS UGC zone code such as NMC007, event type substring such as "Flash Flood", severity such as "Severe"). Leave a field empty to match anything (e.g. "CA||Flash Flood|" matches California flash-flood alerts of any severity). Leave the watchlist empty to monitor every active alert nationwide. One checkpoint is kept per entry so repeat runs emit only new alerts.

## `sinceDays` (type: `integer`):

How far back to look for active alerts on the first run; repeat runs only emit alerts newer than the last checked state.

## `maxResults` (type: `integer`):

Cap the number of new alerts emitted in a single run.

## Actor input object example

```json
{
  "watchlist": [],
  "sinceDays": 1,
  "maxResults": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset items filtered by the overview view defined in the dataset schema.

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

All dataset items emitted by the Actor run (newly detected weather alerts).

# 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 = {
    "watchlist": [],
    "sinceDays": 1,
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("apex-nexus/nws-weather-alerts-delta-monitor").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 = {
    "watchlist": [],
    "sinceDays": 1,
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("apex-nexus/nws-weather-alerts-delta-monitor").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 '{
  "watchlist": [],
  "sinceDays": 1,
  "maxResults": 50
}' |
apify call apex-nexus/nws-weather-alerts-delta-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apex-nexus/nws-weather-alerts-delta-monitor"
        }
    }
}
```

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/X7jhEZQs3tEbXOeJM/builds/DgpFyIS8Pen9WFcw1/openapi.json
