{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi Weather Markets API — Temperature & Rain Odds",
    "description": "Kalshi weather market data as JSON: live temperature (KXHIGH/KXLOW) and rain (KXRAIN) bracket odds with implied probability, bid/ask and volume, plus settled history for 24 US cities, each mapped to its settlement station. No API key. $1 per 1,000 markets.",
    "version": "0.1",
    "x-build-id": "5JLjWfVyqMDTLGoig"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bigdavidson~kalshi-weather-markets/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bigdavidson-kalshi-weather-markets",
        "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/bigdavidson~kalshi-weather-markets/runs": {
      "post": {
        "operationId": "runs-sync-bigdavidson-kalshi-weather-markets",
        "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/bigdavidson~kalshi-weather-markets/run-sync": {
      "post": {
        "operationId": "run-sync-bigdavidson-kalshi-weather-markets",
        "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": {
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names, e.g. NYC, Chicago, Miami; [\"all\"] = every city. 24 temperature cities plus 7 rain-only ones (Pittsburgh, Milwaukee...; need seriesType rain, KXRAIN, KXRAINM or all): full list in the README. Aliases (LA, DC), station codes (KMDW), tickers (KXHIGHCHI, KXHIGHNY-26SEP24), airports (JFK), \"Chicago, IL\" and {\"lat\": 41.79, \"lon\": -87.75} also work. Live mode returns about 24 records per city with seriesType both. No supported city = empty run, no charge.",
            "default": [
              "NYC"
            ],
            "items": {
              "type": "string"
            }
          },
          "seriesType": {
            "title": "Series type",
            "enum": [
              "KXHIGH",
              "KXLOW",
              "both",
              "KXRAIN",
              "KXRAINM",
              "rain",
              "all"
            ],
            "type": "string",
            "description": "KXHIGH = daily-high temperature, KXLOW = daily-low temperature, both = highs + lows (default). KXRAIN = Kalshi daily rain markets (\"Will it rain in Chicago today?\", 28 cities), KXRAINM = monthly rain-total markets (inch thresholds, 10+ cities), rain = daily + monthly rain, all = temperature + rain. Rain markets settle on the station named in their rules, which can differ from the temperature station (Chicago rain = O'Hare, Chicago temperature = Midway).",
            "default": "both"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "live",
              "settled",
              "both"
            ],
            "type": "string",
            "description": "live = currently tradeable markets with current bid/ask. settled = finalized markets (results + settled temperature or rainfall) within the lookback window or date range. both = live + settled.",
            "default": "live"
          },
          "lookbackDays": {
            "title": "Lookback days (settled mode)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How many days of settled-market history to pull (markets whose close time falls inside the window). Only used when mode is settled or both, and ignored when dateFrom is set. The whole window is returned, including markets Kalshi has moved out of its main market list. Cost guide per city with seriesType both: 30 days ≈ 360 records ($0.36), 90 days ≈ 1,080 records ($1.08).",
            "default": 90
          },
          "dateFrom": {
            "title": "Market date from (optional)",
            "type": "string",
            "description": "Only markets for this date or later (YYYY-MM-DD; the day the high, low or rain is measured — for monthly rain, the month). Works in every mode: with mode live, dateFrom = dateTo = tomorrow returns only tomorrow's brackets; with mode settled it replaces lookbackDays and can reach back years. Also accepts 20260925, 'today', 'tomorrow', 'yesterday', '7 days ago' (relative words count in US Eastern time, Kalshi's market day). Leave empty (or null) for no lower bound."
          },
          "dateTo": {
            "title": "Market date to (optional)",
            "type": "string",
            "description": "Only markets for this date or earlier (YYYY-MM-DD, same formats as dateFrom). With mode settled and no dateFrom, returns lookbackDays of history ending on this date. A date past 2100 (e.g. 9999-12-31), empty or null means no end date."
          },
          "maxRecords": {
            "title": "Max records (optional)",
            "type": "integer",
            "description": "Optional cap on records returned and charged — the run stops once this many market records are delivered and says so in its status message. Leave empty, null or 0 for no cap (your maximum charge per run still applies). AI agents: 500 (≈$0.51 maximum)."
          },
          "includeTrades": {
            "title": "Include trade history",
            "type": "boolean",
            "description": "Attach recent trades (up to 1,000 most recent fills) to each market record; fills of older markets come from Kalshi's trade history archive. Adds one API call per market; calls are paced at ~10 per second to stay under Kalshi's rate limit, so large pulls with trades take a while.",
            "default": false
          },
          "includeOrderbook": {
            "title": "Include order book",
            "type": "boolean",
            "description": "Attach the current order book (yes/no bid levels with fractional-contract sizes) to each market record. Adds one API call per open market. Settled markets always have empty books, attached without an extra call.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}