# US NWS Point Forecast (`zinin/us-nws-point-forecast`) Actor

Get official National Weather Service daily or hourly forecasts for US latitude/longitude points.

- **URL**: https://apify.com/zinin/us-nws-point-forecast.md
- **Developed by:** [Tim Zinin](https://apify.com/zinin) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## US NWS Point Forecast

Get official National Weather Service forecasts for latitude/longitude points in the United States and its territories. The Actor resolves each point through the public NWS API and returns one clean dataset row per daily or hourly forecast period. No NWS key or account is required.

### Use cases

- Feed weather-aware delivery, field-service, travel, and event workflows.
- Schedule a point forecast and compare periods over time.
- Add official forecast context to dashboards, spreadsheets, agents, and alerts.
- Retrieve structured wind, temperature, and precipitation probability without parsing forecast web pages.

### Input

| Field | Type | Default | Limits |
|---|---|---|---|
| `locations` | array of `{latitude, longitude, label?}` | White House | 1–25 locations; label up to 120 characters |
| `forecastType` | `daily` or `hourly` | `daily` | One value per run |
| `maxPeriods` | integer | `14` | 1–156 per location |

Every limit is enforced again at runtime, including a maximum workload of 3,900 candidate periods. Coordinates outside NWS coverage produce a free explanation row rather than invented data.

**Prefill input:**

```json
{
  "locations": [{ "latitude": 38.8977, "longitude": -77.0365, "label": "White House" }],
  "forecastType": "daily",
  "maxPeriods": 14
}
```

**Several hourly forecasts:**

```json
{
  "locations": [
    { "latitude": 40.7128, "longitude": -74.006, "label": "New York" },
    { "latitude": 34.0522, "longitude": -118.2437, "label": "Los Angeles" }
  ],
  "forecastType": "hourly",
  "maxPeriods": 24
}
```

### Output

```json
{
  "found": true,
  "label": "White House",
  "latitude": 38.8977,
  "longitude": -77.0365,
  "forecastType": "daily",
  "office": "LWX",
  "gridX": 97,
  "gridY": 71,
  "name": "Tonight",
  "number": 1,
  "startTime": "2026-11-10T18:00:00-05:00",
  "endTime": "2026-11-11T06:00:00-05:00",
  "isDaytime": false,
  "temperature": 40,
  "temperatureUnit": "F",
  "temperatureTrend": null,
  "probabilityOfPrecipitation": 2,
  "windSpeed": "5 mph",
  "windDirection": "N",
  "shortForecast": "Clear",
  "detailedForecast": "Clear, with a low around 40.",
  "icon": "https://api.weather.gov/icons/...",
  "source": "National Weather Service (NWS)",
  "sourceUrl": "https://api.weather.gov/gridpoints/LWX/97,71/forecast",
  "retrievedAt": "2026-11-10T20:00:00.000Z"
}
```

`probabilityOfPrecipitation` is a percent or `null`. NWS wind speed can be a range such as `5 to 10 mph`, so it remains source text. Every row includes its source, exact source URL, and UTC retrieval time. A row with `found:false` contains an `error` and is not charged as a result.

### Pricing

**$0.0015 per forecast period (`result-found`) on the Free plan, with automatic discounts on paid Apify plans: Bronze −5%, Silver −10%, Gold −15%, Platinum −18%, Diamond −20%. A small Actor start event ($0.002) applies per run**

This Actor uses pay-per-event pricing: an Actor-start event and one `result-found` event for each successfully delivered forecast-period row. Error, no-coverage, source-failure, and budget-notice rows (`found:false`) do not use the result event and are free. Before every paid delivery, the Actor verifies that the next complete row fits the run's remaining spending limit; delivery and billing then happen atomically.

### Limitations

- The NWS API principally covers the United States, territories, and adjacent waters. A valid coordinate can still be outside forecast-grid coverage.
- Forecasts change as NWS issues new products. `retrievedAt` records when this Actor observed the data; it is not an issuance time.
- NWS can return `null` for precipitation probability or temperature trend. The Actor preserves that distinction.
- Daily periods are normally day/night blocks, not calendar-day aggregates. Hourly availability and horizon are decided by NWS.
- Severe-weather alerts are not included. Use the NWS alerts API for warnings and watches.
- The source may throttle or temporarily fail. The Actor retries bounded transient failures, then emits a free error row instead of stale or guessed data.

### Source, terms, and attribution

Data comes directly from the official US National Weather Service API at `api.weather.gov`. NWS asks API clients to send an identifying `User-Agent`; this Actor does so, requests sequentially, uses bounded retries, and does not evade source controls. See the [NWS API documentation](https://www.weather.gov/documentation/services-web-api) and [National Weather Service terms of use](https://www.weather.gov/disclaimer).

Weather information is attributed to the **National Weather Service (NWS)** on every row. US government weather data is generally public domain, but NWS/NOAA names and marks must not be used to imply endorsement. You are responsible for complying with applicable source terms and for validating weather information before safety-critical decisions. This Actor is not affiliated with or endorsed by NOAA or NWS.

### API example

```bash
curl -X POST "https://api.apify.com/v2/acts/zinin~us-nws-point-forecast/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"locations":[{"latitude":38.8977,"longitude":-77.0365}],"forecastType":"daily","maxPeriods":14}'
```

### Related Actors

- [us-nws-alert-feed](https://apify.com/zinin/us-nws-alert-feed)
- [noaa-metar-weather-extractor](https://apify.com/zinin/noaa-metar-weather-extractor)
- [usgs-streamflow-latest](https://apify.com/zinin/usgs-streamflow-latest)

# Actor input Schema

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

US points to forecast (maximum 25).

## `forecastType` (type: `string`):

Which NWS product to return: the standard 12-hour periods forecast or the hourly forecast.

## `maxPeriods` (type: `integer`):

Maximum number of forecast periods returned per location (each period is one paid row).

## Actor input object example

```json
{
  "locations": [
    {
      "latitude": 38.8977,
      "longitude": -77.0365,
      "label": "White House"
    }
  ],
  "forecastType": "daily",
  "maxPeriods": 14
}
```

# Actor output Schema

## `dataset` (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 = {
    "locations": [
        {
            "latitude": 38.8977,
            "longitude": -77.0365,
            "label": "White House"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zinin/us-nws-point-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 = { "locations": [{
            "latitude": 38.8977,
            "longitude": -77.0365,
            "label": "White House",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("zinin/us-nws-point-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 '{
  "locations": [
    {
      "latitude": 38.8977,
      "longitude": -77.0365,
      "label": "White House"
    }
  ]
}' |
apify call zinin/us-nws-point-forecast --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zinin/us-nws-point-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/V8haQbopYhL10bJdb/builds/EPl9ED84gfLKBNVMh/openapi.json
