# US Weather API (NWS) – Forecast, Hourly, Alerts – $1/1k (`henrycrawl/us-weather-nws`) Actor

Official US National Weather Service data for any US city or coordinates: 7-day forecast periods, hourly forecast and active weather alerts (warnings, watches, advisories). Works with AI agents via Apify MCP. Pay only per result; error rows are free.

- **URL**: https://apify.com/henrycrawl/us-weather-nws.md
- **Developed by:** [Henry Crawl](https://apify.com/henrycrawl) (community)
- **Categories:** Developer tools, Travel, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 results

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

## US Weather API (NWS) – 7-Day Forecast, Hourly Forecast & Active Alerts

Get official US National Weather Service (weather.gov) forecasts and active weather alerts for any US city or coordinates, as clean rows – no API key, no GeoJSON parsing, no grid lookups.

### What you get

Give a list of US locations (`"lat,lon"` or a place name like `"Austin, TX"`). For each one the actor resolves the NWS grid point and returns:

- **forecast** rows: the 7-day forecast, ~14 day/night periods (`recordType = "forecast"`)
- **hourly** rows (optional): hour-by-hour forecast, up to 156 hours (`recordType = "hourly"`)
- **alert** rows: warnings, watches and advisories currently in effect at that point (`recordType = "alert"`)

### Output fields

| Field | Description |
|---|---|
| recordType | `forecast`, `hourly` or `alert` |
| location, place, latitude, longitude | Your input, resolved place name and coordinates |
| nwsOffice, gridX, gridY, timeZone | NWS forecast office and grid cell |
| periodName, startTime, endTime, isDaytime | Forecast period (e.g. "Tonight") |
| temperature, temperatureUnit, temperatureTrend | Temperature (°F) |
| precipitationProbability | Chance of precipitation, % |
| dewpointC, relativeHumidity | Hourly rows only |
| windSpeed, windDirection | e.g. "7 mph", "NE" |
| shortForecast, detailedForecast, icon | Text forecast |
| event, headline, severity, certainty, urgency | Alert rows: e.g. "Winter Storm Warning", "Severe" |
| areaDesc, senderName, sent, effective, onset, expires, ends | Alert area, issuing office and timing |
| description, instruction, url | Full alert text and link |
| updateTime, scrapedAt | When NWS issued the forecast / when we fetched it |

### Example output

```json
{
  "location": "New York, NY", "latitude": 40.7143, "longitude": -74.006, "place": "New York, New York",
  "nwsOffice": "OKX", "gridX": 33, "gridY": 42, "timeZone": "America/New_York",
  "recordType": "forecast", "periodNumber": 2, "periodName": "Tonight",
  "startTime": "2026-11-21T18:00:00-05:00", "endTime": "2026-11-22T06:00:00-05:00", "isDaytime": false,
  "temperature": 52, "temperatureUnit": "F", "precipitationProbability": 0,
  "windSpeed": "6 mph", "windDirection": "E", "shortForecast": "Mostly Cloudy",
  "detailedForecast": "Mostly cloudy. Low around 52, with temperatures rising to around 54 overnight. East wind around 6 mph."
}
```

```json
{
  "location": "Nome, AK", "recordType": "alert", "event": "High Wind Watch", "severity": "Severe",
  "certainty": "Possible", "urgency": "Future", "senderName": "NWS Fairbanks AK",
  "headline": "High Wind Watch issued November 21 at 5:46AM AKST until November 23 at 9:00AM AKST by NWS Fairbanks AK",
  "onset": "2026-11-22T18:00:00-09:00", "ends": "2026-11-23T09:00:00-09:00"
}
```

### Pricing

Pay per result: **$1 per 1,000 rows** (one forecast period, hourly period or alert = one row). Error rows (place not found, point outside the US) are free. Use `maxResults` to cap spending.

### Input example

```json
{
  "locations": ["New York, NY", "39.7392,-104.9903", "Miami, FL"],
  "includeForecast": true,
  "includeHourly": true,
  "hourlyHours": 24,
  "includeAlerts": true,
  "maxResults": 200
}
```

NWS covers the United States and its territories only. For worldwide weather use the Open-Meteo actor `henrycrawl/open-meteo-weather`.

### Use with AI agents (MCP)

Connect this actor to Claude, Cursor or any MCP client via Apify MCP:
`https://mcp.apify.com/?tools=henrycrawl/us-weather-nws`
Ask: "Are there any weather warnings for Denver right now, and what's the forecast for the weekend?"

Data source: US National Weather Service API (api.weather.gov), public domain.

### Support

Questions, bugs or a field you need? Email **support@tidyware.app** — we reply within 1 business day. You can also open an issue on this page.

# Actor input Schema

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

US locations: coordinates as "lat,lon" (e.g. "39.7392,-104.9903") or a US place name (e.g. "Austin, TX", "Seattle"). Place names are geocoded with Open-Meteo geocoding (largest matching US place).

## `includeForecast` (type: `boolean`):

Return the NWS 7-day forecast: about 14 day/night periods per location (recordType = forecast).

## `includeHourly` (type: `boolean`):

Also return the NWS hourly forecast (recordType = hourly).

## `hourlyHours` (type: `integer`):

How many hourly periods to return per location when hourly is on (1-156).

## `includeAlerts` (type: `boolean`):

Return NWS weather alerts currently in effect for each point (recordType = alert): warnings, watches, advisories.

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

Maximum number of rows for the whole run (you are only charged for delivered rows).

## Actor input object example

```json
{
  "locations": [
    "New York, NY",
    "39.7392,-104.9903"
  ],
  "includeForecast": true,
  "includeHourly": false,
  "hourlyHours": 24,
  "includeAlerts": true,
  "maxResults": 30
}
```

# Actor output Schema

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

One row per result, plus free error rows (type = error).

## `summary` (type: `string`):

Counts for this run (SUMMARY record).

# 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": [
        "New York, NY",
        "39.7392,-104.9903"
    ],
    "maxResults": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("henrycrawl/us-weather-nws").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": [
        "New York, NY",
        "39.7392,-104.9903",
    ],
    "maxResults": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("henrycrawl/us-weather-nws").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": [
    "New York, NY",
    "39.7392,-104.9903"
  ],
  "maxResults": 30
}' |
apify call henrycrawl/us-weather-nws --silent --output-dataset

```

## MCP server setup

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

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/LCZQUlJxxG2BFSqjC/builds/ICthKWZ1fB0tso48M/openapi.json
