# Weather.gov Active Alerts Scraper (`automation-lab/us-active-weather-alerts-tracker`) Actor

Export official Weather.gov active alerts by US area, point, zone, severity, event, and validity window with instructions, geometry, and source links.

- **URL**: https://apify.com/automation-lab/us-active-weather-alerts-tracker.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.48 / 1,000 alert extracteds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Weather.gov Active Alerts Scraper

Collect **weather.gov active alerts** as clean, typed records for operational monitoring, analysis, spreadsheets, databases, and alerting workflows.

The Actor reads the official National Weather Service (NWS) API. It exports each unique active warning, watch, advisory, or statement with its identity, event classification, validity window, affected area, safety instruction, geometry when available, and official source URL.

No login, browser, cookies, or proxy is required.

### What can you do with this Weather.gov active alerts scraper?

- Take a current nationwide snapshot of official US weather alerts.
- Monitor one or more states or territories on a schedule.
- Check warnings affecting latitude/longitude points.
- Collect alerts for NWS forecast or county zones.
- Export a known alert from its official API URL.
- Filter records by severity, urgency, certainty, or exact event name.
- Compare stable alert IDs and message types between scheduled runs.
- Send matching rows to a webhook, spreadsheet, database, or BI tool.

The Actor exports current records. It does not maintain historical state or decide which alerts are new; use the stable `alertId`, `sent`, and `messageType` fields in your downstream automation for change detection.

### Who is this Actor for?

**Operations teams** can monitor warnings affecting facilities, routes, events, or field staff.

**Risk and safety teams** can feed official classifications and instructions into internal response workflows.

**Data analysts** can export a consistent snapshot without manually interpreting GeoJSON.

**Developers** can call one Actor interface for nationwide, area, point, zone, and exact-alert workflows.

**Journalists and researchers** can collect current public records with timestamps and provenance.

### Why use this Actor?

Weather.gov already provides an excellent public API. This Actor adds workflow-oriented input, validation, deduplication, normalized fields, dataset exports, Apify scheduling, webhooks, integrations, and pay-per-result billing.

It also:

- rejects malformed area, point, zone, and URL inputs;
- excludes CAP test messages by default;
- retries transient network, rate-limit, and server failures;
- applies the same classification filters to every input route;
- charges only for unique matching alerts saved to the dataset;
- stops as soon as `maxItems` is reached.

### What data does it extract?

| Field | Meaning |
| --- | --- |
| `alertId` | Stable NWS alert identity |
| `sourceUrl` | Official Weather.gov API URL |
| `event` | Event type, such as Flood Warning |
| `headline` | Public alert headline |
| `severity` | Extreme, Severe, Moderate, Minor, or Unknown |
| `urgency` | Immediate, Expected, Future, Past, or Unknown |
| `certainty` | Observed, Likely, Possible, Unlikely, or Unknown |
| `status` | CAP status; actual operational messages normally use `Actual` |
| `messageType` | Alert, Update, Cancel, or another CAP message type |
| `sent`, `effective` | Message publication and effective times |
| `onset`, `expires`, `ends` | Hazard and message validity times when supplied |
| `areaDescription` | Human-readable affected places |
| `geocode` | SAME, UGC, or other source geocodes |
| `affectedZones` | Weather.gov zone URLs |
| `description` | Detailed hazard narrative |
| `instruction` | Official safety or response instructions |
| `geometry` | GeoJSON geometry when NWS supplies it |
| `sender`, `senderName` | Issuing authority identity |
| `parameters`, `references` | Additional source metadata and referenced messages |
| `webUrl`, `language` | Source web page and language |
| `fetchedAt` | Timestamp recorded by the Actor |

Weather.gov may return `null` for optional fields, especially `geometry`, `instruction`, `onset`, `ends`, and `note`.

### How to get started

1. Open the Actor input page.
2. Keep the California prefill, enter other two-letter area codes, or clear it for nationwide coverage.
3. Optionally add points, zones, or exact alert API URLs.
4. Add classification filters only if your workflow needs them.
5. Choose a sensible `maxItems` limit.
6. Click **Start**.
7. Open the **Dataset** tab to preview, download, or integrate the records.
8. For recurring monitoring, create an Apify schedule and connect a webhook or integration.

### Input parameters

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `areas` | string array | empty | Two-letter US state or territory codes. Empty location inputs mean nationwide. |
| `points` | string array | empty | Coordinates in `latitude,longitude` format. |
| `zones` | string array | empty | NWS zone identifiers such as `CAZ041`. |
| `alertUrls` | string array | empty | Exact `https://api.weather.gov/alerts/...` URLs. |
| `severities` | string array | empty | Allowed NWS severity values. |
| `urgencies` | string array | empty | Allowed NWS urgency values. |
| `certainties` | string array | empty | Allowed NWS certainty values. |
| `eventTypes` | string array | empty | Exact event names matched case-insensitively. |
| `includeTestAlerts` | boolean | `false` | Include CAP records whose status is `Test`. |
| `maxItems` | integer | `100` | Save at most 1–10,000 unique matching alerts. |

