# NOAA Historical Weather Observations (`automation-lab/noaa-historical-weather-observations`) Actor

Export official NOAA/NCEI daily station observations by date range, including temperature, precipitation, snow, wind, humidity, pressure, and source provenance.

- **URL**: https://apify.com/automation-lab/noaa-historical-weather-observations.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.14 / 1,000 observation extracteds

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?

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

## NOAA Historical Weather Observations

Export **NOAA historical weather observations** from the official NOAA/NCEI Daily Summaries dataset. Give the Actor one or more station IDs and a bounded date range; it returns one normalized station-day row with temperature, precipitation, snow, wind, humidity, pressure, station identity, and source provenance.

The Actor uses NOAA's anonymous public Access Data Service. It needs no NOAA API token, account, browser, or proxy.

### What does this Actor do?

This Actor turns NOAA's source fields into integration-ready JSON. It:

- accepts up to 50 NOAA/NCEI station identifiers;
- exports up to 10 years and 10,000 station-day rows per run;
- chunks long ranges into reliable station-year requests;
- converts numeric source strings into numbers and blanks into `null`;
- preserves NOAA measurement and quality attributes when requested;
- retries transient network, HTTP 429, and HTTP 5xx failures;
- saves exact request URLs and retrieval timestamps for provenance.

It does not discover stations by city name. Resolve the station IDs you need before running it.

### Who is it for?

- **Climate analysts** refreshing reproducible station time series.
- **Agricultural researchers** comparing rain, snow, temperature, and humidity.
- **Risk and insurance teams** preparing source-attributed weather histories.
- **Data engineers** feeding official daily observations into warehouses.
- **Report creators** updating recurring city or regional climate tables.

### Why use it?

NOAA Daily Summaries expose many short source codes and optional values. This Actor provides a stable camelCase output, explicit metric units, station metadata, nullable fields, and source URLs. Multi-station batching, date chunking, output limits, retries, and Apify scheduling are handled for you.

Unlike forecast Actors, this product focuses on historical station observations. Unlike storm-event databases, it returns daily measurements rather than incident reports.

### What data can you extract?

| Group | Output fields |
| --- | --- |
| Identity | `stationId`, `stationName`, `date` |
| Location | `latitude`, `longitude`, `elevationMeters` |
| Temperature | average, maximum, minimum, dew point, and wet-bulb temperature in °C |
| Water and snow | precipitation, snowfall, and snow depth in mm |
| Wind | average speed, fastest 2-minute and 5-second speeds, and directions |
| Humidity | average, maximum, and minimum relative humidity percentages |
| Pressure | station and sea-level pressure in hPa |
| Provenance | NOAA dataset name, exact source URL, retrieval time, optional attributes |

A field is `null` when the selected station did not report that measure for that day. The Actor does not estimate missing measurements.

### How to get started

1. Open the Actor input page.
2. Enter one or more NOAA station IDs, for example `USW00094728`.
3. Set the inclusive start and end dates in `YYYY-MM-DD` format.
4. Choose an output limit and whether to keep NOAA attributes.
5. Click **Start**.
6. Open the default dataset to download JSON, CSV, Excel, XML, or another Apify-supported format.

The prefilled input exports one week from New York Central Park and is a good first run.

### Input parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `stationIds` | string array | Yes | 1–50 NOAA/NCEI station IDs. IDs are deduplicated and normalized to uppercase. |
| `startDate` | string | Yes | Inclusive first date in `YYYY-MM-DD` format. |
| `endDate` | string | Yes | Inclusive last date. The maximum range is 3,660 days. |
| `maxItems` | integer | No | Maximum saved station-day rows, from 1 to 10,000. Default: 1,000. |
| `includeAttributes` | boolean | No | Preserve NOAA `*_ATTRIBUTES` strings. Default: `true`. |

Example input:

```json
{
  "stationIds": ["USW00094728", "USW00024233"],
  "startDate": "2024-01-01",
  "endDate": "2024-01-07",
  "maxItems": 14,
  "includeAttributes": true
}
```

### Output example

This abbreviated record reflects the Actor's real NOAA/NCEI output shape:

