# US Weather Forecast API — NWS/NOAA Hourly & 7-Day, No Key (`factpipe/us-weather-forecast`) Actor

Official National Weather Service (NOAA) forecasts for any US latitude/longitude: hourly or 7-day periods with temperature, rain chance and wind. Bulk locations, no API key. $2 per 1,000 locations.

- **URL**: https://apify.com/factpipe/us-weather-forecast.md
- **Developed by:** [Neo B](https://apify.com/factpipe) (community)
- **Categories:** Travel, Developer tools
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 location forecasts

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?

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

## US Weather Forecast API — NWS/NOAA Hourly & 7-Day, No Key

Official **US National Weather Service** forecasts for any US coordinates — daily or hourly periods as clean, flat JSON records. Public-domain government data, no API key, no rate-limit anxiety. Feed logistics planning, event ops, energy forecasting, or AI agents with the same forecast data NOAA publishes.

### Quick start

1. Click **Start** with the two prefilled coordinates (New York, Los Angeles). It finishes in under a minute.
2. You get the official NWS 7-day forecast for each location.
3. That first run costs $0.004, well within Apify's free monthly credit. Then swap in your own input or schedule it.

### What you get

One record per forecast period per location:

```json
{
  "location": "Manhattan, NY",
  "latitude": 40.7128,
  "longitude": -74.006,
  "grid_id": "OKX",
  "period_number": 1,
  "period_name": "Overnight",
  "start_time": "2026-09-11T04:00:00-04:00",
  "end_time": "2026-09-11T06:00:00-04:00",
  "is_daytime": false,
  "temperature": 70,
  "temperature_unit": "F",
  "precipitation_probability_pct": 17,
  "wind_speed": "8 mph",
  "wind_direction": "N",
  "short_forecast": "Chance Rain Showers",
  "detailed_forecast": "A chance of rain showers. Mostly cloudy. Low around 70...",
  "forecast_updated_at": "2026-09-11T07:32:00+00:00",
  "source_url": "https://api.weather.gov/gridpoints/OKX/33,42/forecast",
  "fetched_at": "2026-09-11T12:00:00.000Z"
}
```

### Use cases

- **Logistics & field ops**: batch forecasts for all your depots/sites in one scheduled run.
- **Events & staffing**: precipitation probability and wind for the next 7 days per venue.
- **Data pipelines & agents**: deterministic records, tiny input schema — ideal via API or MCP.

### Input

| Field | Type | Notes |
|---|---|---|
| `coordinates` | string\[], required | US locations as `"lat,lon"`, e.g. `"40.7128,-74.0060"` |
| `hourly` | boolean | Hourly periods instead of day/night (default false) |
| `maxPeriodsPerLocation` | integer | Periods per location (default 14 = 7 days) |

US coverage only (NWS). Non-US coordinates return an uncharged `outside_us_coverage` record.

### Pricing (pay per event)

| Event | Price | Meaning |
|---|---|---|
| `location-forecast` | **$2.00 per 1,000** ($0.002 each) | One location successfully forecast (all its period records included). Invalid or out-of-coverage locations are never charged. |

Example: 1,000 locations cost **$2.00**. You only pay for delivered results.

### Related factpipe Actors

- [ECB Exchange Rates API — Official Euro FX Rates, History](https://apify.com/factpipe/ecb-exchange-rates) — official ECB euro exchange rates
- [Wikipedia Scraper API — Articles, Summaries & Full Text](https://apify.com/factpipe/wikipedia-scraper) — Wikipedia articles and summaries

### FAQ

**Do I need a weather API key?**
No. Data comes from the official US National Weather Service (api.weather.gov), which is public domain and keyless.

**Can I get hourly forecasts for many locations at once?**
Yes. Pass any number of `lat,lon` coordinates and set `hourly: true`; you pay once per location, all its forecast periods included.

**Does it work outside the US?**
No. NWS forecasts cover US locations only; out-of-coverage locations are skipped and never charged.

**Can I call it from Python, JavaScript, Make, Zapier or an AI agent?**
Yes. Run it through the Apify API or official Python/JavaScript clients, connect it to Make, Zapier, n8n, Slack or Google Sheets via Apify integrations, or expose it to AI agents through the Apify MCP server. Input is small and output is deterministic flat JSON.

### Reliability

Official api.weather.gov, retries with backoff, structured failure reporting, daily issue triage.

# Actor input Schema

## `coordinates` (type: `array`):

US locations as "lat,lon" strings, e.g. "40.7128,-74.0060" (NYC).

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

Hourly periods instead of day/night periods.

## `maxPeriodsPerLocation` (type: `integer`):

Forecast periods returned per location.

## Actor input object example

```json
{
  "coordinates": [
    "40.7128,-74.0060",
    "34.0522,-118.2437"
  ],
  "hourly": false,
  "maxPeriodsPerLocation": 14
}
```

# Actor output Schema

## `resultsDatasetUrl` (type: `string`):

No description

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

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

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

```

## MCP server setup

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

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/zCqFs1GRTgDcS0yeI/builds/MHc8E7ECs9w2dHLbD/openapi.json
