# NWS Official Daily High & Low Temperature (CLI) (`revenue-agent-jw/nws-official-daily-high-low-temperature`) Actor

Official NWS daily high and low temperature for any US station, from the Daily Climate Report (CLI), plus the hourly-observation max/min and the difference between them. For insurance claims, weather derivatives, energy, research and AI agents.

- **URL**: https://apify.com/revenue-agent-jw/nws-official-daily-high-low-temperature.md
- **Developed by:** [Revenue Agent](https://apify.com/revenue-agent-jw) (community)
- **Categories:** Developer tools, AI, Integrations
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 station-day 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

## NWS Official Daily High & Low Temperature (CLI)

Get the **official National Weather Service daily high and low temperature** for any US station, straight from the **NWS Daily Climate Report (CLI)**. Each row also gives the **max/min from the station's routine hourly observations** and **the difference between the hourly figure and the official one**.

The two numbers often disagree, and the official one is what counts:

- **Climate days run midnight to midnight in local *standard* time.** During daylight saving time that is 1:00 AM to 1:00 AM on the clock, so "yesterday's high" from a weather app or a calendar-day query can cover the wrong 24 hours.
- **Hourly observations (METAR) miss peaks between readings.** The CLI uses higher-frequency data. On Oct 21, 2026, Central Park (KNYC) peaked at 61°F in the hourly obs, but the official CLI high was **62°F**. Chicago Midway (KMDW) went the other way: hourly 72°F, official **71°F**.

### Who uses it

- **Insurance and claims analysts.** Verify the official high/low for a date of loss (freeze, heat, frost claims) and keep the NWS product id as a citation.
- **Weather-derivative and temperature-contract traders.** Check the official settlement value, see in-progress provisional highs/lows, and map them to your own bucket grid (e.g. `gte62lt63`). This actor reads public NWS data only. It does not fetch or resell market prices and gives no trading advice.
- **Energy analysts.** Daily highs/lows for heating/cooling degree days and load reconciliation, on the official climate-day basis.
- **Researchers and data teams.** Build datasets that compare hourly-observation extremes with official values across stations.
- **AI agents and automations.** A clean JSON answer to "what was the official high at KXXX yesterday?" through the Apify API or Apify MCP server, with pay-per-result pricing and no subscription.

### What you get per station-day

| Field | Meaning |
|---|---|
| `station`, `stationName`, `timeZone` | NWS station (ICAO id such as `KNYC`) |
| `climateDate`, `window.startUTC`, `window.endUTC` | The exact official climate-day window |
| `status` | `in_progress` or `day_complete` |
| `officialCLI` | Official `maxF` / `minF` with times, `final` (true = the settled daily value), `issued`, `productId` and bucket labels |
| `provisionalHigh`, `provisionalLow` | Max/min from hourly station observations, with the raw value, time and bucket |
| `officialVsHourly` | `highDiff` / `lowDiff` (official minus hourly, °F) and `highMatches` / `lowMatches` |
| `bucketRule` | Your bucket width/offset or custom edges |

#### Sample output (trimmed)

```json
{
  "station": "KNYC",
  "stationName": "New York City, Central Park",
  "climateDate": "2026-10-21",
  "status": "day_complete",
  "provisionalHigh": { "value": 61, "raw": 61, "at": "2026-10-21T20:51:00+00:00", "bucket": { "label": "gte61lt62" } },
  "provisionalLow": { "value": 50, "raw": 50, "at": "2026-10-21T11:51:00+00:00", "bucket": { "label": "gte50lt51" } },
  "officialCLI": { "final": true, "issued": "2026-10-22T06:17:00+00:00", "maxF": 62, "maxTimeLST": "315 PM", "minF": 50, "minTimeLST": "743 AM", "productId": "ac336748-d9a0-43ab-ae63-639f19c3ebb6" },
  "officialVsHourly": { "highDiff": 1, "lowDiff": 0, "highMatches": false, "lowMatches": true }
}
```

### Input

```json
{ "stations": ["KNYC", "KMDW"], "daysBack": 1, "units": "F" }
```

- `stations`: ICAO ids, e.g. KNYC (Central Park), KMDW (Chicago Midway), KLAX, KMIA, KAUS, KDEN, KPHL. Up to 100 per run.
- `date` (YYYY-MM-DD) or `daysBack` (0–6): NWS keeps about 7 days of observations.
- `units`, `rounding`, `bucketWidth`, `bucketOffset`, `bucketEdges`: optional bucket labelling.
- `cliLocationOverrides`: rarely needed, e.g. `{"KNYC": "NYC"}`.

To monitor, run it every 15–60 minutes with Apify Schedules and use webhooks or integrations to send rows to Sheets, Slack or your database.

### Pricing

Pay per result: **$0.01 per successful station-day row**. No start fee. Rows that end in an error are free. You can cap spend per run with Apify's maximum-charge setting.

### Notes

- Data: US National Weather Service, api.weather.gov. It is a US Government work in the public domain. This actor is not an official NWS product.
- Only `officialCLI.final = true` is the settled daily value. Preliminary CLI and provisional numbers can still change.
- The CLI is usually issued shortly after midnight local standard time and is sometimes corrected later. Re-run to pick up corrections.
- The actor is polite to api.weather.gov: it sends an identifying User-Agent, makes sequential requests, and pauses between them.

# Actor input Schema

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

NWS observation station ids, e.g. KNYC (Central Park), KMDW (Chicago Midway), KLAX, KMIA, KAUS, KDEN, KPHL.

## `date` (type: `string`):

Leave empty for the current climate day in the station's local standard time. NWS keeps about 7 days of observations.

## `daysBack` (type: `integer`):

When date is empty, also return this many previous climate days per station.

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

Fahrenheit or Celsius.

## `rounding` (type: `string`):

nearest = round to a whole degree like the CLI; none = raw values.

## `bucketWidth` (type: `number`):

Width of temperature buckets used for the bucket label (ignored if bucket edges are given).

## `bucketOffset` (type: `number`):

Shift the bucket grid, e.g. width 2 with offset 1 gives 61-63, 63-65.

## `bucketEdges` (type: `array`):

Optional strictly increasing edges, e.g. \[70, 72, 74, 76].

## `cliLocationOverrides` (type: `object`):

Optional map of station to CLI location code, e.g. {"KNYC": "NYC"}.

## Actor input object example

```json
{
  "stations": [
    "KNYC",
    "KMDW"
  ],
  "daysBack": 0,
  "units": "F",
  "rounding": "nearest",
  "bucketWidth": 1,
  "bucketOffset": 0
}
```

# Actor output Schema

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

One row per station and climate day in the default dataset: official CLI high/low, hourly-observation max/min, difference, buckets, or an error row.

# 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": [
        "KNYC",
        "KMDW"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("revenue-agent-jw/nws-official-daily-high-low-temperature").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": [
        "KNYC",
        "KMDW",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("revenue-agent-jw/nws-official-daily-high-low-temperature").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": [
    "KNYC",
    "KMDW"
  ]
}' |
apify call revenue-agent-jw/nws-official-daily-high-low-temperature --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,revenue-agent-jw/nws-official-daily-high-low-temperature"
        }
    }
}
```

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/7JfTtxLd0cYNoRmd6/builds/RWbIcdlwjTNzshdFt/openapi.json
