# NOAA Climate Data Scraper (`wakey7dev/noaa-climate-data`) Actor

Fetch normalized daily weather observations from NOAA/NCEI. Station name resolution, unit conversion, and statistical summaries for 100,000+ global weather stations.

- **URL**: https://apify.com/wakey7dev/noaa-climate-data.md
- **Developed by:** [Chris Wakefield](https://apify.com/wakey7dev) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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

![Chris The Dev](https://raw.githubusercontent.com/chriswakefield87/appstore-screenshot-translator/main/assets/actor-banner.png)

## 🌦️ NOAA Climate Data Scraper

Fetch and normalize daily weather observations from NOAA's National Centers for Environmental Information (NCEI). Returns cleaned, human-readable climate data with unit conversion, station name resolution, and statistical summaries.

> **Value-add**: Raw NOAA API returns tenths-of-degrees and padded strings — this actor normalizes everything to real units (°F/°C, inches/mm, mph/m/s), resolves cryptic station IDs to city names, and provides both machine-readable and human-readable output.

### ✨ Features

- **No API key required** — NOAA's NCEI API is completely free and open
- **Global coverage** — 100,000+ weather stations worldwide (US + international via GHCND prefix)
- **Automatic normalization** — converts NOAA's raw format (tenths of degrees, space-padded strings) to clean numeric values
- **Station name resolution** — maps cryptic IDs like `USW00094728` to "NYC Central Park"
- **Unit conversion** — choose Standard (Fahrenheit, inches, mph) or Metric (Celsius, mm, m/s)
- **Rich data types** — temperature, precipitation, snowfall, wind speed/direction, weather type codes
- **Statistical summary** — min, max, avg temps; total precipitation and snowfall

### 📥 Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `stations` | Array | ✅ Yes | `["USW00094728"]` | NOAA station IDs (e.g. `USW00094728` for NYC). Use `GHCND:` prefix for global stations |
| `dataTypes` | Array | No | `["TMAX","TMIN","PRCP"]` | Data types to fetch |
| `startDate` | String | ✅ Yes | `"2024-01-01"` | Start date (YYYY-MM-DD) |
| `endDate` | String | ✅ Yes | `"2024-12-31"` | End date (YYYY-MM-DD) |
| `units` | Select | No | `"standard"` | `standard` (F/in/mph) or `metric` (C/mm/m/s) |
| `maxResults` | Integer | No | `5000` | Max daily records to return |
| `stationLookup` | Boolean | No | `true` | Resolve station IDs to city/state names |

#### Available Data Types

| Code | Description | Units (Standard / Metric) |
|------|-------------|--------------------------|
| `TMAX` | Maximum temperature | °F / °C |
| `TMIN` | Minimum temperature | °F / °C |
| `TAVG` | Average temperature | °F / °C |
| `PRCP` | Precipitation | inches / mm |
| `SNOW` | Snowfall | inches / mm |
| `SNWD` | Snow depth | inches / mm |
| `AWND` | Average wind speed | mph / m/s |
| `WSF2` | Fastest 2-minute wind | mph / m/s |
| `WDF2` | Direction of fastest wind | degrees / degrees |
| `WT01`–`WT22` | Weather type indicators | 0/1 flag |

#### Popular Station IDs

| Station ID | Location |
|-----------|----------|
| `USW00094728` | New York (Central Park) |
| `USW00094846` | Chicago (O'Hare) |
| `USW00023174` | Los Angeles (Downtown) |
| `USW00003928` | Miami (International) |
| `USW00023234` | San Francisco (Airport) |
| `USW00024233` | Seattle (Airport) |
| `USW00023062` | Denver (Airport) |
| `USW00012960` | Houston (Hobby) |
| `USW00014739` | Boston (Logan) |
| `USW00023188` | Phoenix (Sky Harbor) |

### 📤 Example Input

```json
{
  "stations": ["USW00094728", "USW00094846"],
  "dataTypes": ["TMAX", "TMIN", "PRCP", "SNOW"],
  "startDate": "2024-06-01",
  "endDate": "2024-06-07",
  "units": "standard",
  "maxResults": 100
}
```

### 📊 Example Output

The actor produces three output formats:

#### 1. Dataset (normalized JSON records)

```json
{
  "stationId": "USW00094728",
  "stationName": "NYC Central Park",
  "city": "New York",
  "state": "NY",
  "country": "US",
  "date": "2024-06-01",
  "units": "standard",
  "TMAX_value": 78.0,
  "TMAX_label": "Max Temp",
  "TMAX_unit": "°F",
  "TMIN_value": 62.0,
  "TMIN_label": "Min Temp",
  "TMIN_unit": "°F",
  "PRCP_value": 0.0,
  "PRCP_label": "Precipitation",
  "PRCP_unit": "in",
  "SNOW_value": 0.0,
  "SNOW_label": "Snowfall",
  "SNOW_unit": "in"
}
```

#### 2. OUTPUT (human-readable table)

```
====================================================================================================
  NOAA CLIMATE DATA — NORMALIZED WEATHER OBSERVATIONS
====================================================================================================
  Records: 14  |  Date Range: 2024-06-01 to 2024-06-07
  Units: standard  |  Stations: 2

Date         Station               TMAX    TMIN    PRCP    SNOW    AWND
────         ──────               ────    ────    ────    ────    ────
2024-06-01   NYC Central Park      78.0°   62.0°    0.00    0.0     N/A
2024-06-02   NYC Central Park      82.0°   65.0°    0.00    0.0     N/A
...
```

#### 3. STATS (machine-readable)

```json
{
  "total_records": 14,
  "stations_found": ["USW00094728", "USW00094846"],
  "data_types": ["TMAX", "TMIN", "PRCP", "SNOW"],
  "TMAX_min": 72.0,
  "TMAX_max": 85.0,
  "TMAX_avg": 78.5,
  "TMIN_min": 58.0,
  "TMIN_max": 68.0,
  "PRCP_total": 0.45
}
```

### 🎯 Use Cases

- **Agriculture & Farming** — Track growing degree days, frost risk, and precipitation for crop planning
- **Insurance Underwriting** — Analyze historical weather patterns for risk assessment
- **Energy Trading** — Correlate temperature data with energy demand forecasts
- **Event Planning** — Check historical weather for optimal outdoor event dates
- **Climate Research** — Gather long-term climate observations across multiple stations
- **Supply Chain / Logistics** — Monitor weather conditions along shipping routes
- **Construction** — Verify weather conditions for project delay claims

### 📚 Data Source

All data provided by NOAA's National Centers for Environmental Information (NCEI) via the Climate Data Online (CDO) API. Data is public domain and free to use.

- API: `https://www.ncei.noaa.gov/access/services/data/v1`
- Dataset: `daily-summaries` (GHCND — Global Historical Climatology Network Daily)
- Coverage: 100,000+ stations worldwide, records from 1763 to present

### 💰 Pricing

Pay-per-result pricing: **$2.00 per 1,000 results**. Each result is one normalized daily weather observation with station metadata.

This is a premium value-add actor — unlike raw NOAA scrapers, it normalizes cryptic station IDs to city names, converts NOAA's internal unit format to real-world units, and provides statistical summaries. Ideal for business analysts, researchers, and data pipelines.

# Actor input Schema

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

NOAA station IDs (e.g. USW00094728 for NYC Central Park). Separate multiple with commas. Use GHCND: prefix for global stations.

## `dataTypes` (type: `array`):

Data types to fetch. Available: TMAX, TMIN, TAVG, PRCP, SNOW, SNWD, AWND, WDF2, WSF2, WT01-WT22 (weather types). Defaults to TMAX,TMIN,PRCP.

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

Start date in YYYY-MM-DD format (e.g. 2024-01-01)

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

End date in YYYY-MM-DD format (e.g. 2024-12-31)

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

Output unit system. Standard=Fahrenheit/inches/mph, Metric=Celsius/mm/m/s

## `maxResults` (type: `integer`):

Maximum number of daily records to return (default: 5000)

## `stationLookup` (type: `boolean`):

Resolve station IDs to human-readable names, city, state, and country (adds extra API calls)

## Actor input object example

```json
{
  "stations": [
    "USW00094728"
  ],
  "dataTypes": [
    "TMAX",
    "TMIN",
    "PRCP"
  ],
  "startDate": "2024-01-01",
  "endDate": "2024-12-31",
  "units": "standard",
  "maxResults": 5000,
  "stationLookup": true
}
```

# Actor output Schema

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

Complete daily weather records in normalized format with station names, converted units, and metadata.

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

Human-readable ASCII table of weather observations.

## `stats` (type: `string`):

Machine-readable statistics: record count, station list, date range, data types fetched.

# 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": [
        "USW00094728"
    ],
    "dataTypes": [
        "TMAX",
        "TMIN",
        "PRCP"
    ],
    "startDate": "2024-01-01",
    "endDate": "2024-12-31"
};

// Run the Actor and wait for it to finish
const run = await client.actor("wakey7dev/noaa-climate-data").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": ["USW00094728"],
    "dataTypes": [
        "TMAX",
        "TMIN",
        "PRCP",
    ],
    "startDate": "2024-01-01",
    "endDate": "2024-12-31",
}

# Run the Actor and wait for it to finish
run = client.actor("wakey7dev/noaa-climate-data").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "USW00094728"
  ],
  "dataTypes": [
    "TMAX",
    "TMIN",
    "PRCP"
  ],
  "startDate": "2024-01-01",
  "endDate": "2024-12-31"
}' |
apify call wakey7dev/noaa-climate-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=wakey7dev/noaa-climate-data",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pGiuJy2dDKRxRhsaB/builds/D9re9EA2WeYVTcY1h/openapi.json
