# US NWS Alert Feed — Active Watches & Warnings (`zinin/us-nws-alert-feed`) Actor

Get active US National Weather Service watches, warnings and advisories with severity, urgency, affected areas, onset and expiry from the official API. No key required.

- **URL**: https://apify.com/zinin/us-nws-alert-feed.md
- **Developed by:** [Tim Zinin](https://apify.com/zinin) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## US NWS Alert Feed — Active Watches & Warnings

Turn the official U.S. National Weather Service active-alert feed into clean dataset rows. Filter by state/territory, NWS zone, geographic point, and severity. No API key, browser, proxy, or HTML scraping is used.

### Use cases

- **Operations teams** can route severe weather notices to facilities and field crews.
- **Logistics teams** can flag lanes and delivery regions affected by watches and warnings.
- **Travel and event operators** can monitor areas where plans may need to change.
- **Automation and AI agents** can consume a small, attributed alert dataset through the Apify API, MCP, Make, Zapier, or n8n.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `areas` | string\[] | prefill `['CA']` | Up to 20 two-letter state or territory codes. |
| `zones` | string\[] | `[]` | Up to 50 NWS zone IDs such as `CAZ006`. |
| `point` | string | empty | One `latitude,longitude` pair. |
| `severities` | string\[] | `[]` | Up to five values: Extreme, Severe, Moderate, Minor, Unknown. |
| `maxAlerts` | integer | 100 (prefill 25) | Local output cap from 1–500. It is not sent to NWS as a `limit` parameter. |

All filters are optional. With no geographic filter the source may return alerts nationwide. Duplicate values are removed and hard caps are enforced in code even when a run bypasses the input UI.

#### Prefill input

```json
{
  "areas": ["CA"],
  "maxAlerts": 25
}
```

#### Logistics corridor example

```json
{
  "areas": ["CA", "NV", "AZ"],
  "severities": ["Extreme", "Severe"],
  "maxAlerts": 100
}
```

#### Point example

```json
{
  "point": "39.7456,-97.0892",
  "maxAlerts": 25
}
```

### Output

Each matching alert is one paid row. An empty result is valid and produces one free `found:false` row, ensuring the dataset is non-empty and clearly distinguishing “no active alerts” from a failed request. Source errors and spending-limit notices are also free rows.

```json
{
  "found": true,
  "id": "https://api.weather.gov/alerts/urn:oid:example",
  "event": "Winter Storm Warning",
  "headline": "Winter Storm Warning issued November 10...",
  "severity": "Severe",
  "urgency": "Expected",
  "certainty": "Likely",
  "status": "Actual",
  "messageType": "Alert",
  "category": "Met",
  "affectedAreas": "Example County",
  "geocode": { "SAME": ["000000"] },
  "sent": "2026-11-10T12:00:00-06:00",
  "effective": "2026-11-10T12:00:00-06:00",
  "onset": "2026-11-10T18:00:00-06:00",
  "expires": "2026-11-11T06:00:00-06:00",
  "ends": "2026-11-11T06:00:00-06:00",
  "senderName": "NWS Example Office",
  "description": "Heavy snow expected...",
  "instruction": "Avoid unnecessary travel...",
  "alertUrl": "https://api.weather.gov/alerts/urn:oid:example",
  "source": "US National Weather Service",
  "sourceUrl": "https://api.weather.gov/alerts/active?area=CA",
  "retrievedAt": "2026-11-10T18:00:00.000Z"
}
```

Empty-result example:

```json
{
  "found": false,
  "error": null,
  "message": "No active alerts matched the filters.",
  "source": "US National Weather Service",
  "sourceUrl": "https://api.weather.gov/alerts/active?area=CA",
  "retrievedAt": "2026-11-10T18:00:00.000Z"
}
```

### Pricing

**$0.0025 per active alert (`result-found`) on the Free plan, with automatic discounts on paid Apify plans: Bronze −5%, Silver −10%, Gold −15%, Platinum −18%, Diamond −20%. A small Actor start event ($0.002) applies per run** per delivered alert, plus the Apify platform's Actor start event. Only `found:true` alert rows use the paid `result-found` event. Empty results, source errors, and spending-limit notices are written without that event and are free under the Actor's intended pricing configuration.

The Actor checks the buyer's remaining maximum-charge budget immediately before every paid dataset push. Delivery and charging happen atomically in one SDK call, so the Actor does not separately charge for a row that then fails to reach the dataset.

### Limitations

- This is a snapshot of alerts active when NWS answers, not a historical archive or push notification service.
- NWS controls alert coverage, wording, timing, severity, geocodes, and corrections. The Actor does not independently verify weather conditions.
- Filters follow the source API's behavior. Combining filters may narrow the feed, and an alert can cover areas outside a simple point or zone representation.
- The source can throttle or experience outages. Requests are sequential, time-limited, and retry only 429 and 5xx responses a bounded number of times.
- Output is capped at 500 alerts per run. The source route has no `limit` parameter, so the cap is applied after receipt.
- Alert descriptions and instructions may contain formatting supplied by NWS. They are returned as data and never executed.

### Source, terms, and attribution

Data comes directly from the official [National Weather Service API](https://www.weather.gov/documentation/services-web-api) at `https://api.weather.gov/alerts/active`. Every row includes `source`, the exact `sourceUrl`, and `retrievedAt`.

NWS/NOAA data is U.S. Government information and is generally not subject to domestic copyright, but users remain responsible for complying with the source's current terms, policies, trademarks, and attribution guidance. Do not present this Actor as an official warning channel or imply NWS/NOAA endorsement. For safety-critical decisions, follow the alert URL and consult official NWS channels.

### Related Actors

- [us-nws-point-forecast](https://apify.com/zinin/us-nws-point-forecast)
- [noaa-metar-weather-extractor](https://apify.com/zinin/noaa-metar-weather-extractor)
- [usgs-streamflow-latest](https://apify.com/zinin/usgs-streamflow-latest)

# Actor input Schema

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

Two-letter codes such as CA, TX, FL. Up to 20.

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

Optional forecast or county zone IDs such as CAZ006.

## `point` (type: `string`):

Optional latitude,longitude, for example 39.7456,-97.0892.

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

Optional NWS severity levels.

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

Maximum rows to return after the API responds. This is not sent to NWS as a limit parameter.

## Actor input object example

```json
{
  "areas": [
    "CA"
  ],
  "zones": [],
  "severities": [],
  "maxAlerts": 25
}
```

# Actor output Schema

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

API URL for the dataset items produced by this run.

# 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": [
        "CA"
    ],
    "zones": [],
    "severities": [],
    "maxAlerts": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("zinin/us-nws-alert-feed").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": ["CA"],
    "zones": [],
    "severities": [],
    "maxAlerts": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("zinin/us-nws-alert-feed").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": [
    "CA"
  ],
  "zones": [],
  "severities": [],
  "maxAlerts": 25
}' |
apify call zinin/us-nws-alert-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zinin/us-nws-alert-feed"
        }
    }
}
```

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/G5UH7iCPGa6rpTzbZ/builds/tN0tCNqOVCKbKxTN3/openapi.json
