# Weather.gov Zone Forecasts Scraper (`automation-lab/weather-gov-zone-forecast-records`) Actor

Export official Weather.gov zone forecast periods with zone identity, narrative text, raw issue time and source URLs. Resolve current zone IDs from US points for recurring local planning.

- **URL**: https://apify.com/automation-lab/weather-gov-zone-forecast-records.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.31 / 1,000 forecast period exporteds

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

## Weather.gov Zone Forecasts Scraper

Export official **weather.gov zone forecasts** as structured narrative period records for recurring local operations planning. Supply current US forecast zone IDs or resolve them from US latitude/longitude points. Each row preserves the official zone name, period label, forecast prose, raw issuance time and source links.

This Actor collects geographic **zone** forecasts, not point-grid numeric forecasts. Anchorage is a useful example: its current forecast zone is `AKZ701`; the former `AKZ102` is retired.

### Who is it for?

- Field-service coordinators checking tomorrow’s conditions across service regions.
- Local logistics teams preserving the official narrative alongside planning notes.
- Community organizers reviewing multi-day weather outlooks before outdoor work.
- Analysts collecting successive forecast snapshots in a spreadsheet or warehouse.

It is not a warning service, emergency decision system or replacement for checking current official guidance.

### Why use this Actor?

Zone prose describes a wider geographic area and can include combined periods that differ from a coordinate-specific forecast. The Actor keeps those official labels intact instead of manufacturing hourly timestamps, temperatures or separate days.

Point input resolves the **current zone ID** before collection. Duplicate zone IDs across direct and point inputs are fetched once. Issuance is read from the forecast’s Last Update block, not the nearby weather observation timestamp.

### Getting started

1. Open the Input tab.
2. Keep `AKZ701` to try Anchorage, or enter another current US forecast zone ID.
3. Optionally supply `points` to resolve zones from coordinates.
4. Set `maxItems` high enough to include all desired periods.
5. Run the Actor and inspect the forecast records in the default dataset.
6. Export JSON, CSV, Excel or XML using Apify’s dataset export controls.

Example input:

```json
{
  "zoneIds": ["AKZ701"],
  "maxItems": 10
}
```

### Inputs

| Field | Type | Meaning |
| --- | --- | --- |
| `zoneIds` | string array | Up to 50 current uppercase land forecast zone IDs, e.g. `AKZ701`, `NYZ072`, `CAZ006`. |
| `points` | object array | Up to 20 objects containing numeric `latitude` and `longitude`. US coverage only. |
| `maxItems` | integer | Global output cap, 1–1000; default 100. |

Supply at least one zone or point. An empty input fails rather than selecting an arbitrary location. Coordinates must be valid decimal degrees; a valid coordinate outside NWS coverage can still fail upstream.

Point example:

```json
{
  "points": [{ "latitude": 61.2181, "longitude": -149.9003 }],
  "maxItems": 100
}
```

Point and zone inputs can be combined. The resulting zone set is deduplicated. The Actor does not offer location-name search, arbitrary URLs, historical date selection or marine forecasts.

### Extracted data

| Field | Description |
| --- | --- |
| `zoneId` | Current forecast zone identity. |
| `zoneName` | Official MapClick geographic zone name. |
| `periodNumber` | One-based period order within the source zone forecast. |
| `periodName` | Official label, including combined day/night or multi-day periods. |
| `forecastText` | Narrative forecast with normalized whitespace. |
| `issuedAtRaw` | Raw forecast Last Update string, including its source time zone. |
| `sourceUrl` | Official MapClick zone text forecast page. |
| `zoneUrl` | Official zone metadata URL, not a forecast endpoint. |
| `scrapedAt` | UTC ISO timestamp when the forecast was parsed. |

The dataset schema permits null values for display compatibility, but current extraction requires all nine fields. An incomplete source forecast fails validation rather than becoming a billed blank record.

### Output example

A representative Anchorage period collected from the source:

```json
{
  "zoneId": "AKZ701",
  "zoneName": "Anchorage",
  "periodNumber": 1,
  "periodName": "Today",
  "forecastText": "Widespread rain showers. Highs in the lower 40s. Light winds.",
  "issuedAtRaw": "243 AM AKDT Wed Sep 30 2026",
  "sourceUrl": "https://forecast.weather.gov/MapClick.php?zoneid=AKZ701&FcstType=text",
  "zoneUrl": "https://api.weather.gov/zones/forecast/AKZ701",
  "scrapedAt": "2026-09-30T18:55:00.000Z"
}
```

Forecasts change. Your exact text, period count and issuance time will differ. A label such as `Sunday And Sunday Night` remains one record, not two synthetic records.

### How much does it cost to export Weather.gov zone forecasts?

Pay per event: a **$0.005 one-time start fee** plus one `item` event per exported forecast period. Zone resolution has no separate event charge. Failed or rejected periods have no item charge; a failed run after validation can still incur its start fee and retain earlier output.

| Apify plan | Price per period |
| --- | --- |
| FREE | $0.000598 |
| BRONZE | $0.00052 |
| SILVER | $0.0004056 |
| GOLD | $0.000312 |
| PLATINUM | $0.000312 |
| DIAMOND | $0.000312 |

BRONZE examples including the start fee: 1 period costs $0.00552; 10 cost $0.0102; 25 cost $0.018; 100 cost $0.057. FREE examples: 10 periods cost $0.01098; 100 cost $0.0648. Use the output cap and Apify’s maximum charge setting to bound your run.

### Limits and failure behavior

Requests are sequential, direct HTTP without proxies or browser rendering. Network errors, rate limits and server failures receive at most three attempts per request with short backoff; stable 4xx responses and parser failures are not blindly retried.

