# NWS Weather Observations: US Station Data (API) (`ucchiii/nws-climate-observations`) Actor

NWS Weather Observations: recent observations from US National Weather Service stations (input: station ids such as KJFK). One row per observation: temperature, dew point, humidity, wind, pressure, visibility, precipitation, raw METAR. Metric or imperial. Empty input = free demo. $0.67 per 1,000.

- **URL**: https://apify.com/ucchiii/nws-climate-observations.md
- **Developed by:** [Actor Factory](https://apify.com/ucchiii) (community)
- **Categories:** Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.47 / 1,000 observations

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

## NWS Weather Observations: US station data from api.weather.gov

**For analysts, logistics and energy teams, prediction-market researchers and developers who need real measured weather (not forecasts) from US National Weather Service stations.**
Give it station ids such as `KJFK` and get **one clean row per observation**: temperature, dew point, humidity, wind, pressure, visibility, precipitation and the raw METAR. No key, no scraping. **$0.67 per 1,000 observations**, you pay only for observations returned.

Typical problems this solves:

- Checking what a station actually measured (for example the day's high at KJFK) when a market, contract or report depends on it.

- Joining weather to delivery, flight-delay, energy-demand or sales data by hour and location.

- Replacing a hand-written script around `api.weather.gov` that breaks on missing values, unit codes and rate limits.

- **Official public API**: reads `api.weather.gov/stations/<id>/observations`, the National Weather Service's own feed. No login, no proxies.

- **Flat, typed rows**: values arrive with units already converted (metric or imperial, your choice) and `null` where a sensor reported nothing.

- **Station details included**: name, latitude, longitude, elevation and time zone on every row.

- **Polite, fixed limits**: one request at a time with a 1 second pause, at most 50 stations per run, retries with backoff on 429 and 5xx (Retry-After is honoured), and an identifying User-Agent as the NWS asks. These limits cannot be changed from the input.

- **Free demo**: leave the input empty and the Actor returns a few recent KJFK observations without charging.

### Input

```json
{
  "stations": ["KJFK", "KORD", "https://api.weather.gov/stations/KSFO"],
  "hoursBack": 24,
  "maxObservationsPerStation": 100,
  "units": "metric"
}
```

- `stations`: one per line, up to 50 per run. ICAO-style ids (`KJFK`) or `api.weather.gov/stations/<id>` URLs.
- `hoursBack`: 1 to 168 (the NWS keeps about 7 days). Default 24.
- `maxObservationsPerStation`: 1 to 500, newest first. Default 100.
- `units`: `metric` (C, km/h, hPa, km, mm) or `imperial` (F, mph, inHg, miles, inches).

### Output (one item per observation)

```json
{
  "station": "KJFK", "stationName": "New York/John F. Kennedy International Airport",
  "latitude": 40.6392, "longitude": -73.7639, "elevationM": 3, "timeZone": "America/New_York",
  "timestamp": "2026-10-26T14:51:00+00:00", "textDescription": "Mostly Cloudy",
  "temperature": 14.4, "dewpoint": 8.3, "relativeHumidity": 66,
  "windDirectionDeg": 250, "windSpeed": 22.2, "windGust": 38.9,
  "barometricPressure": 1016.4, "seaLevelPressure": 1016.7, "visibility": 16.1,
  "precipitationLastHour": null, "heatIndex": null, "windChill": null,
  "cloudLayers": ["BKN at 4,500 ft"], "presentWeather": [],
  "units": "metric", "rawMessage": "KJFK 261451Z 25012G21KT 10SM BKN045 14/08 A3002 …",
  "url": "https://api.weather.gov/stations/KJFK/observations/2026-10-26T14:51:00+00:00"
}
```

- Values the station did not report are `null` (precipitation, heat index and wind chill are often empty).
- `timestamp` is the observation time in UTC. Stations usually report hourly; some add special reports between hours.
- `units` on each row says which unit system was used.
- A per-station summary (ok, not found, error, observations returned) is saved to the key-value store as `SUMMARY`.

### Pricing

Pay per event: **$0.00067 per observation returned** ($0.67 per 1,000). The empty-input demo is free. Set a max charge per run in the run options to cap spend.

### Notes

- Data comes only from the public National Weather Service API. These are observations from the past 7 days, not forecasts or long-term climate history.
- A station id that does not exist is reported as `not_found` in `SUMMARY` and is not charged. If the NWS is temporarily unavailable the station is reported as `error` and not charged.
- Stations beyond the 50 per run limit are listed as `skipped_limit` in `SUMMARY`; run again with the rest.
- Not affiliated with the National Weather Service or NOAA.
- NWS observations are US government data in the public domain (not subject to copyright). The values are passed through as reported; this Actor is not official government material.

### More tools from the same developer

- [CSV to Excel Converter](https://apify.com/ucchiii/csv-xlsx-converter) — convert CSV, TSV, Excel XLSX, JSON and NDJSON files or Apify datasets into each other
- [Google Sheets Export](https://apify.com/ucchiii/google-sheets-export) — export an Apify dataset to Google Sheets
- [Dataset Change Detector](https://apify.com/ucchiii/dataset-change-detector) — compare two runs of any scraper: only added, removed and changed items
- [RSS Feed Reader & Aggregator](https://apify.com/ucchiii/rss-feed-reader) — many RSS / Atom feeds merged into one clean article list

# Actor input Schema

## `stations` (type: `array`):

One per line, up to 50 per run. NWS station ids (ICAO-style, e.g. KJFK for New York JFK, KSFO, KORD) or station URLs (https://api.weather.gov/stations/KJFK). Leave empty to run a free demo (not charged).

## `hoursBack` (type: `integer`):

How far back to fetch observations, from 1 to 168 hours (the NWS keeps about 7 days).

## `maxObservationsPerStation` (type: `integer`):

Cap the number of observations returned per station (newest first). Between 1 and 500.

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

Units for temperature, wind, pressure, visibility and precipitation. Each row records which one was used in its units field.

## Actor input object example

```json
{
  "stations": [
    "KJFK",
    "KORD"
  ],
  "hoursBack": 24,
  "maxObservationsPerStation": 100,
  "units": "metric"
}
```

# Actor output Schema

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

One item per observation: station id and name, coordinates, timestamp, temperature, dew point, relative humidity, wind direction / speed / gust, pressure, visibility, precipitation, heat index, wind chill, sky condition and the raw METAR message.

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

Record SUMMARY: per-station results (ok, not_found, error, duplicate, skipped_limit).

# 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 = {
    "stations": [
        "KJFK",
        "KORD"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ucchiii/nws-climate-observations").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 = { "stations": [
        "KJFK",
        "KORD",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ucchiii/nws-climate-observations").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 '{
  "stations": [
    "KJFK",
    "KORD"
  ]
}' |
apify call ucchiii/nws-climate-observations --silent --output-dataset

```

## MCP server setup

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

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/eNNhnTXNeo5dFmXOS/builds/6TlJenfgT7TTu353R/openapi.json