```json
{
  "stationId": "USW00094728",
  "stationName": "NY CITY CENTRAL PARK, NY US",
  "date": "2024-01-01",
  "latitude": 40.77898,
  "longitude": -73.96925,
  "elevationMeters": 42.7,
  "temperatureAverageC": null,
  "temperatureMaxC": 8.3,
  "temperatureMinC": 1.7,
  "precipitationMm": 0.8,
  "snowfallMm": 0,
  "snowDepthMm": 0,
  "averageWindSpeedMetersPerSecond": 1.5,
  "relativeHumidityAveragePercent": 63,
  "stationPressureHpa": 1011.5,
  "seaLevelPressureHpa": 1016.6,
  "attributes": { "PRCP_ATTRIBUTES": ",,W,2400" },
  "sourceDataset": "NOAA/NCEI Daily Summaries",
  "sourceUrl": "https://www.ncei.noaa.gov/access/services/data/v1?dataset=daily-summaries&stations=USW00094728&startDate=2024-01-01&endDate=2024-01-07&format=json&units=metric",
  "retrievedAt": "2025-01-15T12:00:00.000Z"
}
```

### Understanding NOAA attributes

When `includeAttributes` is enabled, the `attributes` object contains NOAA's original comma-separated metadata strings, keyed by source field. These can encode measurement, quality, and source flags. The Actor preserves them without inventing interpretations. Consult the NOAA Daily Summaries documentation when a workflow depends on individual flag positions.

### How much does it cost to export NOAA weather observations?

Pricing uses a one-time **$0.00005 start event** plus one `observation` event per saved station-day row. You are never charged an observation event for malformed, duplicate, rejected, or absent rows.

At the BRONZE tier of **$0.00024 per observation**:

| Useful output | Observation events | Estimated total |
| ---: | ---: | ---: |
| 7 station-days | 7 | $0.00173 |
| 100 station-days | 100 | $0.02405 |
| 1,000 station-days | 1,000 | $0.24005 |

Higher account tiers receive lower per-observation prices. Your Apify Console shows the applicable tier and maximum charge before a run.

### Scheduling recurring climate refreshes

Create an Apify Schedule with fixed station IDs and a moving date window managed by your calling workflow. Store the stable `stationId` + `date` pair as the natural key in your warehouse. Because NOAA may revise quality-controlled values, use an upsert rather than append-only ingestion when refreshing recent dates.

A typical monthly workflow is:

1. run the Actor for the reporting stations and month;
2. export the default dataset through the API;
3. upsert by station and date;
4. retain `sourceUrl`, `retrievedAt`, and `attributes` for auditability;
5. alert downstream only after the Actor run succeeds.

### Limits and failure behavior

- Date ranges longer than 3,660 days are rejected before any source request.
- At most 50 station IDs and 10,000 output rows are accepted per run.
- The Actor requests metric units only.
- Station coverage and available fields differ by place and year.
- A valid station/date combination with no NOAA rows finishes successfully with an empty dataset.
- Invalid station syntax, invalid calendar dates, and reversed ranges fail the run.
- Deterministic NOAA 4xx responses fail immediately; transient failures receive up to three attempts.
- The Actor does not interpolate, aggregate, or correct official values.

For larger archives, divide work into station/year tasks so each run remains easy to retry and inspect.

### Export and integrations

The default dataset works with Apify's integrations and dataset API. Common patterns include:

- export CSV or Excel for research and reporting;
- send finished datasets to Google Drive or cloud storage;
- trigger a webhook when a scheduled refresh succeeds;
- load JSON into BigQuery, Snowflake, PostgreSQL, or a notebook;
- connect through Make, Zapier, or another Apify integration.

Always use `stationId` and `date` together when joining records.

### Use the Actor through the API

Replace `YOUR_APIFY_TOKEN` with your Apify API token.

#### cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~noaa-historical-weather-observations/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"stationIds":["USW00094728"],"startDate":"2024-01-01","endDate":"2024-01-07","maxItems":7}'
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/noaa-historical-weather-observations').call({
  stationIds: ['USW00094728'],
  startDate: '2024-01-01',
  endDate: '2024-01-07',
  maxItems: 7,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/noaa-historical-weather-observations').call(run_input={
    'stationIds': ['USW00094728'],
    'startDate': '2024-01-01',
    'endDate': '2024-01-07',
    'maxItems': 7,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Use with MCP and AI agents

