# US Weather Forecast Scraper: official NWS forecasts and alerts (`bepolabs/us-weather`) Actor

Temperature, rain chance, wind and humidity per hour from weather.gov, no key needed, metric or imperial units.

- **URL**: https://apify.com/bepolabs/us-weather.md
- **Developed by:** [BEPO Labs](https://apify.com/bepolabs) (community)
- **Categories:** Travel, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 1,000 locations

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

### 🌦️ What is US Weather Forecast?

Turn a list of places into clean rows for a spreadsheet, a dashboard or an AI agent, straight from the US National Weather Service (NWS). Enter coordinate pairs and each location returns current conditions, up to 156 hours ahead, the week's periods in the forecaster's own words and every hazard notice valid there. Add two-letter area codes such as TX or FL and you receive everything in force across that region in one row. All of it comes from the government's free public-domain source, with no account to manage.

- **Logistics and field work**: check the forecast and severe-weather warnings for every depot, route stop or job site each morning
- **Events and travel**: watch rain chance, wind and temperature for venues and destinations days ahead
- **Alerting and risk**: schedule a run every hour and react when `worstSeverity` turns Severe or Extreme in your states
- **Agriculture and energy**: track freeze warnings, heat and gusts for fields, farms and solar or turbine sites
- **AI agents**: let Claude or ChatGPT answer "Will it rain at our Miami office tomorrow?" with official data through MCP

![US Weather Forecast: Official National Weather Service forecasts, hourly and 7-day, plus active weather alerts for any US point or state.](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/us-weather-hero.png)

#### ✨ Why use this Actor?

- ✅ **Official source**: forecasts and alerts straight from the National Weather Service, the US government's own forecasters
- ✅ **Three forecasts in one row**: current conditions, hourly periods (1 to 156 hours) and the 7-day day-and-night forecast with the detailed text
- ✅ **Alerts per point or per state**: every warning in effect at each location, or across a whole region or marine zone, with the worst severity on top
- ✅ **Imperial or metric**: °F and mph, or °C and km/h; the dewpoint is converted to match
- ✅ **Retries built in**: backoff on network errors, 429 and 5xx; a point the service cannot answer fails alone, never the run
- ✅ **Cheap**: 0.5 USD per 1,000 locations, every forecast and alert of the location included

### 📦 What data can you get with US Weather Forecast?

| | | |
|---|---|---|
| 📍 Location, city, state, coordinates | 🌡️ Temperature now | ⛅ Current short forecast |
| ⏱️ Hourly forecast (up to 156 hours) | 📅 7-day day and night forecast | 📝 Forecaster's detailed text |
| 🌧️ Chance of precipitation | 💧 Humidity and dewpoint | 💨 Wind speed and direction |
| 🚨 Active alerts: event, severity, urgency, certainty | 🗒️ Alert headline, description and instructions | 🏢 NWS office, grid point and time zone |

> Humidity and dewpoint come with the hourly rows; the forecaster's detailed text with the 7-day periods.

### 🚀 How to use US Weather Forecast

US Weather Forecast works in a few clicks, no coding needed:

1. [Create a free Apify account](https://console.apify.com/sign-up) (the free plan includes 5 USD of monthly credit).
2. Open [US Weather Forecast](https://apify.com/bepolabs/us-weather) and click **Try for free**.
3. Enter your locations as "latitude,longitude" (for example 40.7128,-74.0060) and/or state codes for warnings. Choose hourly, 7-day, alerts and units.
4. Click **Start** and wait for the run to finish (most runs take seconds).
5. Download your data as JSON, CSV, Excel, XML or HTML, or send it straight to Google Sheets, Make, Zapier or your AI agent.

![How US Weather Forecast works](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/us-weather-workflow.png)

### ⬇️ Input

Add up to 500 locations and alert areas in total. Everything else is optional.

##### Locations

Write each point as `latitude,longitude` with up to 4 decimals. Through the API you can also pass objects such as `{ "name": "Miami", "lat": 25.7617, "lon": -80.1918 }`; the name then labels the row.

##### Alert areas

Two-letter US state codes (TX, CA, NY ...), territories (PR, GU ...) or marine areas (PZ, AM ...). Each area becomes one row with every active alert.

##### Keep rows small

Switch off `hourly` or `daily` when you do not need them, and set `hours` (default 48) to the window you care about.

| Field | Type | What it does | Default |
|---|---|---|---|
| **Locations** (`locations`) | array | US points as "latitude,longitude" (e.g. | `["40.7128,-74.0060"]` |
| **Alert areas** (`alertAreas`) | array | US state or marine area codes (e.g. |  |
| **Hourly forecast** (`hourly`) | boolean | Hour-by-hour forecast per location. | `true` |
| **Hours** (`hours`) | integer | How many hours of the hourly forecast to keep (up to 156). | `48` |
| **7-day forecast** (`daily`) | boolean | Day and night periods for the next 7 days, with the forecaster's text. | `true` |
| **Active alerts** (`alerts`) | boolean | Active watches, warnings and advisories at each location. | `true` |
| **Units** (`units`) | string | us (°F, mph) or si (°C, km/h). | `"us"` |
| **Maximum retries** (`maxRetries`) | integer | Retries per request with exponential backoff on network errors, 429 and 5xx. | `3` |

![US Weather Forecast input form](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/us-weather-input.png)

#### Input example

```json
{
    "locations": [
        "40.7128,-74.0060",
        {
            "name": "Miami",
            "lat": 25.7617,
            "lon": -80.1918
        }
    ],
    "hours": 24
}
```

### ⬆️ Output

Every location becomes one row: the headline fields at the top level (temperature now, short forecast, next period, number of warnings, worst severity) and the full detail as arrays in `hourly`, `daily` and `alerts`. Each area query yields one record with its notices. The run summary in the key-value store (`OUTPUT`) names each input with its tally or its error.

![US Weather Forecast output table](https://api.apify.com/v2/key-value-stores/wdeAWGooHdIhvFgSY/records/us-weather-output.png)

#### Output example

One location row (local run, New York, 2026-10-16; lists shortened to two periods):

```json
{
    "type": "location",
    "location": "40.7128,-74.006",
    "city": "New York",
    "state": "NY",
    "temperatureNow": 62,
    "temperatureUnit": "F",
    "forecastNow": "Chance Rain Showers",
    "nextPeriod": "Overnight: Rain Showers, 60 °F",
    "alertCount": 0,
    "worstSeverity": null,
    "latitude": 40.7128,
    "longitude": -74.006,
    "timeZone": "America/New_York",
    "office": "OKX",
    "gridX": 33,
    "gridY": 42,
    "hourly": [
        {
            "name": null,
            "startTime": "2026-10-16T02:00:00-04:00",
            "endTime": "2026-10-16T03:00:00-04:00",
            "isDaytime": false,
            "temperature": 62,
            "temperatureUnit": "F",
            "precipitationChance": 42,
            "humidity": 72,
            "dewpoint": 53,
            "windSpeed": "10 mph",
            "windDirection": "SE",
            "shortForecast": "Chance Rain Showers"
        },
        {
            "name": null,
            "startTime": "2026-10-16T03:00:00-04:00",
            "endTime": "2026-10-16T04:00:00-04:00",
            "isDaytime": false,
            "temperature": 62,
            "temperatureUnit": "F",
            "precipitationChance": 42,
            "humidity": 78,
            "dewpoint": 55,
            "windSpeed": "10 mph",
            "windDirection": "SE",
            "shortForecast": "Chance Rain Showers"
        }
    ],
    "daily": [
        {
            "name": "Overnight",
            "startTime": "2026-10-16T02:00:00-04:00",
            "endTime": "2026-10-16T06:00:00-04:00",
            "isDaytime": false,
            "temperature": 60,
            "temperatureUnit": "F",
            "precipitationChance": 78,
            "windSpeed": "13 mph",
            "windDirection": "SE",
            "shortForecast": "Rain Showers",
            "detailedForecast": "Rain showers. Cloudy. Low around 60, with temperatures rising to around 63 overnight. Southeast wind around 13 mph. Chance of precipitation is 80%."
        },
        {
            "name": "Friday",
            "startTime": "2026-10-16T06:00:00-04:00",
            "endTime": "2026-10-16T18:00:00-04:00",
            "isDaytime": true,
            "temperature": 75,
            "temperatureUnit": "F",
            "precipitationChance": 89,
            "windSpeed": "14 mph",
            "windDirection": "S",
            "shortForecast": "Rain Showers",
            "detailedForecast": "Rain showers before 2pm, then showers and thunderstorms. Mostly cloudy, with a high near 75. South wind around 14 mph. Chance of precipitation is 90%. New rainfall amounts less than a tenth of an inch possible."
        }
    ],
    "alerts": [],
    "updated": "2026-10-15T18:36:14+00:00",
    "fetchedAt": "2026-10-16T06:15:45.109Z",
    "error": null
}
```

#### Alert area row

One row of the Texas query (local run, 2026-10-16): 47 active alerts of 13 kinds, the worst Severe. The list holds each in full; one is shown here, its long description and instruction shortened.

```json
{
    "type": "area",
    "location": "TX",
    "alertCount": 47,
    "worstSeverity": "Severe",
    "events": [
        "High Wind Warning",
        "Freeze Watch",
        "Wind Advisory",
        "Coastal Flood Advisory",
        "Red Flag Warning",
        "Fire Weather Watch",
        "Flash Flood Warning",
        "Flood Warning",
        "Blowing Dust Advisory",
        "Flood Watch",
        "High Surf Advisory",
        "Rip Current Statement",
        "Flood Advisory"
    ],
    "alerts": [
        {
            "id": "urn:oid:2.49.0.1.840.0.cc0157370501feefe619dc02dc99f9f945356a53.001.2",
            "event": "High Wind Warning",
            "severity": "Severe",
            "urgency": "Expected",
            "certainty": "Likely",
            "headline": "High Wind Warning issued October 15 at 11:56PM MDT until October 17 at 12:00AM MDT by NWS Midland/Odessa TX",
            "areaDesc": "Guadalupe Mountains of Eddy County; Guadalupe Mountains Above 7000 Feet; Guadalupe and Delaware Mountains",
            "sender": "NWS Midland/Odessa TX",
            "sent": "2026-10-15T23:56:00-06:00",
            "onset": "2026-10-15T23:56:00-06:00",
            "expires": "2026-10-16T12:00:00-06:00",
            "ends": "2026-10-17T00:00:00-06:00",
            "description": "* WHAT...Northeast winds 35 to 45 mph with gusts up to 60 mph\nexpected, especially through Guadalupe Pass. ...",
            "instruction": "Winds will be particularly hazardous at higher elevations where the\nstrongest winds are likely to occur. ...",
            "response": "Prepare"
        }
    ],
    "fetchedAt": "2026-10-16T06:15:55.568Z",
    "error": null
}
```

View the results as a table or JSON in the Output tab and download them as JSON, CSV, Excel, XML, HTML or RSS. Pick the fields you need first, or take the whole dataset.

### 💰 How much does US Weather Forecast cost?

US Weather Forecast is priced **per event**: **0.5 USD per 1,000 locations** (0.0005 USD each), with no monthly rental. A state's alert row counts the same, with all its forecasts and alerts; inputs that fail are not charged.

| You get | You pay |
|---|---|
| 100 locations | 0.05 USD |
| 1,000 locations | 0.5 USD |
| 10,000 locations | 5 USD |
| 100,000 locations | 50 USD |

💡 Apify's free plan gives you 5 USD of credit every month, enough for about **10,000 locations** at no cost. Set a spending limit per run and the Actor stops there.

### ⚖️ US Weather Forecast vs. the alternatives

| | US Weather Forecast | Generic weather scrapers | Commercial weather APIs |
|---|---|---|---|
| **Source** | ✅ National Weather Service | weather websites | own models, mixed sources |
| **Hourly, 7-day and alerts in one row** | ✅ | usually forecast only | ✅ separate calls |
| **Alerts for a whole state** | ✅ | ❌ | some |
| **API key to manage** | ✅ none | ✅ none | ❌ key and monthly plan |
| **Countries** | US only | varies | ✅ worldwide |
| **API, schedules and MCP for AI agents** | ✅ | ✅ | API only |

### 🔌 Integrations, API and MCP

#### Connect US Weather Forecast to your AI agent (MCP)

Give Claude, ChatGPT, Cursor or any MCP client direct access to US Weather Forecast through the [Apify MCP server](https://mcp.apify.com). Add this URL to its settings:

```text
https://mcp.apify.com/?actors=bepolabs/us-weather
```

For Claude Desktop, add it under `mcpServers` in `claude_desktop_config.json`:

```json
{
    "mcpServers": {
        "us-weather": {
            "command": "npx",
            "args": [
                "-y",
                "@apify/actors-mcp-server",
                "--actors",
                "bepolabs/us-weather"
            ],
            "env": {
                "APIFY_TOKEN": "<your Apify API token>"
            }
        }
    }
}
```

Then just ask: *"What is the weather forecast for the next 24 hours in New York and Miami, and are there any active weather warnings in Texas?"*

#### Run it from your code

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("bepolabs/us-weather").call(run_input={"locations":["40.7128,-74.0060",{"name":"Miami","lat":25.7617,"lon":-80.1918}],"hours":24})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

JavaScript (`npm install apify-client`):

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('bepolabs/us-weather').call({"locations":["40.7128,-74.0060",{"name":"Miami","lat":25.7617,"lon":-80.1918}],"hours":24});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### No-code integrations

Send results to **Google Sheets, Slack, Airtable, HubSpot, Make, Zapier, n8n** and more from the Integrations tab, start runs on a **schedule**, or trigger your own endpoint with a **webhook** when a run finishes. The [Apify API](https://docs.apify.com/api/v2) gives you full control over runs and datasets.

### ❓ FAQ

##### Does it work outside the US?

No. The NWS covers the US and its territories only. A location elsewhere fails alone with the agency's own message (for Paris: `Unable to provide data for requested point 48.8566,2.3522`), is listed in the run summary and is not charged.

##### Can I give a city name or ZIP code?

Not yet: give latitude and longitude. You can add a `name` to each point through the API, and the row returns the city and state the weather service matched.

##### How fresh is the data?

Each run asks the weather service live. The `updated` field says when the forecast was last issued, `fetchedAt` when the Actor read it. Schedule the Actor hourly for a rolling feed.

##### How do I get only severe weather?

Use alert areas, or keep alerts on for your locations, and filter rows on `worstSeverity` (Extreme, Severe, Moderate, Minor).

##### Can I get Celsius?

Yes: set `units` to `si` for °C and km/h. The default `us` gives °F and mph.

##### Is it legal to use US Weather Forecast?

Yes. The data comes from api.weather.gov, the open API of the US National Weather Service. Information produced by the US federal government is in the public domain, and the agency asks callers only for an identifying User-Agent, which the Actor sends. Please credit the NWS when you republish forecasts.

##### What if something is missing or does not work?

Open an issue on the **Issues** tab; we read each one and reply. Feature requests are welcome too.

### 💬 Your feedback

Tell us what US Weather Forecast should add on the **Issues** tab or leave a review; your notes decide what we work on next.

### 🔗 Related Actors

| Actor | What it does |
|---|---|
| 🦋 [Bluesky Posts](https://apify.com/bepolabs/bluesky-posts) | Bluesky posts for any search or handle with text, date, author, likes, reposts, replies, links and hashtags. No login. |
| 🟧 [Hacker News Search](https://apify.com/bepolabs/hacker-news) | Hacker News stories, comments, Ask HN, Show HN and jobs for any search, with points, comment count, date and text. |
| 📰 [RSS Feed Reader](https://apify.com/bepolabs/rss-reader) | Any RSS, Atom or JSON feed, or just a website URL, to one clean list of articles, with full text on request. |
| 🏛️ [SEC EDGAR Filings](https://apify.com/bepolabs/sec-edgar) | Tickers or CIK numbers to SEC filings: 10-K, 10-Q, 8-K, Form 4 and any other form, with document links. |
| 📊 [Google Sheets Import and Export](https://apify.com/bepolabs/google-sheets) | Send any Apify dataset or JSON to a Google Sheet (append, replace or upsert by key), or read a sheet back as clean rows. |

# Changelog

This Actor's version history is a separate document: https://apify.com/bepolabs/us-weather/changelog.md

# Actor input Schema

## `locations` (type: `array`):

US points as "latitude,longitude" (e.g. 40.7128,-74.0060), or objects { "name", "lat", "lon" } through the API. Up to 500.

## `alertAreas` (type: `array`):

US state or marine area codes (e.g. TX, CA, PZ) for all their active alerts, one row per area.

## `hourly` (type: `boolean`):

Hour-by-hour forecast per location.

## `hours` (type: `integer`):

How many hours of the hourly forecast to keep (up to 156).

## `daily` (type: `boolean`):

Day and night periods for the next 7 days, with the forecaster's text.

## `alerts` (type: `boolean`):

Active watches, warnings and advisories at each location.

## `units` (type: `string`):

us (°F, mph) or si (°C, km/h).

## `maxRetries` (type: `integer`):

Retries per request with exponential backoff on network errors, 429 and 5xx.

## Actor input object example

```json
{
  "locations": [
    "40.7128,-74.0060"
  ],
  "hourly": true,
  "hours": 48,
  "daily": true,
  "alerts": true,
  "units": "us",
  "maxRetries": 3
}
```

# Actor output Schema

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

Dataset items, one row per result, in the overview table view.

# 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 = {
    "locations": [
        "40.7128,-74.0060"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bepolabs/us-weather").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 = { "locations": ["40.7128,-74.0060"] }

# Run the Actor and wait for it to finish
run = client.actor("bepolabs/us-weather").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 '{
  "locations": [
    "40.7128,-74.0060"
  ]
}' |
apify call bepolabs/us-weather --silent --output-dataset

```

## MCP server setup

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

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/wlH3C15l0OUysrwZU/builds/mKRXvqeieA2lyOanA/openapi.json