All location routes are combined. For example, two areas and one point create three official API requests, then duplicate alert IDs are removed.

### Example inputs

#### Nationwide warning snapshot

```json
{
  "areas": [],
  "maxItems": 25
}
```

#### California alerts

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

#### Multi-state operations feed

```json
{
  "areas": ["CA", "TX", "FL", "NY"],
  "maxItems": 100
}
```

#### Alerts affecting a point

```json
{
  "points": ["32.7157,-117.1611"],
  "severities": ["Extreme", "Severe", "Moderate"],
  "maxItems": 20
}
```

#### One NWS zone and event type

```json
{
  "zones": ["CAZ041"],
  "eventTypes": ["Wind Advisory"],
  "maxItems": 20
}
```

### Output example

This shortened record reflects the Actor's current Weather.gov normalization. Active records change continuously.

```json
{
  "alertId": "urn:oid:2.49.0.1.840.0.sample-alert",
  "sourceUrl": "https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.sample-alert",
  "event": "Beach Hazards Statement",
  "headline": "Beach Hazards Statement issued for the northern California coast",
  "severity": "Moderate",
  "urgency": "Expected",
  "certainty": "Likely",
  "status": "Actual",
  "messageType": "Alert",
  "effective": "2026-09-03T15:22:00-07:00",
  "expires": "2026-09-03T23:30:00-07:00",
  "ends": "2026-09-07T23:00:00-07:00",
  "areaDescription": "Southwestern Humboldt; Coastal Mendocino",
  "affectedZones": [
    "https://api.weather.gov/zones/forecast/CAZ104"
  ],
  "senderName": "NWS Eureka CA",
  "instruction": "Avoid rocks and jetties and stay farther back from the water.",
  "geometry": null,
  "language": "en-US",
  "fetchedAt": "2026-09-04T17:05:00.000Z"
}
```

The complete dataset also retains geocodes, parameters, references, description, sender, response, category, note, and web URL.

### How much does it cost to collect Weather.gov active alerts?

The Actor uses pay-per-event pricing:

- one small **Run started** charge per run;
- one **Alert extracted** charge for each unique matching row saved;
- no alert charge for duplicates, filtered-out records, test messages excluded by default, or empty results.

At the BRONZE tier, the current price is **$0.000045 per start** and **$0.0008 per saved alert**. Approximate Actor charges are therefore:

| Saved alerts | BRONZE calculation |
| ---: | ---: |
| 1 | $0.000045 start + 1 × $0.0008 |
| 10 | $0.000045 start + 10 × $0.0008 |
| 25 | $0.000045 start + 25 × $0.0008 |
| 100 | $0.000045 start + 100 × $0.0008 |

Apify plan tiers apply progressively lower event prices. Platform usage can also appear according to your Apify plan. Check the pricing panel for the tier active on your account.

### Scheduling an operational monitor

A useful monitoring workflow is:

1. Save an input covering your facilities or service regions.
2. Schedule the Actor at an interval suitable for your operation.
3. Export rows through a dataset webhook or integration.
4. Key your downstream store by `alertId`.
5. Compare `sent`, `messageType`, `effective`, and `expires` to identify updates.
6. Remove or archive IDs absent from later current snapshots according to your own policy.

The Actor itself is stateless. This avoids mixing old alerts into a current run's dataset and lets each team choose its own retention and notification rules.

### Spreadsheet, database, and webhook integrations

From the Dataset tab, download JSON, CSV, Excel, XML, or RSS-compatible output supported by Apify.

Use an Apify integration to send completed datasets to Google Sheets or another supported service.

Use run webhooks when another system should process records immediately after a successful run.

For databases, use `alertId` as the source key and retain `fetchedAt` as collection provenance.

### Run from the Apify API with cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~us-active-weather-alerts-tracker/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"areas":["CA","OR","WA"],"maxItems":100}'
```

Fetch dataset items after the run succeeds using the `defaultDatasetId` returned by the API.

### Run from JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/us-active-weather-alerts-tracker').call({
  areas: ['CA', 'OR', 'WA'],
  maxItems: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Run from Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/us-active-weather-alerts-tracker').call(
    run_input={'areas': ['CA', 'OR', 'WA'], 'maxItems': 100}
)
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Use with MCP and AI assistants

Add the Actor to Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/us-active-weather-alerts-tracker"
```

#### Claude Desktop, Cursor, and VS Code setup