Add this Actor to Claude Code through Apify MCP:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/noaa-historical-weather-observations"
```

#### Claude Desktop

Add the following remote MCP server configuration in Claude Desktop:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/noaa-historical-weather-observations"
    }
  }
}
```

#### Cursor

In Cursor, add the same `apify` server URL under **Settings → MCP → Add new MCP server**.

#### VS Code

In VS Code with MCP support, add the same remote HTTP URL to your workspace MCP server configuration and enable the `apify` server.

Example prompts:

- “Export Central Park NOAA daily weather for January 2024.”
- “Refresh January observations for stations USW00094728, USW00024233, and USW00094846.”
- “Return Seattle daily precipitation and temperature with NOAA attributes.”

Supply exact station IDs and dates in the tool input.

### Legality and responsible use

NOAA/NCEI publishes this government weather dataset for public access. Follow NOAA's terms, citation guidance, and applicable laws. Do not present an individual station as representative of a whole region without appropriate analysis. Keep the source fields when results support regulated, scientific, insurance, or safety decisions. This Actor is an independent automation tool and is not affiliated with or endorsed by NOAA.

### Troubleshooting

#### Why is my dataset empty?

Confirm that the station ID exists and reported Daily Summaries during the requested dates. Some stations have limited periods of record. Try a known date for that station before expanding the range.

#### Why are some fields null?

NOAA stations do not all report the same measures. `null` means the source omitted or did not provide a usable numeric value; it is not zero.

#### Why did the run fail with an HTTP 400 error?

The NOAA service rejected the station/date request. Recheck station syntax and dates. The Actor intentionally does not retry deterministic client errors.

#### How do I avoid duplicate rows?

The Actor deduplicates repeated station IDs in one input. Across runs, upsert downstream using the composite key `stationId` + `date`.

### FAQ

#### Does this Actor require a NOAA token?

No. It uses the anonymous NCEI Access Data Service rather than the token-gated Climate Data Online API.

#### Is the data worldwide?

Coverage follows NOAA/NCEI Daily Summaries. Many countries and station networks are represented, but availability differs by station and year.

#### Can I search by city or coordinates?

Not in this version. The Actor intentionally requires NOAA station IDs so selection is explicit and repeatable.

#### Does it return forecasts or alerts?

No. It exports historical daily station observations only.

#### Can I disable quality attributes?

Yes. Set `includeAttributes` to `false` for smaller rows while retaining source identity and retrieval provenance.

### Related automation-lab Actors

- [Open Meteo Scraper](https://apify.com/automation-lab/open-meteo-scraper) for location-based forecast and archive workflows.
- [NOAA Storm Events Database Scraper](https://apify.com/automation-lab/noaa-storm-events-database-scraper) for historical storm incidents, damage, injuries, and event narratives.

These products return different entities; choose them when the buyer job is not station-day observation export.

# Actor input Schema

## `stationIds` (type: `array`):

One to 50 NOAA/NCEI station identifiers, such as USW00094728 (New York Central Park).

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

First observation date to include, in YYYY-MM-DD format.

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

Last observation date to include, in YYYY-MM-DD format. The range can span up to 3,660 days.

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

Maximum station-day records saved across all stations.

## `includeAttributes` (type: `boolean`):

Include NOAA measurement, quality, and source attribute strings when available.

## Actor input object example

```json
{
  "stationIds": [
    "USW00094728"
  ],
  "startDate": "2024-01-01",
  "endDate": "2024-01-07",
  "maxItems": 20,
  "includeAttributes": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing normalized station-day weather records.

# 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 = {
    "stationIds": [
        "USW00094728"
    ],
    "startDate": "2024-01-01",
    "endDate": "2024-01-07",
    "maxItems": 20,
    "includeAttributes": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/noaa-historical-weather-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 = {
    "stationIds": ["USW00094728"],
    "startDate": "2024-01-01",
    "endDate": "2024-01-07",
    "maxItems": 20,
    "includeAttributes": True,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/noaa-historical-weather-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 '{
  "stationIds": [
    "USW00094728"
  ],
  "startDate": "2024-01-01",
  "endDate": "2024-01-07",
  "maxItems": 20,
  "includeAttributes": true
}' |
apify call automation-lab/noaa-historical-weather-observations --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/noaa-historical-weather-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/xcMAj1cSfdP9icy2p/builds/AaDdfZSBA99Zk9f4q/openapi.json
