# NOAA NCEI Daily Climate Scraper — Station Weather History (`compute-edge/noaa-ncei-climate-scraper`) Actor

Pull NOAA NCEI daily-summary climate observations (max/min temperature, precipitation, snowfall, snow depth) by GHCN station ID and date range. Returns clean rows with values converted from NCEI tenths.

- **URL**: https://apify.com/compute-edge/noaa-ncei-climate-scraper.md
- **Developed by:** [Compute Edge](https://apify.com/compute-edge) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 NCEI Daily Climate Scraper — Station Weather History

Pull **daily-summary climate observations** from the NOAA National Centers for Environmental Information (NCEI) for any GHCN-Daily station, in any date window, with values automatically converted out of NCEI's raw "tenths" encoding into clean metric (°C, mm) or imperial (°F, in) units.

GHCN-Daily is the world's largest archive of station weather observations — thousands of U.S. and international stations, decades of history, with daily max/min temperature, precipitation, snowfall, snow depth, wind, and dozens of other variables. The NCEI access API exposes it as JSON. This actor wraps that API, normalizes the data, and ships it as one row per station/date.

### What you get

| Field | Description |
|-------|-------------|
| `date` | Observation date (YYYY-MM-DD) |
| `station` | GHCN station ID |
| `tmax` | Maximum daily temperature (°C metric / °F imperial) |
| `tmin` | Minimum daily temperature |
| `tavg` | Average daily temperature (when reported) |
| `prcp` | Precipitation (mm metric / inches imperial) |
| `snow` | Snowfall (mm metric / inches imperial) |
| `snwd` | Snow depth at observation time |
| `awnd` | Average daily wind (m/s metric / mph imperial) when requested |
| `units` | `metric`, `imperial`, or `raw` |

Any other GHCN variable you request (`TOBS`, `WSF2`, `WT01`, `MDPR`, etc.) is included as a lower-case key on the row.

### How to scrape NOAA daily climate data

1. Click **Try for free** to start a default run for three U.S. cities (NYC Central Park, Chicago O'Hare, Phoenix Sky Harbor) over the last 30 days.
2. Edit the `stations` array to point at your stations of interest. Find IDs at https://www.ncei.noaa.gov/access/search/data-search/daily-summaries.
3. Set `startDate` / `endDate` (YYYY-MM-DD) for any historical window — NCEI has data back into the 1800s for some stations.
4. Toggle `units` between `metric` (default), `imperial`, or `raw` if you want the original NCEI tenths.

### Pricing

$0.003 per row. A single station × 365 days returns roughly 365 rows ≈ $1.10 plus minimal compute. Multi-decade backfills cost more — set `maxResults` if you want to cap a run.

### Example input

```json
{
    "stations": ["USW00094728"],
    "startDate": "2024-01-01",
    "endDate": "2024-12-31",
    "dataTypes": ["TMAX", "TMIN", "PRCP", "SNOW", "SNWD"],
    "units": "imperial"
}
````

### Example output

```json
{
    "date": "2024-01-15",
    "station": "USW00094728",
    "tmax": 25,
    "tmin": 12,
    "prcp": 0.12,
    "snow": 0.5,
    "snwd": 1,
    "units": "imperial",
    "sourceUrl": "https://www.ncei.noaa.gov/access/services/data/v1?dataset=daily-summaries&stations=USW00094728&startDate=2024-01-01&endDate=2024-12-31&dataTypes=TMAX,TMIN,PRCP,SNOW,SNWD&format=json&units=standard"
}
```

### Use cases

- **Climate / energy analytics** — Heating-degree-day (HDD) and cooling-degree-day (CDD) computation.
- **Insurance / cat modeling** — Look up historical conditions on a claim date.
- **Agriculture** — Multi-year precipitation and frost-day analysis.
- **Real estate / property risk** — Quantify a property's historical extreme-weather exposure.
- **Outdoor sports / events** — Seasonal weather profiles for venue planning.

### Other actors you might like

- `usgs-water-services-scraper` — Real-time stream gauge & groundwater data.
- `usgs-earthquake-scraper` — Live USGS earthquake feed.
- `usgs-volcano-monitor-scraper` — USGS volcano alert levels.
- `fema-disasters-scraper` — FEMA disaster declarations.

### FAQ

**Q: Where do I find station IDs?**
A: NCEI's station finder at https://www.ncei.noaa.gov/access/search/data-search/daily-summaries lets you search by name, city, or coordinates and copy the `USW00094728`-style ID.

**Q: Why are some values missing?**
A: Stations only report variables they instrument — not every station has snow depth or wind speed. Missing values are simply omitted from the row.

**Q: Why are temperatures sometimes negative integers (e.g. `-89`)?**
A: That's the raw NCEI "tenths of degrees Celsius" encoding (so `-89` = -8.9°C). The actor converts these for you when `units` is `metric` or `imperial`. Set `units: "raw"` to opt out.

**Q: How far back can I go?**
A: GHCN-Daily has records into the 1800s for the longest-running stations. The API will return whatever is available within the requested window.

### Legal

Data is sourced from the public NOAA NCEI access API (`ncei.noaa.gov/access/services/data/v1`). This actor is not affiliated with or endorsed by NOAA. Use is subject to NOAA's open-data terms.

# Actor input Schema

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

GHCN-Daily station IDs (e.g. 'USW00094728' = NYC Central Park). Defaults to a small sample so empty input always returns data. Find more station IDs at https://www.ncei.noaa.gov/access/search/data-search/daily-summaries.

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

Start date (YYYY-MM-DD). Defaults to 30 days ago when blank.

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

End date (YYYY-MM-DD). Defaults to today when blank.

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

GHCN-Daily variables to request. Common: TMAX (max temp), TMIN (min temp), TAVG, PRCP (precipitation), SNOW (snowfall), SNWD (snow depth), AWND (avg wind).

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

Convert from NCEI tenths to either 'metric' (°C, mm) or 'imperial' (°F, in). Default 'metric'.

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

Maximum number of daily-summary rows to return. Set to 0 for unlimited.

## Actor input object example

```json
{
  "stations": [
    "USW00094728",
    "USW00023174",
    "USW00012842"
  ],
  "startDate": "",
  "endDate": "",
  "dataTypes": [
    "TMAX",
    "TMIN",
    "PRCP",
    "SNOW",
    "SNWD"
  ],
  "units": "metric",
  "maxResults": 0
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("compute-edge/noaa-ncei-climate-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("compute-edge/noaa-ncei-climate-scraper").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 '{}' |
apify call compute-edge/noaa-ncei-climate-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NOAA NCEI Daily Climate Scraper — Station Weather History",
        "description": "Pull NOAA NCEI daily-summary climate observations (max/min temperature, precipitation, snowfall, snow depth) by GHCN station ID and date range. Returns clean rows with values converted from NCEI tenths.",
        "version": "0.1",
        "x-build-id": "D1UVFfa1Zc7jfBAO8"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/compute-edge~noaa-ncei-climate-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-compute-edge-noaa-ncei-climate-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/compute-edge~noaa-ncei-climate-scraper/runs": {
            "post": {
                "operationId": "runs-sync-compute-edge-noaa-ncei-climate-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/compute-edge~noaa-ncei-climate-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-compute-edge-noaa-ncei-climate-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "stations": {
                        "title": "GHCN Station IDs",
                        "type": "array",
                        "description": "GHCN-Daily station IDs (e.g. 'USW00094728' = NYC Central Park). Defaults to a small sample so empty input always returns data. Find more station IDs at https://www.ncei.noaa.gov/access/search/data-search/daily-summaries.",
                        "default": [
                            "USW00094728",
                            "USW00023174",
                            "USW00012842"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "startDate": {
                        "title": "Start Date",
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD). Defaults to 30 days ago when blank.",
                        "default": ""
                    },
                    "endDate": {
                        "title": "End Date",
                        "type": "string",
                        "description": "End date (YYYY-MM-DD). Defaults to today when blank.",
                        "default": ""
                    },
                    "dataTypes": {
                        "title": "Variables",
                        "type": "array",
                        "description": "GHCN-Daily variables to request. Common: TMAX (max temp), TMIN (min temp), TAVG, PRCP (precipitation), SNOW (snowfall), SNWD (snow depth), AWND (avg wind).",
                        "default": [
                            "TMAX",
                            "TMIN",
                            "PRCP",
                            "SNOW",
                            "SNWD"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "units": {
                        "title": "Output Units",
                        "enum": [
                            "metric",
                            "imperial",
                            "raw"
                        ],
                        "type": "string",
                        "description": "Convert from NCEI tenths to either 'metric' (°C, mm) or 'imperial' (°F, in). Default 'metric'.",
                        "default": "metric"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 0,
                        "maximum": 200000,
                        "type": "integer",
                        "description": "Maximum number of daily-summary rows to return. Set to 0 for unlimited.",
                        "default": 0
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
