# Weather Data for Prediction Markets (Kalshi & Polymarket) (`yawning_manuscript/weather-data-prediction-markets`) Actor

Official NWS daily climate settlement values, hourly observations and 6-model forecasts with the spread between models, for the stations Kalshi and Polymarket temperature markets settle on.

- **URL**: https://apify.com/yawning\_manuscript/weather-data-prediction-markets.md
- **Developed by:** [SignalData](https://apify.com/yawning_manuscript) (community)
- **Categories:**
- **Stats:** 1 total users, 0 monthly users, 0.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/actors/running/actors-in-store.md#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

## Weather Data for Prediction Markets — Kalshi & Polymarket Temperature Markets

Get the **official settlement numbers**, live observations and **6-model forecasts with the disagreement between models**, for the weather stations that Kalshi and Polymarket temperature markets resolve on. One actor, one schema, no API keys.

If you trade "Highest temperature in NYC today" or any daily high/low market, the three questions you need answered every morning are:

1. What number will this actually settle on, and what did it do on this date historically?
2. What do the models say right now?
3. Where do the models disagree — because that is where the price is wrong.

This actor answers all three in a single run.

### Why this one and not a generic weather scraper

Generic weather actors give you an app forecast. Markets do not settle on an app forecast. US temperature markets settle on the **NWS Daily Climate Report (CLI product)** for a specific station — Central Park for New York, not "New York City" in general. This actor pulls that exact product, including the *time* the high was reached, the normal, and the record for that calendar day.

It also returns a **consensus row per day** carrying `tmax_spread` — how far apart the models are. A 1°F spread and an 8°F spread are two completely different trades on the same market.

### What you get

Three record types, each billed separately so you only pay for what you ask for.

#### `climate_day` — the settlement value

```json
{
  "type": "climate_day",
  "station": "KNYC",
  "station_name": "NEW YORK CITY",
  "date": "2026-01-01",
  "high_f": 36,
  "high_time": "555 AM",
  "high_normal_f": 41,
  "high_record_f": 62,
  "low_f": 22,
  "low_time": "1012 PM",
  "precip_in": 0.02,
  "snow_in": 0.5,
  "max_gust_mph": 39,
  "avg_sky_cover": 0.4,
  "source": "NWS Daily Climate Report (CLI) via IEM",
  "source_url": "https://mesonet.agron.iastate.edu/api/1/nwstext/202601021606-KOKX-CDUS41-CLINYC"
}
```

Note `high_time`: the high came at 5:55 AM, not in the afternoon. That detail decides intraday markets and no consumer weather API gives it to you.

#### `forecast_day` — every model, plus the spread

```json
{ "type": "forecast_day", "location": "New York City, NY (Central Park)", "date": "2026-09-08",
  "model": "ecmwf_ifs025", "tmax": 79.2, "tmin": 64.1, "temp_unit": "F", "precip_prob_max_pct": 15 }
```

```json
{ "type": "forecast_day", "date": "2026-09-08", "model": "consensus_mean",
  "tmax": 78.1, "tmin": 63.4, "models_count": 4, "tmax_spread": 3.6 }
```

Models available: **GFS** (USA), **ECMWF IFS** (Europe), **ICON** (Germany), **GEM** (Canada), **JMA** (Japan), and a blended best-match.

#### `observation` — intraday

Hourly / METAR observations with temperature, dewpoint, wind, gusts, precipitation and the raw METAR string, so you can see how close today's high already is before the market closes.

### Stations covered for settlement data

KNYC (New York, Central Park), KLAX (Los Angeles), KORD (Chicago O'Hare), KAUS (Austin, Camp Mabry), KMIA (Miami), KDEN (Denver), KPHL (Philadelphia), KHOU (Houston Hobby), KSEA (Seattle), KBOS (Boston), KDCA (Washington DC National), KATL (Atlanta), KDFW (Dallas-Fort Worth), KPHX (Phoenix), KLAS (Las Vegas), KMSP (Minneapolis), KDTW (Detroit), KSFO (San Francisco).

Any other US station ID works too. For forecasts, **any city on earth** works — pass it in `cities` and it is geocoded automatically.

### Example input

Morning routine for the three biggest temperature markets:

```json
{
  "stations": ["KNYC", "KLAX", "KORD"],
  "includeClimate": true,
  "includeForecast": true,
  "historyDays": 30,
  "forecastDays": 7,
  "models": ["gfs_seamless", "ecmwf_ifs025", "icon_seamless", "best_match"],
  "temperatureUnit": "fahrenheit"
}
```

Backtesting a strategy over five years on one station:

```json
{ "stations": ["KNYC"], "includeClimate": true, "includeForecast": false,
  "startDate": "2021-01-01", "endDate": "2026-01-01" }
```

Worldwide forecasts, no US settlement data:

```json
{ "stations": [], "cities": ["London", "Tokyo", "Sydney"], "includeClimate": false, "forecastDays": 10 }
```

### Pricing

Pay per result. No monthly fee, no minimum.

| Record | Price |
|---|---|
| `climate_day` (settlement value) | $0.002 |
| `forecast_day` (per model per day) | $0.001 |
| `observation` (hourly) | $0.001 |

A daily run over three stations with 30 days of history and a 7-day, 4-model forecast costs roughly **$0.28**.

### Use it from an AI agent

The actor is callable through Apify's MCP server, so an agent can fetch settlement data and forecasts on its own. Ask for `weather-prediction-markets` with a station list and the record types you want.

### Data sources

- **NWS Daily Climate Report (CLI)** via Iowa Environmental Mesonet — the official product US temperature markets settle on.
- **api.weather.gov** — hourly and METAR observations.
- **Open-Meteo** — multi-model global forecasts.

All are public government or open data sources. No login, no scraping of a protected site, no rate-limit games.

### Notes and limits

- Daily climate reports are published by the local forecast office a few hours after midnight local time, so today's value appears the next morning. For today's number in progress, use `includeObservations`.
- `precip_in` and `snow_in` return `0.0` with `precip_trace: true` / `snow_trace: true` when the report says trace, so you can tell a trace from a real zero.
- Observations from api.weather.gov cover roughly the last 7 days.
- If a run hits your cost limit, the actor stops pushing rows and logs how many it skipped rather than failing.

### Support

Open an issue on the actor page. Requests for extra stations, extra models or a different output shape are welcome — this actor is actively maintained.

# Actor input Schema

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

NWS station IDs that temperature markets settle on. KNYC = New York (Central Park), KLAX = Los Angeles, KORD = Chicago, KAUS = Austin, KMIA = Miami, KDEN = Denver, KPHL = Philadelphia. Leave empty and set Cities instead for anywhere else in the world.

## `cities` (type: `array`):

Any city name, e.g. "London", "Tokyo", "Sao Paulo". Geocoded automatically. Produces forecast rows only - daily climate reports exist for US stations.

## `includeClimate` (type: `boolean`):

The official NWS Daily Climate Report: high, low, time of high/low, normals, records, precipitation, snow, wind. This is the number US temperature markets settle on.

## `includeForecast` (type: `boolean`):

Daily high/low and precipitation from up to 6 global models, plus a consensus row carrying the spread between models.

## `includeObservations` (type: `boolean`):

Hourly/METAR observations for intraday tracking of how close today's high already is. Last 7 days only.

## `historyDays` (type: `integer`):

How many days back to pull daily climate reports, counting back from the end date.

## `forecastDays` (type: `integer`):

How far ahead to forecast, up to 16 days.

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

YYYY-MM-DD. Overrides Days of history when set.

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

YYYY-MM-DD. Defaults to today.

## `models` (type: `array`):

Which global models to pull. Fewer models means fewer billed rows.

## `temperatureUnit` (type: `string`):

Fahrenheit matches how US markets are quoted.

## Actor input object example

```json
{
  "stations": [
    "KNYC",
    "KLAX",
    "KORD"
  ],
  "cities": [],
  "includeClimate": true,
  "includeForecast": true,
  "includeObservations": false,
  "historyDays": 30,
  "forecastDays": 7,
  "models": [
    "gfs_seamless",
    "ecmwf_ifs025",
    "icon_seamless",
    "best_match"
  ],
  "temperatureUnit": "fahrenheit"
}
```

# Actor output Schema

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

Every settlement value, observation and model forecast this run produced.

## `csv` (type: `string`):

The same rows as a CSV you can open in a spreadsheet or load into pandas.

## `overview` (type: `string`):

The dataset with the Settlement values and Model forecasts views.

# 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",
        "KLAX",
        "KORD"
    ],
    "cities": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("yawning_manuscript/weather-data-prediction-markets").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",
        "KLAX",
        "KORD",
    ],
    "cities": [],
}

# Run the Actor and wait for it to finish
run = client.actor("yawning_manuscript/weather-data-prediction-markets").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",
    "KLAX",
    "KORD"
  ],
  "cities": []
}' |
apify call yawning_manuscript/weather-data-prediction-markets --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yawning_manuscript/weather-data-prediction-markets"
        }
    }
}

```

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/lfQ1vVjfLJoFpZyoN/builds/76qPyxkO5yPqJac6f/openapi.json
