{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi Weather Index, Station Obs & Settlement Audit",
    "description": "Kalshi's minute temperature index for 13 cities, plus station observations (NWS, METAR), the NWS Daily Climate Report and a settlement-audit row per city-day for KXHIGH/KXLOW temperature markets. Public APIs, no login. Pay per row.",
    "version": "0.4",
    "x-build-id": "M4pSjtAVVY4xieimd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gratified_ashram~kalshi-weather-index/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gratified_ashram-kalshi-weather-index",
        "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/gratified_ashram~kalshi-weather-index/runs": {
      "post": {
        "operationId": "runs-sync-gratified_ashram-kalshi-weather-index",
        "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/gratified_ashram~kalshi-weather-index/run-sync": {
      "post": {
        "operationId": "run-sync-gratified_ashram-kalshi-weather-index",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "index",
              "stations",
              "audit",
              "calibrations"
            ],
            "type": "string",
            "description": "index: Kalshi's minute temperature index (default, one row per minute per city). stations: NWS and METAR observations for the station each Kalshi temperature market names, plus one daily row per city-day with the NWS Daily Climate Report (CLI) max/min/precip. audit: one row per city-day joining the index high/low, CLI, METAR and the settled KXHIGH/KXLOW bracket with agree flags. calibrations: the station configuration Kalshi publishes behind each city's index (station ids, weights, offsets, effective date), one row per city per config version.",
            "default": "index"
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Kalshi city IDs. Leave empty for all. Index mode: the ten index cities plus nyc, chicago, la-coastal (empty = the original ten). Stations and audit modes: any city below, each mapped to the station its KXHIGH/KXLOW market cites (e.g. Chicago = Midway, CLIMDW).",
            "items": {
              "type": "string",
              "enum": [
                "miami",
                "dfw",
                "houston",
                "phl-delaware-valley",
                "puget-sound",
                "sf-bay",
                "greater-boston",
                "southeast-michigan",
                "kansas-city",
                "minneapolis-st-paul",
                "nyc",
                "chicago",
                "la-coastal",
                "austin",
                "denver",
                "atlanta",
                "washington-dc",
                "newark",
                "las-vegas",
                "new-orleans",
                "oklahoma-city",
                "phoenix",
                "san-diego",
                "san-antonio",
                "louisville",
                "trenton"
              ],
              "enumTitles": [
                "Miami (KMIA)",
                "Dallas–Fort Worth (KDFW)",
                "Houston (KHOU Hobby)",
                "Philadelphia / Delaware Valley (KPHL)",
                "Seattle / Puget Sound (KSEA)",
                "San Francisco Bay (KSFO)",
                "Greater Boston (KBOS)",
                "Detroit / Southeast Michigan (KDTW, no market)",
                "Kansas City (KMCI, no market)",
                "Minneapolis–St. Paul (KMSP)",
                "New York City (KNYC Central Park)",
                "Chicago (KMDW Midway)",
                "Los Angeles coastal (KLAX)",
                "Austin (KAUS) – markets only",
                "Denver (KDEN) – markets only",
                "Atlanta (KATL) – markets only",
                "Washington DC (KDCA) – markets only",
                "Newark (KEWR) – markets only",
                "Las Vegas (KLAS) – markets only",
                "New Orleans (KMSY) – markets only",
                "Oklahoma City (KOKC) – markets only",
                "Phoenix (KPHX) – markets only",
                "San Diego (KSAN) – markets only",
                "San Antonio (KSAT) – markets only",
                "Louisville (KSDF) – markets only",
                "Trenton (KTTN) – markets only"
              ]
            }
          },
          "stations": {
            "title": "Extra stations (any ICAO code)",
            "type": "array",
            "description": "Stations and audit modes only: METAR stations anywhere in the world by ICAO code, e.g. ZBAA (Beijing), EGLL (London Heathrow), LFPG (Paris), RJTT (Tokyo) — the stations Polymarket's global temperature markets resolve on. Observations, daily max/min and the METAR 24-hour group come from aviationweather.gov; no NWS climate report and no Kalshi join for these. Can be combined with Cities.",
            "items": {
              "type": "string"
            }
          },
          "stationTimezone": {
            "title": "Time zone for extra stations",
            "type": "string",
            "description": "IANA zone (e.g. Asia/Shanghai) used to cut local days for the extra stations. Default: the solar offset from the station's longitude (Etc/GMT±h), which matches civil time to within an hour for most airports."
          },
          "lastDays": {
            "title": "Trailing window (days) – stations and audit modes",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many complete local days ending yesterday, per city. 1–30. Ignored when From/To are set (dates, YYYY-MM-DD; To may be today). The NWS Daily Climate Report is kept about 7 days, METAR 30 days, the Kalshi index about 7–10 days; older days get null in those columns.",
            "default": 1
          },
          "sources": {
            "title": "Observation sources – stations mode",
            "type": "array",
            "description": "Which observation rows to emit in stations mode. The daily row and audit mode always use METAR and the Daily Climate Report.",
            "items": {
              "type": "string",
              "enum": [
                "nws",
                "metar"
              ],
              "enumTitles": [
                "NWS api.weather.gov observations",
                "METAR (aviationweather.gov)"
              ]
            },
            "default": [
              "nws",
              "metar"
            ]
          },
          "lastHours": {
            "title": "Trailing window (hours) – index mode",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "How many hours back from now to pull, per city. 1–168. Ignored when from/to are set. 60 points per hour per city.",
            "default": 24
          },
          "from": {
            "title": "From (ISO time or unix ms)",
            "type": "string",
            "description": "Optional window start, e.g. 2026-09-01T00:00:00Z. Use with To."
          },
          "to": {
            "title": "To (ISO time or unix ms)",
            "type": "string",
            "description": "Optional window end. Defaults to now."
          },
          "detailed": {
            "title": "Per-station readings",
            "type": "boolean",
            "description": "Attach every member station's reading and quality-control disposition to each point (Kalshi's detailed=true). Larger rows, same price.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum points",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Cost cap per run: index points in index mode, rows in stations and audit modes. 1,000 points = one city for about 17 hours.",
            "default": 20000
          },
          "archiveDatasetName": {
            "title": "Archive dataset name",
            "type": "string",
            "description": "Also append points to a named dataset in your account (e.g. kalshi-weather-index). Schedule hourly and you keep a history Kalshi only serves as a window."
          },
          "compact": {
            "title": "Compact rows (one per city per hour)",
            "type": "boolean",
            "description": "Group the minutes of each hour into one row per city with a minutes array plus min/max. 60× fewer dataset rows, same data, same price (per index point). Good for archiving.",
            "default": false
          },
          "archiveOnly": {
            "title": "Archive only",
            "type": "boolean",
            "description": "With an archive dataset set: write only to the archive, not to this run's dataset. Halves storage writes on scheduled runs.",
            "default": false
          },
          "alignToHour": {
            "title": "Align window to full hours",
            "type": "boolean",
            "description": "End the window at the last completed hour instead of now. With lastHours 1 on a schedule at minute 10, each run covers exactly the previous hour.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}