# NWS active weather alerts monitor (`keepable_injera/nws-weather-alerts-monitor`) Actor

Monitor active U.S. National Weather Service alerts by area, zone, event, severity, and urgency.

- **URL**: https://apify.com/keepable_injera/nws-weather-alerts-monitor.md
- **Developed by:** [Chee Chiaw Lim](https://apify.com/keepable_injera) (community)
- **Categories:** News, 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 results

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 active weather alerts monitor

### What it does

Reads active alerts from the U.S. National Weather Service. Filters by area, zone, event, severity, and urgency. Alert text passes through unchanged.

### Why

Use scheduled runs to collect active alerts and track which alert IDs your monitor has already emitted.

### Input

| Field | Default | Meaning |
| --- | --- | --- |
| `areas` | \[] | Two-letter state or marine codes. Editor prefill is \["TX"]. Empty selects all US areas. |
| `zones` | \[] | NWS zone IDs such as TXZ183. Zones override areas with a warning. |
| `events` | \[] | Event names such as Tornado Warning. Empty selects all. |
| `severities` | \[] | Extreme, Severe, Moderate, Minor, Unknown. Empty selects all. |
| `urgencies` | \[] | Immediate, Expected, Future, Past, Unknown. Empty selects all. |
| `onlyNew` | false | Skip alert IDs previously emitted to the state store. |
| `maxItems` | 100 | Integer from 1 to 10000. Maximum source alerts examined before duplicate and onlyNew filtering. |
| `stateStoreName` | nws-weather-alerts-monitor-state | Named store for cross-run history. |

Requests always use `status=actual`. The endpoint returns all active matching alerts in one response. The Actor sends no limit or paging parameters and truncates locally. A run can emit fewer than maxItems after duplicate and onlyNew filtering.

### Output

Each record includes alert text, timing, codes, references, and attribution. Missing scalar fields are null. Missing lists are empty. Geometry is represented by hasGeometry, without coordinates. Both web and sourceUrl use the alert's properties\["@id"] URL.

Example record from the supplied fixture follows.

```json
{
  "alertId": "urn:oid:2.49.0.1.840.0.b79c043702c63b741ebd1959280202b549a6bd15.001.1",
  "event": "Flash Flood Warning",
  "headline": "Flash Flood Warning issued October 30 at 3:16AM CDT until October 30 at 7:15AM CDT by NWS Midland/Odessa TX",
  "severity": "Severe",
  "urgency": "Immediate",
  "certainty": "Likely",
  "status": "Actual",
  "messageType": "Alert",
  "category": "Met",
  "areaDesc": "Ector, TX; Midland, TX",
  "sameCodes": [
    "048135",
    "048329"
  ],
  "ugcCodes": [
    "TXC135",
    "TXC329"
  ],
  "affectedZones": [
    "https://api.weather.gov/zones/county/TXC135",
    "https://api.weather.gov/zones/county/TXC329"
  ],
  "sent": "2026-10-30T03:16:00-05:00",
  "effective": "2026-10-30T03:16:00-05:00",
  "onset": "2026-10-30T03:16:00-05:00",
  "expires": "2026-10-30T07:15:00-05:00",
  "ends": "2026-10-30T07:15:00-05:00",
  "senderName": "NWS Midland/Odessa TX",
  "description": "FFWMAF\n\nThe National Weather Service in Midland/Odessa has issued a\n\n* Flash Flood Warning for...\nEast Central Ector County in western Texas...\nNorthwestern Midland County in western Texas...\n\n* Until 715 AM CDT.\n\n* At 316 AM CDT, Doppler radar indicated thunderstorms producing\nheavy rain across the warned area. Between 0.5 and 1 inch of rain\nhas fallen. Additional rainfall amounts up to 1 inch are possible\nin the warned area. Flash flooding is ongoing or expected to begin\nshortly. Use caution driving this morning, especially in roads\nprone to poor drainage flooding.\n\nHAZARD...Flash flooding caused by thunderstorms.\n\nSOURCE...Radar indicated.\n\nIMPACT...Flash flooding of small creeks and streams, urban areas,\nhighways, streets and underpasses as well as other poor\ndrainage and low-lying areas.\n\n* Some locations that will experience flash flooding include...\nMidland, Odessa, Midland International Air and Space Port, West\nOdessa, Warfield, Odessa Schlemeyer Field, Midland Airpark and\nCotton Flat.",
  "instruction": "Turn around, don't drown when encountering flooded roads. Most flood\ndeaths occur in vehicles.\n\nBe especially cautious at night when it is harder to recognize the\ndangers of flooding.\n\nBe aware of your surroundings and do not drive on flooded roads.",
  "response": "Avoid",
  "references": [],
  "web": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.b79c043702c63b741ebd1959280202b549a6bd15.001.1",
  "hasGeometry": true,
  "source": "U.S. National Weather Service (api.weather.gov)",
  "sourceUrl": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.b79c043702c63b741ebd1959280202b549a6bd15.001.1",
  "licence": "U.S. Government public domain (https://www.weather.gov/disclaimer)",
  "disclaimer": "Information from the U.S. National Weather Service, not subject to copyright protection (17 U.S.C. 403). Alert text is passed on unmodified. Not endorsed by NOAA/NWS. Not an official warning channel; check weather.gov for current alerts.",
  "generatedId": "NWS:urn:oid:2.49.0.1.840.0.b79c043702c63b741ebd1959280202b549a6bd15.001.1",
  "changeType": "new",
  "scrapedAt": "2026-10-30T09:30:00.000Z"
}
```

The dataset includes a table view. `RUN_SUMMARY` in the default key-value store contains timestamps, fetched, eligible, and pushed counts, charge-limit status, and any error.

### State and pricing

The named state store holds alert IDs under `SEEN_ALERT_IDS`. Only successful pushes enter the set. Existing IDs receive changeType "seen". New IDs receive "new". With onlyNew enabled, seen IDs are skipped. Changes to text under an existing ID do not count as new. Separate monitors can use separate store names. A permission error opening the named store causes a warning and fallback to the default store with onlyNew disabled.

Pricing is $0.001 per result, no start fee. Each emitted record uses the `result` billing event. The Actor stops at the available charge limit. Skipped records incur no result charge. Platform compute and storage charges may apply separately.

### Source, licence, and disclaimer

Source endpoint: https://api.weather.gov/alerts/active

U.S. Government public domain (https://www.weather.gov/disclaimer)

Information from the U.S. National Weather Service, not subject to copyright protection (17 U.S.C. 403). Alert text is passed on unmodified. Not endorsed by NOAA/NWS. Not an official warning channel; check weather.gov for current alerts.

Requests send Accept: application/geo+json and User-Agent: keepable_injera-apify-monitor (cheechiawbot@mail.grokbot.com). No API keys or proxies are used.

### Limits

This is a snapshot of active alerts, not an archive or an official warning channel. Check weather.gov for current alerts. Source availability and active alert counts vary. Text is passed through without edits. The Actor waits at least one second between request starts per host and retries HTTP 429 and 5xx responses up to three times. Network errors stop the run and appear in RUN_SUMMARY.

### Local verification

Run `npm test` for offline tests. Use a fresh storage directory for the fixture-backed local run.

```sh
CRAWLEE_STORAGE_DIR=/tmp/nws-check APIFY_LOCAL_STORAGE_DIR=/tmp/nws-check NODE_OPTIONS="--import ./scripts/offline-fixture.js" npm start
node scripts/verify-output.js /tmp/nws-check
```

The preload disables network requests and serves the supplied fixture. It does not simulate source filtering. Live source access was not used for verification.

# Actor input Schema

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

Two-letter state or marine codes. Empty selects all US areas. Zones take precedence.

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

NWS zone IDs such as TXZ183. When supplied, areas are ignored with a warning.

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

Event names such as Tornado Warning. Empty selects all events.

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

Empty selects all severities.

## `urgencies` (type: `array`):

Empty selects all urgencies.

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

Skip alert IDs already emitted to this state store.

## `maxItems` (type: `integer`):

Maximum source alerts examined before duplicate and onlyNew filtering. Truncated locally.

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

Named store for cross-run alert ID history.

## Actor input object example

```json
{
  "areas": [
    "TX"
  ],
  "zones": [],
  "events": [],
  "severities": [],
  "urgencies": [],
  "onlyNew": false,
  "maxItems": 100,
  "stateStoreName": "nws-weather-alerts-monitor-state"
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {
    "areas": [
        "TX"
    ],
    "zones": [],
    "events": [],
    "severities": [],
    "urgencies": [],
    "onlyNew": false,
    "maxItems": 100,
    "stateStoreName": "nws-weather-alerts-monitor-state"
};

// Run the Actor and wait for it to finish
const run = await client.actor("keepable_injera/nws-weather-alerts-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 = {
    "areas": ["TX"],
    "zones": [],
    "events": [],
    "severities": [],
    "urgencies": [],
    "onlyNew": False,
    "maxItems": 100,
    "stateStoreName": "nws-weather-alerts-monitor-state",
}

# Run the Actor and wait for it to finish
run = client.actor("keepable_injera/nws-weather-alerts-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 '{
  "areas": [
    "TX"
  ],
  "zones": [],
  "events": [],
  "severities": [],
  "urgencies": [],
  "onlyNew": false,
  "maxItems": 100,
  "stateStoreName": "nws-weather-alerts-monitor-state"
}' |
apify call keepable_injera/nws-weather-alerts-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,keepable_injera/nws-weather-alerts-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/BlO7zvgs26g4qp5aV/builds/RIaFJNCM03kUvM09L/openapi.json
