# NWS Daily Climate Report (CLI) High/Low, Rain, Snow + GHCN (`jpopendata/weather-market-daily-climate`) Actor

Official NWS Daily Climate Report (CLI) values by station and day: high/low °F/°C with times, precipitation, snow, final vs preliminary (LST climate day), report issue time. Archive back to ~2002 via Iowa Environmental Mesonet; optional NOAA GHCN-Daily. Unofficial; not affiliated with NOAA/NWS.

- **URL**: https://apify.com/jpopendata/weather-market-daily-climate.md
- **Developed by:** [JP Open Data](https://apify.com/jpopendata) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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

## NWS Daily Climate Report (CLI) — Official Daily High/Low, Rain & Snow

**The official daily maximum and minimum temperature, precipitation, snowfall and snow depth from the National Weather Service Daily Climate Report (CLI), by station and climate day, with each row marked final or preliminary. Optional NOAA NCEI GHCN-Daily for quality-controlled values and decades of history.**

Weather contracts and many climate analyses use the NWS Daily Climate Report of a named station as their official daily value. This Actor returns those values as clean rows: one record per station, climate day and source, with °F and °C, the time of the high and low, the NWS issue time of the report, and the exact UTC window of the climate day.

- **639 NWS climate stations** (KNYC Central Park, KLGA, KJFK, KMDW, KORD, KLAX, KMIA, KAUS, KDEN, KPHL, PHNL, PANC, ...) from the Iowa Environmental Mesonet CLI archive, which reaches back to 2002 for many stations (KNYC from 2002-01-28).
- **Final vs preliminary, computed correctly**: the climate day runs midnight to midnight *local standard time* all year; a report issued after that window closed is `cli_final`, an intraday report ("valid today as of 5 PM") is `cli_preliminary`.
- **GHCN-Daily** (NOAA NCEI) for any U.S. WBAN or Cooperative station id such as `USW00094728`, or alongside the CLI rows of the same site with one switch.

> **Unofficial tool.** Not affiliated with or endorsed by NOAA, the National Weather Service, NCEI or Iowa State University. It reads only public, documented data services, with an identifying User-Agent and the request spacing their operators ask for.

### Quick start — verified input

Verified on the Apify platform on 2026-10-12 (UTC): one request, about 10 seconds. An empty input `{}` runs exactly this.

```json
{
  "stations": ["KNYC"],
  "daysBack": 7
}
```

The latest final value (and today's preliminary report, once issued) for several stations — about 2 requests:

```json
{
  "stations": ["KNYC", "KMDW", "KLAX", "KMIA", "KAUS", "KDEN", "KPHL"],
  "latestOnly": true
}
```

A month of CLI values next to GHCN-Daily for the same site:

```json
{
  "stations": ["KNYC"],
  "startDate": "2026-09-01",
  "endDate": "2026-09-30",
  "includeGhcnDaily": true
}
```

Ten years of GHCN-Daily history for Central Park (fast — the NCEI service is not rate-limited like the CLI archive):

```json
{
  "stations": ["USW00094728"],
  "startDate": "2016-01-01",
  "endDate": "2025-12-31"
}
```

#### Common input mistakes

| Wrong | Right | Why |
|---|---|---|
| `"stations": ["New York"]` | `"stations": ["KNYC", "KLGA", "KJFK"]` | Place names are rejected; the error lists matching stations. |
| `"stations": ["KTEB"]` | a CLI station, or the GHCN-Daily id | Not every airport issues a Daily Climate Report. |
| `"stations": ["TJSJ"]` | `"stations": ["TSJU"]` (accepted with a note) | San Juan's report is filed as TSJU. |
| `"startDate": "10/01/2026"` | `"startDate": "2026-10-01"` | Use YYYY-MM-DD (or "yesterday", "3 days ago"). |
| `"stations": ["US1NYNY0074"]` | `"stations": ["USW00094728"]` | Only WBAN (W) and Cooperative (C) GHCN-Daily stations are supported. |

An invalid value stops the run before any request, with a message that names the field and lists valid values. `"NYC"` or `"CLINYC"` are accepted as KNYC.

#### Empty results?

The run still succeeds with zero records (and nothing is charged for records) when there is simply no report: dates before a station's archive starts, a station that stopped reporting, today before the station's first intraday report, or GHCN-Daily days that are not published yet (GHCN-Daily usually lags 1-4 days). The log and `RUN_SUMMARY.warnings` name the stations without rows.

### What you get

One record per station, climate day and source. Every record has every column (null when it does not apply), so CSV exports keep stable columns.

| Field | Meaning |
|---|---|
| `stationId` | The id you asked for (KNYC, or USW00094728). |
| `cliStationId`, `ghcnId` | The NWS climate station id and the GHCN-Daily id of the same site, when known. |
| `stationName`, `state`, `wfo`, `timeZone`, `latitude`, `longitude` | Station metadata (`wfo` = the NWS office that issues the report). |
| `date` | The climate day (YYYY-MM-DD). |
| `sourceType` | `cli_final`, `cli_preliminary` or `ghcn_daily` (see below). |
| `climateDayStartUtc`, `climateDayEndUtc` | The UTC window of that climate day (CLI rows). |
| `maxTempF`, `maxTempC`, `maxTempTime` | Daily high, and its time in local standard time (CLI rows). |
| `minTempF`, `minTempC`, `minTempTime` | Daily low, and its time. |
| `precipIn`, `precipMm`, `precipTrace` | Precipitation; a trace is `0` with `precipTrace: true`. |
| `snowIn`, `snowCm`, `snowTrace`, `snowDepthIn`, `snowDepthCm` | Snowfall and snow depth. |
| `maxTempNormalF`, `minTempNormalF` | The 1991-2020 normals printed in the report (CLI rows). |
| `precipMonthToDateIn`, `snowMonthToDateIn` | Month-to-date totals printed in the report (CLI rows; a trace is 0). |
| `reportIssuedAt`, `reportId`, `reportUrl` | When the NWS issued the report these values come from, its product id, and a link to the full report text. |
| `ghcnAttributes`, `ghcnQcFlagged` | GHCN-Daily flags per element ("MFLAG,QFLAG,SFLAG,OBSTIME") and whether any value failed an NCEI quality check. |
| `source`, `sourceUrl`, `license`, `retrievedAt` | Attribution on every record. |

The dataset has three views: **Overview** (°F, inches), **Metric** (°C, mm, cm) and **Climate day and report** (UTC window, normals, issue time, report link).

#### Final vs preliminary — what the difference is

- The NWS office issues the Daily Climate Report for a completed day shortly after the climate day ends, normally in the early morning hours. That report is `cli_final`. The NWS can still issue a correction later; re-running picks up the newest report, and `reportIssuedAt` shows which one you got.
- Many offices also issue an intraday report during the day ("valid today as of 4 PM local time"). Its high and low are values *so far*; the day is not over. That report is `cli_preliminary`, and it is replaced by the final report the next morning.
- `cli_final` is decided by comparing the report's issue time with the end of the climate day at that station. Without a usable issue time a row is marked `cli_preliminary` (conservative).
- "Final" here means the complete-day NWS report. It is still *preliminary climate data* in NOAA's sense: the quality-controlled archive is NCEI's GHCN-Daily (`ghcn_daily`), published days later, which may occasionally differ from the CLI value.

#### The climate day is in local standard time

The NWS climate day runs from midnight to midnight **local standard time**, all year. During daylight saving time that is 1:00 AM to 12:59 AM by the clock. For New York in July, the climate day of July 4 runs from 05:00 UTC on July 4 to 05:00 UTC on July 5, exactly as in January. `climateDayStartUtc` and `climateDayEndUtc` show the window for every CLI row, and `maxTempTime` / `minTempTime` are printed in local standard time.

### Speed and request planning

The Iowa Environmental Mesonet asks crawlers to wait 120 seconds between requests (robots.txt Crawl-delay). This Actor honours that for every request to it, so each CLI request takes about 2 minutes. One request covers either one station for a whole calendar year, or one date for every station; the Actor picks whichever needs fewer requests and logs the plan before it starts:

- 1 station, last 7 days: 1 request (seconds).
- 7 stations, `latestOnly`: about 2 requests.
- 2 stations, a full year: 2 requests.
- 1 station, 2010-2025 from the CLI archive: 16 requests (about 30 minutes). For long histories, GHCN-Daily ids are much faster.

NCEI GHCN-Daily requests are sent at least 1.2 seconds apart.

### Reliability

- **Limits respected.** Requests are sent one at a time; a server-requested wait (Retry-After) is honoured; an unavailable NOAA service is retried no sooner than a minute later; there is a hard request budget (`maxApiRequests`).
- **Partial success.** If one source fails, the budget runs out, or the run's time limit is near, the records already stored are kept and the run ends successfully with `complete: false` and the reason in `RUN_SUMMARY.stopReasons`. If nothing can be read at all, the run fails visibly.
- **Run summary.** `RUN_SUMMARY` (key-value store) lists, per station, the window, the number of final / preliminary rows and the newest final date.

### Honest limits

- The CLI values are those archived by the Iowa Environmental Mesonet, which collects NWS text products in real time. A report the archive missed is missing here too; for a few stations a day can stay on its intraday report (shown as `cli_preliminary`).
- `includeGhcnDaily` pairs a CLI station with GHCN-Daily only when the same airport/first-order site has a WBAN record (for example KNYC = USW00094728); a nearby Cooperative station is never substituted.
- Weather contracts name their own station and report; check the rules of your contract for the exact station and the report that counts.
- This Actor does not forecast and does not read market prices.

### Data sources and licence

- **NWS Daily Climate Reports** are U.S. Government works (NOAA / National Weather Service), in the public domain. Values are passed through as published; the °C, mm and cm values and `sourceType` are derived by this Actor and are not official government material.
- **Iowa Environmental Mesonet** (Iowa State University): "The materials found on this website are in the public domain and may be used freely by anyone for any lawful purpose." Data courtesy of the Iowa Environmental Mesonet of Iowa State University.
- **GHCN-Daily** (NOAA NCEI). Cite as: Menne, M.J., I. Durre, B. Korzeniewski, S. McNeill, K. Thomas, X. Yin, S. Anthony, R. Ray, R.S. Vose, B.E. Gleason, and T.G. Houston (2012): Global Historical Climatology Network - Daily (GHCN-Daily), Version 3. NOAA National Climatic Data Center. doi:10.7289/V5D21VHZ.
- This dataset consists predominantly of U.S. Government material, which is not subject to copyright protection in the United States.

**Your responsibility.** You are responsible for how you use the data and for complying with the terms of the sources and of any contract or market you use it for. The output contains weather measurements and station metadata only — no personal data, so GDPR obligations for personal data do not arise from the records themselves. Cooperative-station coordinates are rounded to about 1 km.

### Pricing

Pay per record stored in the dataset. A run stops by itself when it reaches the maximum charge you set.

# Actor input Schema

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

One code per line. NWS climate station codes (the ICAO code of most airports): KNYC (New York Central Park), KLGA, KJFK, KMDW (Chicago Midway), KORD, KLAX, KMIA, KAUS, KDEN, KPHL, PHNL, PANC ... (639 stations). Case and commas do not matter; "NYC" or "CLINYC" becomes KNYC. GHCN-Daily ids such as USW00094728 (U.S. WBAN or Cooperative stations) return NOAA NCEI GHCN-Daily rows. City names are not accepted. Up to 1000 per run.

## `startDate` (type: `string`):

Optional first climate day, YYYY-MM-DD (e.g. 2026-09-01), or "yesterday" / "N days ago". Leave empty to use Days back.

## `endDate` (type: `string`):

Optional last climate day, YYYY-MM-DD, "today" or "yesterday". Empty = today (each station's local standard date).

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

Number of complete climate days before the end date to include (0..3660). The end date itself is always included, so 7 returns up to 8 days: the last 7 complete days plus today's preliminary report if one has been issued.

## `latestOnly` (type: `boolean`):

Per station, keep only the newest final CLI day, plus a newer preliminary (same-day) report if one exists, and the newest GHCN-Daily day. Many stations at once cost about 2 requests.

## `includeGhcnDaily` (type: `boolean`):

Also return NOAA NCEI GHCN-Daily rows (quality-controlled archive, usually 1-4 days behind) for each CLI station that has a GHCN-Daily record of the same site (e.g. KNYC = USW00094728), to compare with the CLI values.

## `maxItems` (type: `integer`):

Maximum records stored (1..200000). One record = one station, one day, one source. You are charged per record.

## `maxApiRequests` (type: `integer`):

Hard budget of upstream requests for the run (1..2000). The Iowa Environmental Mesonet asks for 120 s between requests, so each CLI request (one station-year, or one date for every station) takes about 2 minutes; GHCN-Daily requests are fast (at least 1.2 s apart).

## `proxyConfiguration` (type: `object`):

Optional and normally not needed: both services answer Apify datacenter IPs. If set, one sticky session is used for the whole run (never rotation).

## Actor input object example

```json
{
  "stations": [
    "KNYC"
  ],
  "startDate": "",
  "endDate": "",
  "daysBack": 7,
  "latestOnly": false,
  "includeGhcnDaily": false,
  "maxItems": 5000,
  "maxApiRequests": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `records` (type: `string`):

One record per station, climate day and source (cli_final, cli_preliminary, ghcn_daily), with source attribution (source, sourceUrl, license, retrievedAt) on every item.

# 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"
    ],
    "startDate": "",
    "endDate": "",
    "daysBack": 7,
    "latestOnly": false,
    "includeGhcnDaily": false,
    "maxItems": 5000,
    "maxApiRequests": 50,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("jpopendata/weather-market-daily-climate").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"],
    "startDate": "",
    "endDate": "",
    "daysBack": 7,
    "latestOnly": False,
    "includeGhcnDaily": False,
    "maxItems": 5000,
    "maxApiRequests": 50,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("jpopendata/weather-market-daily-climate").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"
  ],
  "startDate": "",
  "endDate": "",
  "daysBack": 7,
  "latestOnly": false,
  "includeGhcnDaily": false,
  "maxItems": 5000,
  "maxApiRequests": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call jpopendata/weather-market-daily-climate --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jpopendata/weather-market-daily-climate"
        }
    }
}
```

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/CzKMPVl1KBPtOEeoO/builds/P8Dz7vsjt0RPTRT3W/openapi.json
