# NWS Weather Alert Change Monitor - New & Updated Only (`rtworule/nws-weather-alert-delta-monitor`) Actor

Deduplicate official US NWS alerts across scheduled runs. Emit only new, updated, cancelled, or expired changes for notifications, automations, and AI agents.

- **URL**: https://apify.com/rtworule/nws-weather-alert-delta-monitor.md
- **Developed by:** [Kunteper Koyu](https://apify.com/rtworule) (community)
- **Categories:** News, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 alert lifecycle changes

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## NWS Weather Alert Change Monitor

Monitor official National Weather Service alerts without sending the same active warning through an automation on every scheduled run. This Actor remembers alert state in an Apify key-value store and emits dataset records only when a monitored alert is new, updated, cancelled, or expired.

It is designed for recurring Apify schedules, Make, Zapier, n8n, Slack, Microsoft Teams, dashboards, AI agents, and data pipelines that need a clean change feed instead of repeated snapshots.

### Use cases

The official NWS API returns active alerts, but a polling workflow normally receives unchanged records again and again. Updates also get new alert identifiers and reference earlier CAP messages. A simple ID deduplicator can therefore miss the relationship between an original alert and its later update.

This Actor follows NWS reference identifiers, keeps a bounded active-state record, and returns a lifecycle-oriented dataset. Users can attach an Apify webhook to each successful run and process only the records that represent meaningful changes.

The upstream source is the official, public `api.weather.gov` service. No proxy, browser, login, or third-party API key is required.

### Quick start

The default input monitors Virginia and establishes a baseline without emitting existing alerts:

```json
{
  "areas": ["VA"],
  "firstRun": "baselineOnly",
  "stateStoreName": "my-virginia-alert-monitor"
}
````

Run the same input on an Apify schedule every 5 to 15 minutes. Later runs emit only changes. Use a different `stateStoreName` for every independent schedule or watchlist.

To return current active alerts immediately during a one-time test, set `firstRun` to `emitCurrent` and use a fresh state-store name.

### Inputs

- `areas`: one or more two-letter NWS state or territory codes.
- `zones`: optional county or forecast UGC codes, such as `VAC059` or `VAZ053`.
- `severities`: optional CAP severity filters.
- `eventTypes`: optional exact NWS event names, matched without case sensitivity.
- `firstRun`: save a quiet baseline or emit current alerts as new.
- `stateStoreName`: named persistent state used across runs.
- `includeExpired`: emit a transition when a previously active alert disappears.
- `resetState`: intentionally replace an existing baseline once.
- `maxAlerts`: hard output-processing cap.
- `timeoutSeconds`: per-request timeout.

For safety, the Actor refuses to reuse a state store with different area, zone, severity, or event filters. This prevents a changed watchlist from incorrectly marking unrelated alerts as expired.

### Example output

Each dataset record includes:

- `changeType`: `new`, `updated`, `cancelled`, or `expired`
- `lifecycleId` and the current official `alertId`
- `previousAlertId` for updates and expirations
- event, severity, urgency, certainty, status, and CAP message type
- headline, description, instructions, affected area, SAME codes, and UGC codes
- sent, effective, onset, expiration, and ending timestamps
- the official NWS source URL and the time the change was detected

Example:

```json
{
  "changeType": "updated",
  "lifecycleId": "urn:oid:previous-alert",
  "alertId": "urn:oid:current-alert",
  "previousAlertId": "urn:oid:previous-alert",
  "event": "Heat Advisory",
  "severity": "Moderate",
  "areaDesc": "Fairfax, VA",
  "sourceUrl": "https://api.weather.gov/alerts/urn:oid:current-alert",
  "detectedAt": "2026-07-15T12:00:00.000Z"
}
```

### API example

```bash
curl -X POST "https://api.apify.com/v2/acts/rtworule~nws-weather-alert-delta-monitor/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"areas":["VA","MD"],"severities":["Extreme","Severe"],"stateStoreName":"mid-atlantic-severe-alerts"}'
```

After the run finishes, retrieve records from its default dataset or connect an Apify webhook, Make, Zapier, n8n, Slack, Teams, Google Sheets, or a database integration.

### Pricing

Pay-per-event pricing is based on **alert lifecycle changes** emitted to the dataset. Unchanged active alerts are not emitted and do not create a primary paid event. At $0.001 per lifecycle change, 1,000 meaningful changes cost $1.00. The listed event price includes platform usage for the Actor run; normal post-run storage or API-access costs can still apply under Apify's platform rules.

### Reliability and limitations

- Coverage is limited to NWS-supported United States states and territories.
- NWS availability and freshness are controlled by the upstream government service.
- The Actor polls. It is not the fastest dissemination channel and is not suitable as the sole source for life-safety decisions.
- A disappearance from the active feed is reported as expired. The original record remains available in the output change record.
- A named key-value store should be used by only one non-overlapping schedule.
- State locking is best effort because Apify key-value stores do not provide a transactional compare-and-swap operation.
- The Actor does not send messages itself. Use Apify integrations or webhooks for delivery.

### Responsible use

This is a secondary automation and data tool, not an official emergency-warning service. Always rely on official NWS channels, NOAA Weather Radio, Wireless Emergency Alerts, and local authorities for life-safety decisions. Every record links back to its official source so downstream users and AI agents can verify the evidence.

### Integrations

Schedule the Actor in Apify, then connect successful runs to webhooks, Make, Zapier, n8n, Slack, Microsoft Teams, Google Sheets, or your own API consumer. The default dataset is deliberately shaped for AI agents and automation tools: each record is one meaningful event, carries the current and previous alert IDs, and links to the official NWS source.

### FAQ

**Why was the first run empty?** The safe default establishes a baseline so an existing warning is not treated as newly issued. Set `firstRun` to `emitCurrent` with a fresh state store for a one-time snapshot.

**Should I save the Actor input as an Apify task?** Yes, if you want a reusable watchlist or schedule. Give each independent task a unique `stateStoreName` and avoid overlapping runs for the same store.

**Can this replace official warnings?** No. It is a polling and integration tool. Use official NWS and local emergency channels for safety decisions.

### Support

Use the Actor's Issues tab for reproducible problems. Include the input with secrets removed, the run ID, expected lifecycle transition, and observed output. Do not include private credentials.

### More tools

Related ApifyApps Actors include the Public RSS, Atom & JSON Feed Normalizer for generic new-item monitoring and the Public ATS Job Feed Normalizer for new-only job feeds.

# Actor input Schema

## `areas` (type: `array`):

Two-letter NWS area codes. The default monitors Virginia and produces a useful first run without credentials.

## `zones` (type: `array`):

Optional NWS UGC identifiers such as VAC059 or VAZ053.

## `severities` (type: `array`):

Keep only selected CAP severity levels. Empty means all severities.

## `eventTypes` (type: `array`):

Optional exact event names such as Tornado Warning or Heat Advisory. Matching is case-insensitive.

## `firstRun` (type: `string`):

Baseline avoids notifying about alerts that already existed when a monitor was created.

## `stateStoreName` (type: `string`):

Use a unique name for each independent watchlist or scheduled task.

## `includeExpired` (type: `boolean`):

Emit an expired record when a previously active alert disappears from the active NWS feed.

## `resetState` (type: `boolean`):

Clear the previous baseline once. Turn this off after the reset run.

## `maxAlerts` (type: `integer`):

Hard cap across all selected areas and zones.

## `timeoutSeconds` (type: `integer`):

Maximum seconds for each NWS API request.

## Actor input object example

```json
{
  "areas": [
    "VA"
  ],
  "zones": [],
  "severities": [],
  "eventTypes": [],
  "firstRun": "baselineOnly",
  "stateStoreName": "nws-weather-alert-delta-state",
  "includeExpired": true,
  "resetState": false,
  "maxAlerts": 2000,
  "timeoutSeconds": 30
}
```

# Actor output Schema

## `dataset` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("rtworule/nws-weather-alert-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("rtworule/nws-weather-alert-delta-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call rtworule/nws-weather-alert-delta-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=rtworule/nws-weather-alert-delta-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NWS Weather Alert Change Monitor - New & Updated Only",
        "description": "Deduplicate official US NWS alerts across scheduled runs. Emit only new, updated, cancelled, or expired changes for notifications, automations, and AI agents.",
        "version": "0.1",
        "x-build-id": "bDyXF5u3QicFqDSif"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/rtworule~nws-weather-alert-delta-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-rtworule-nws-weather-alert-delta-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/rtworule~nws-weather-alert-delta-monitor/runs": {
            "post": {
                "operationId": "runs-sync-rtworule-nws-weather-alert-delta-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/rtworule~nws-weather-alert-delta-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-rtworule-nws-weather-alert-delta-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "areas": {
                        "title": "States and territories",
                        "type": "array",
                        "description": "Two-letter NWS area codes. The default monitors Virginia and produces a useful first run without credentials.",
                        "default": [
                            "VA"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "zones": {
                        "title": "County or forecast zones",
                        "type": "array",
                        "description": "Optional NWS UGC identifiers such as VAC059 or VAZ053.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "severities": {
                        "title": "Severity filters",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Keep only selected CAP severity levels. Empty means all severities.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "Extreme",
                                "Severe",
                                "Moderate",
                                "Minor",
                                "Unknown"
                            ]
                        },
                        "default": []
                    },
                    "eventTypes": {
                        "title": "Event types",
                        "type": "array",
                        "description": "Optional exact event names such as Tornado Warning or Heat Advisory. Matching is case-insensitive.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "firstRun": {
                        "title": "First run behavior",
                        "enum": [
                            "baselineOnly",
                            "emitCurrent"
                        ],
                        "type": "string",
                        "description": "Baseline avoids notifying about alerts that already existed when a monitor was created.",
                        "default": "baselineOnly"
                    },
                    "stateStoreName": {
                        "title": "Persistent state store",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]*$",
                        "minLength": 3,
                        "maxLength": 63,
                        "type": "string",
                        "description": "Use a unique name for each independent watchlist or scheduled task.",
                        "default": "nws-weather-alert-delta-state"
                    },
                    "includeExpired": {
                        "title": "Emit expired transitions",
                        "type": "boolean",
                        "description": "Emit an expired record when a previously active alert disappears from the active NWS feed.",
                        "default": true
                    },
                    "resetState": {
                        "title": "Reset saved state",
                        "type": "boolean",
                        "description": "Clear the previous baseline once. Turn this off after the reset run.",
                        "default": false
                    },
                    "maxAlerts": {
                        "title": "Maximum active alerts",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Hard cap across all selected areas and zones.",
                        "default": 2000
                    },
                    "timeoutSeconds": {
                        "title": "Request timeout",
                        "minimum": 2,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Maximum seconds for each NWS API request.",
                        "default": 30
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