A missing or retired zone, unavailable source, malformed response or absent forecast issuance causes a failed run. The Actor checks the source’s zone link to avoid returning another location’s forecast. Earlier successfully saved periods can remain in the dataset if a later zone fails.

The global cap may truncate a zone midway through its period list. There is no pagination: each MapClick page contains its current forecast periods. Period counts and future coverage vary by zone.

### Integrations

Use an Apify Schedule to collect snapshots at an appropriate interval for your planning process. Send completion webhooks to Make, Zapier or your own service, then retrieve the default dataset.

For Google Sheets, append rows with zone ID and scrape time. For a warehouse, retain issuance plus period number and forecast prose; compare successive snapshots yourself. This Actor does not maintain a change cache, emit alerts or guarantee that consecutive period numbers describe the same calendar interval.

### API usage

Use an Apify token belonging to your own account. Never paste it into shared documents.

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/automation-lab~weather-gov-zone-forecast-records/run-sync-get-dataset-items' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"zoneIds":["AKZ701"],"maxItems":10}'
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/weather-gov-zone-forecast-records')
  .call({ zoneIds: ['AKZ701'], maxItems: 10 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/weather-gov-zone-forecast-records').call(
    run_input={'zoneIds': ['AKZ701'], 'maxItems': 10})
print(client.dataset(run['defaultDatasetId']).list_items().items)
```

### MCP use

Connect the Actor through Apify MCP for AI-assisted forecast retrieval. The agent must still supply valid zone IDs or coordinates and respect the output limit.

```bash
claude mcp add --transport http apify \
  'https://mcp.apify.com?tools=automation-lab/weather-gov-zone-forecast-records'
```

#### Claude Desktop, Cursor and VS Code

Equivalent client configuration for HTTP-capable clients (older Claude Desktop versions may need an MCP transport bridge):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/weather-gov-zone-forecast-records"
    }
  }
}
```

Example prompt: “Retrieve up to 10 Anchorage zone forecast periods using AKZ701 and summarize the official prose, retaining the issue time and source link.” Configure authentication according to your MCP client’s Apify connection instructions.

### Legality and responsible use

This independent Actor is not affiliated with or endorsed by NOAA, NWS or Apify. It uses Apify’s standard terms, with no custom end-user agreement.

Data comes from public NOAA/NWS pages. Follow source terms, use modest scheduling and preserve official provenance. Forecasts are time-sensitive and can be revised; this export does not carry an availability or accuracy guarantee. Check Weather.gov directly for safety-critical decisions and active warnings.

### Data handling and support

The Actor uses no AI at runtime and sends no input or forecasts to model providers. Coordinates are sent to the official NWS point endpoint; zone IDs are sent to MapClick. Only public forecast records are exported. There is no login, paid source API, proxy, persistent session or cross-run cache.

Input, datasets and logs remain in your Apify account under its storage-retention settings until expiry or deletion; the Actor does not enforce a separate deletion schedule. Delete runs and associated storage from Console when no longer needed. Avoid submitting private address information: decimal coordinates suffice. The Actor does not log tokens or credentials. Contact the developer through the Actor’s Issues tab for problems; include a zone ID and run link, not secrets.

### FAQ and troubleshooting

**Why does AKZ102 fail?** Forecast zones are reorganized. Anchorage currently uses AKZ701. Resolve a point to obtain its current zone instead of repeatedly retrying a retired identifier.

**Why does a point return different text from a point forecast?** Points only resolve geographic zones here. Zone prose is not the NWS gridpoint temperature/hourly product.

**Can I fetch historic forecasts?** No. Archive successive datasets yourself; the Actor reads the current source forecast only.

**Why are there fewer rows than expected?** A source may combine periods, a zone may have fewer periods, or `maxItems` may have stopped collection. Compare the official source page.

**What if the source is temporarily unavailable?** Check the failed run log. Retry later after checking official availability; repeated immediate runs do not fix a retired zone or changed page structure.

### Related Actors

- [Weather.gov Active Alerts Tracker](https://apify.com/automation-lab/us-active-weather-alerts-tracker) for warning records, rather than routine forecast prose.
- [Aviation Weather METAR and TAF Scraper](https://apify.com/automation-lab/aviation-weather-metar-taf-scraper) for airport weather reports.
- [NOAA Historical Weather Observations](https://apify.com/automation-lab/noaa-historical-weather-observations) for past station observations, not future zone forecasts.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/weather-gov-zone-forecast-records/changelog.md

# Actor input Schema

## `zoneIds` (type: `array`):

Up to 50 current uppercase land forecast zone IDs, for example AKZ701 (Anchorage). Retired IDs fail; use points to resolve replacements.

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

Optional list of up to 20 latitude/longitude objects. Each point resolves its current US forecast zone; this does not export point-grid forecasts.

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

Global output cap, from 1 to 1000. A capped result can contain only part of a zone forecast. Combined source periods remain one row each.

## Actor input object example

```json
{
  "zoneIds": [
    "AKZ701"
  ],
  "maxItems": 10
}
```

# Actor output Schema

## `dataset` (type: `string`):

Current run forecast periods with zone identity and source URLs.

# 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 = {
    "zoneIds": [
        "AKZ701"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/weather-gov-zone-forecast-records").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 = {
    "zoneIds": ["AKZ701"],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/weather-gov-zone-forecast-records").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 '{
  "zoneIds": [
    "AKZ701"
  ],
  "maxItems": 10
}' |
apify call automation-lab/weather-gov-zone-forecast-records --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/weather-gov-zone-forecast-records"
        }
    }
}
```

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/igE5LUi4frG3mchut/builds/fFKQLK4GN3fGoHCgT/openapi.json
