# NOAA/NWS Weather Alert Monitor (`codeclouds/weather-alert-warning-monitor`) Actor

Real-time NOAA/NWS weather alerts with geographic filtering, severity tracking, and structured JSON output for AI agents and monitoring pipelines.

- **URL**: https://apify.com/codeclouds/weather-alert-warning-monitor.md
- **Developed by:** [Dennis](https://apify.com/codeclouds) (community)
- **Categories:** Travel, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 weather alert records

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

## NOAA/NWS Weather Alert Monitor

Real-time weather alert monitoring from the official NOAA National Weather Service (NWS). This actor fetches active warnings, watches, and advisories via the public `api.weather.gov` REST endpoint, maps them to structured JSON, and delivers results with geographic, severity, and timing filters.

### Capabilities

This actor connects directly to the NOAA/NWS `api.weather.gov` active alerts endpoint (`/alerts/active?status=actual`). It performs a single HTTP request with the required `User-Agent` header, receives a GeoJSON FeatureCollection (~15 KB for a national snapshot), and transforms each `wx:Alert` feature into a flat, schema-stable JSON record. There is no pagination for standard use (fewer than 500 active alerts nationally), no authentication, and no scraping of protected content.

The actor supports optional filtering by:

- **Region:** UGC county/zone codes (e.g., `ALZ001`, `PKZ013`).
- **Severity:** `Severe`, `Moderate`, `Minor`, `Extreme`, `Unknown`.
- **Status:** `actual` (live warnings) or `exercise` (test events).
- **Message type:** Include or exclude `Update` and `Cancel` events.
- **Result limit:** Configurable from 1 to 500 records per run.

Every output record is a flat object (not nested blobs), making it directly consumable by AI agents, MCP clients, monitoring dashboards, and notification pipelines without additional parsing logic.

### Why this actor

AI agents and monitoring pipelines need reliable, structured access to live weather warnings — not static descriptions or manual page checks. The NOAA/NWS `api.weather.gov/alerts/active` endpoint returns official GeoJSON alerts in real time. This actor transforms that raw feed into a clean, filterable dataset with deterministic output fields, suitable for alert aggregation, risk scoring, and automated notification triggers.

The value proposition is infrastructure, not interpretation: an LLM cannot reliably maintain a persistent, version-tracked, geographically filtered feed of official government weather warnings. This actor provides exactly that — a small, fast, deterministic tool call that returns structured data with consistent field names, making it ideal for agent toolchains and pipeline automation.

### Data source & legality

- **NOAA/NWS (`api.weather.gov`)** — official US government open data, no authentication required, public REST-JSON endpoint. Only a `User-Agent` header is required (standard practice for NOAA APIs).
- **Legal risk: A (low)** — pure public government meteorological data. No personal data, no login walls, no Terms of Service conflicts (data explicitly provided for public reuse and machine consumption).
- **Rate approach:** Conservative single-request fetch per run; the endpoint provides a full national snapshot in one call (~15 KB response), no pagination needed for standard use.
- **Source stability:** NOAA/NWS is a long-standing federal service with stable endpoints. The actor uses the documented `/alerts/active` path and handles HTTP errors gracefully (one failed fetch does not corrupt the dataset; it exits cleanly with a status message).

### Input parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `regionFilter` | `string[]` | `[]` | Optional UGC region codes (e.g., `ALZ001`, `FLZ067`) to limit results to specific counties or forecast zones. |
| `severityFilter` | `string[]` | `[]` | Optional severity levels: `Severe`, `Moderate`, `Minor`, `Extreme`, `Unknown`. Empty array = no severity filter. |
| `statusFilter` | `string` | `actual` | `actual` (live) or `exercise` (test events). |
| `maxResults` | `integer` | `50` | Maximum number of alert records to return (1–500). The endpoint returns a national snapshot; 50 covers most active alerts. |
| `includeUpdate` | `boolean` | `true` | Include `Update` and `Cancel` message types in addition to initial `Alert` events. Set to `false` for only new alerts. |

All input fields have sensible defaults. A zero-configuration run (`{}`) returns the 50 most recent active weather alerts nationally with updates included.

### Output format

Each result is a flat JSON object (not nested blobs or free text) optimized for AI agent consumption and direct pipeline integration:

```json
{
  "alertId": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0...",
  "event": "Small Craft Advisory",
  "headline": "Small Craft Advisory issued September 21 at 3:46AM AKDT until September 22 at 1:00AM AKDT by NWS Juneau AK",
  "description": "* WHAT...Seas 8 to 13 ft.\n* WHERE...Cape Fairweather to Icy Cape out to 15 NM...",
  "severity": "Minor",
  "category": "Met",
  "urgency": "Expected",
  "certainty": "Likely",
  "status": "Actual",
  "areaDesc": "Southern Lynn Canal",
  "stateCodes": ["PKZ013"],
  "geoZones": ["https://api.weather.gov/zones/forecast/PKZ013"],
  "sentAt": "2026-09-20T12:10:00-08:00",
  "effectiveAt": "2026-09-20T15:45:00-08:00",
  "expiresAt": "2026-09-21T04:45:00-08:00",
  "endsAt": "2026-09-21T05:00:00-08:00",
  "response": "Avoid",
  "senderName": "NWS Juneau AK",
  "url": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0..."
}
```

Every field is typed consistently (`string`, `string[]`, or optional `string`). There are no nested objects inside array elements, no `anyOf` shapes, and no fields that change type per record — all requirements for reliable AI agent tool integration.

### Use cases for AI agents

- **Live monitoring:** "Show me all Severe weather alerts active right now in Florida."
- **Geographic filtering:** "Get flood warnings for counties ILC073 and ILC161."
- **Aggregation:** "How many actual weather alerts are currently active, grouped by severity?"
- **Notification trigger:** "Alert me when a new Severe alert appears in my region codes (`["PKZ013"]`)."
- **Risk pipeline:** "Feed active alerts into my ESG climate-risk dashboard."
- **Travel impact:** "What weather advisories affect zones PKZ013?"
- **Test validation:** "Run the exercise status filter to verify the pipeline works without real alerts."

### When should an AI agent use this?

1. You need a **live, authoritative list of active weather warnings** (not forecasts, historical data, or static summaries).
2. You need **structured output** with deterministic field names (`event`, `severity`, `status`, `areaDesc`) rather than raw HTML pages or unstructured text.
3. You need **filterable results** by UGC region code, severity level, or message type (`Alert`, `Update`, `Cancel`).
4. You are building a **monitoring, notification, or risk-assessment pipeline** that requires schema-stable, version-tracked data.
5. You want a **low-cost, fast tool call** ($0.003 per result) that does not require browser rendering, API keys, or login authentication.
6. You prefer **official government sources** over scraped or aggregated third-party feeds for compliance and accuracy.

### Pricing

Pay-per-event model (no rental or subscription):

- `weather-alert-record`: **$0.003** per delivered record.
- The `apify-actor-start` event uses Apify's default pricing ($0.00005, first 5 seconds of compute free).
- Low per-item value reflects the open-data nature of the source (official NOAA feed, no enrichment, classification, or predictive modeling layer).
- Price can be changed once per month with a 14-day effective delay; start low and adjust after observing usage patterns.

### Related Actors

- `universal-price-monitor` (same portfolio, international e-commerce monitoring) — complementary for market-risk pipelines that combine price and climate signals.
- `historical-weather-climate-analysis` (scope document, future build) — historical climate indices (SPEI, SPI) rather than live alert feeds.
- `url-to-structured-fact` (live, agent verification tool) — useful for verifying NOAA source URLs before citing them in answers.

### Legal & compliance

- **Data source:** NOAA/NWS `api.weather.gov` — official US federal government open data endpoint, explicitly provided for public reuse and machine consumption.
- **Terms:** No login required; no Terms of Service conflict; no rate-limit enforcement observed at standard monitoring volumes; a respectful `User-Agent` header is sufficient and standard practice.
- **Privacy / GDPR:** No personal data processed. Output contains only meteorological warning metadata (event type, region code, timing, severity). No individuals, addresses, or consumer profiles.
- **Disclaimer:** This actor reports official NOAA/NWS alert content. It does not provide meteorological advice, predictions, or interpretations. For life-safety decisions, consult official NWS channels (`weather.gov`) directly.

### FAQ

**Q: Does this cover international (non-US) weather alerts?**\
A: No. The NOAA/NWS endpoint covers US territories and waters only. For EU/UK weather warnings, a separate actor using Met Office or KNMI sources would be needed.

**Q: Why is the `User-Agent` header required?**\
A: NOAA's API requires it (returns HTTP 403 without). The actor sends a standard agent string (`weather-alert-warning-monitor/0.1`) that identifies the request without impersonating browsers or bypassing protections.

**Q: Can I schedule this to run periodically?**\
A: Yes. A 15-minute or hourly scheduled run works well (each run is a single lightweight HTTP call). Use `statusFilter: actual` to capture only live events.

**Q: What happens if the NOAA endpoint is temporarily unavailable?**\
A: The actor catches fetch errors, logs them, exits with status code 1 and a clear message (`NOAA fetch failed: ...`), and does not push partial or corrupt data. A single source failure does not crash the dataset pipeline.

**Q: Are the fixtures in the tests real NOAA responses?**\
A: Yes. The tests use live fixtures captured from the actual `api.weather.gov` endpoint (a Small Craft Advisory from NWS Juneau AK and a Flood Warning from NWS Quad Cities IA IL), not synthetic data. This ensures mapping logic stays aligned with real-world feed structure.

### Changelog

- **0.1 (2026-09-21):** Initial build. Fetches from `api.weather.gov/alerts/active?status=actual`, maps GeoJSON `wx:Alert` features to flat records, supports region/severity/status filters, includes real NOAA fixtures in tests (2/2 passing), icon generated (`icon.svg` + `icon.png`), PPE event `weather-alert-record` configured at $0.003.

### Keywords

NOAA, NWS, weather alerts, active warnings, weather monitoring, public safety, climate data, GeoJSON, AI agent tool, real-time monitoring, US weather, weather monitoring pipeline, NWS warnings, NOAA data, public government data, MCP-compatible.

# Actor input Schema

## `regionFilter` (type: `array`):

Optional list of UGC region codes (e.g., ALZ001, FLZ067) to limit results to specific counties/zones.

## `severityFilter` (type: `array`):

Optional severity levels: Severe, Moderate, Minor, Extreme, Unknown.

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

Maximum number of alert records to return.

## `includeUpdate` (type: `boolean`):

Include Update and Cancel message types, not just initial Alerts.

## `categoryFilter` (type: `array`):

Optional alert categories: Met, Geo, Safety, Env, Other.

## `statusFilter` (type: `string`):

Filter by alert status: actual (live) or exercise (tests).

## Actor input object example

```json
{
  "regionFilter": [],
  "severityFilter": [],
  "maxResults": 50,
  "includeUpdate": true,
  "categoryFilter": [],
  "statusFilter": "actual"
}
```

# Actor output Schema

## `results` (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 = {
    "regionFilter": [],
    "severityFilter": [],
    "maxResults": 50,
    "categoryFilter": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("codeclouds/weather-alert-warning-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 = {
    "regionFilter": [],
    "severityFilter": [],
    "maxResults": 50,
    "categoryFilter": [],
}

# Run the Actor and wait for it to finish
run = client.actor("codeclouds/weather-alert-warning-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 '{
  "regionFilter": [],
  "severityFilter": [],
  "maxResults": 50,
  "categoryFilter": []
}' |
apify call codeclouds/weather-alert-warning-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codeclouds/weather-alert-warning-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/RVpKORu3xqFONO2kf/builds/raM5VVUymVgyCsZym/openapi.json