Claude Desktop, Cursor, and VS Code can use the equivalent HTTP MCP configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/us-active-weather-alerts-tracker"
    }
  }
}
```

Example prompts:

- “Run the Weather.gov active alerts Actor for CA and OR, then summarize Severe alerts by expiry time.”
- “Collect current alerts for these NWS zones and return the official instructions and source URLs.”
- “Export a nationwide snapshot capped at 100 rows for my monitoring workflow.”

### Reliability and retry behavior

Each Weather.gov request has a 30-second timeout.

The Actor retries network errors, HTTP 429 responses, and temporary server errors up to three times with backoff and jitter.

It does not blindly retry stable client errors. Invalid inputs, unexpected response content, or exhausted retries fail the run so a broken upstream response is not mistaken for a quiet weather window.

No proxy fallback is enabled. A failed request is visible in the run status and logs.

### Limits and important behavior

- This is a current-alert export, not a historical archive.
- Weather.gov decides which messages are active and which fields are populated.
- Nationwide volume varies with weather conditions.
- One alert can affect multiple states, points, or zones and is emitted once per run.
- `maxItems` applies after filters and deduplication.
- Exact event filters require the NWS event name, but matching is case-insensitive.
- Geometry is often absent; use `affectedZones`, `geocode`, and `areaDescription` as additional geographic references.
- Alert timestamps can use local offsets rather than UTC.
- Empty output is valid when no current alerts match the selected scope and filters.

### Legality and responsible use

The Actor processes public information from the US National Weather Service API.

Follow Weather.gov's terms and guidance and avoid excessive schedules or unnecessarily broad repeated runs.

Do not use this dataset as the sole source for emergency decisions. Read the complete official alert, follow instructions from local authorities, and use official emergency channels for life-safety decisions.

Do not remove provenance when redistributing records. Keep `sourceUrl`, sender fields, and timestamps with downstream data.

### Troubleshooting

#### Why did the run return zero rows?

The selected areas, points, zones, event types, or classifications may have no active matching alert. Try removing optional filters or run a nationwide input to verify current source activity.

#### Why is geometry null?

NWS does not provide polygon geometry for every alert. Check `affectedZones`, `geocode`, and `areaDescription` instead.

#### Why did my area code fail?

Use a supported two-letter US state or territory code, such as `CA`, `TX`, `PR`, or `GU`.

#### Why did my point fail?

Use decimal latitude and longitude separated by a comma, for example `32.7157,-117.1611`. Latitude must be between -90 and 90 and longitude between -180 and 180.

#### Why did my alert URL fail?

Only HTTPS API resources beginning with `https://api.weather.gov/alerts/` are accepted. Public `weather.gov` web pages are not API alert inputs.

#### Why is the run marked failed instead of returning an empty dataset?

A source, response-shape, or input error should not look like “no active weather.” Inspect the log for the exact URL, status, or validation message.

### Related Actors

This Actor is currently a focused standalone Automation Lab product. No other Automation Lab Actor provides the same official US active-weather-alert row workflow, so this section intentionally avoids unrelated cross-links.

### FAQ

#### Does it scrape forecast temperatures or radar?

No. It exports active alert records only.

#### Does it send notifications by itself?

No. Use Apify schedules, webhooks, integrations, or your own downstream comparison process.

#### Can I collect several states in one run?

Yes. Add multiple `areas`; duplicate alert IDs are saved once.

#### Can I include NWS test messages?

Yes. Set `includeTestAlerts` to `true`. Operational exports exclude them by default.

#### Does it require an Apify Proxy?

No. The Actor calls the public official API directly.

#### Are instructions guaranteed?

No. Optional CAP fields can be null. Always handle nullable output fields.

#### Can I request more than 100 records?

Yes. Raise `maxItems` up to 10,000, but use only the volume your workflow needs.

#### Is each API request charged separately?

No. Billing is based on one start event and unique matching alert rows saved, not the number of source requests.

# Actor input Schema

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

Two-letter state or territory codes. Leave all location fields empty to collect active alerts nationwide.

## `points` (type: `array`):

Locations in latitude,longitude format, for example 34.0522,-118.2437.

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

Forecast or county zone identifiers such as CAZ041.

## `alertUrls` (type: `array`):

Optional https://api.weather.gov/alerts/... URLs. The same classification filters apply to these records.

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

Keep only selected NWS severity classifications.

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

Keep only selected NWS urgency classifications.

## `certainties` (type: `array`):

Keep only selected NWS certainty classifications.

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

Exact case-insensitive NWS event names, such as Flood Warning or Heat Advisory.

## `includeTestAlerts` (type: `boolean`):

Include NWS messages whose CAP status is Test. Disabled by default so operational exports contain actual alerts.

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

Maximum number of unique matching alert records to save.

## Actor input object example

```json
{
  "areas": [
    "CA"
  ],
  "points": [],
  "zones": [],
  "alertUrls": [],
  "severities": [],
  "urgencies": [],
  "certainties": [],
  "eventTypes": [],
  "includeTestAlerts": false,
  "maxItems": 20
}
```

# Actor output Schema

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

Dataset view showing key alert classification, validity, affected-area, source, and collection fields.

# 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"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/us-active-weather-alerts-tracker").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"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/us-active-weather-alerts-tracker").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"
  ],
  "maxItems": 20
}' |
apify call automation-lab/us-active-weather-alerts-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/us-active-weather-alerts-tracker"
        }
    }
}

```

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/9MxVcayLjli2tEUav/builds/L0s2BpOb7xvda9W0h/openapi.json
