{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi Scraper — Prediction Markets, Prices & Volume",
    "description": "Kalshi prediction markets for AI agents: search open markets by keyword or series, get yes/no prices, bid/ask, volume, open interest, close dates and rules. Kalshi is the US CFTC-regulated exchange — complements Polymarket. No API key.",
    "version": "0.1",
    "x-build-id": "bqjQXa5u1YM4pB1x0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~kalshi-markets/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-kalshi-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/yadroo~kalshi-markets/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-kalshi-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/yadroo~kalshi-markets/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-kalshi-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": {
          "mode": {
            "title": "Output mode",
            "enum": [
              "markets",
              "events",
              "series"
            ],
            "type": "string",
            "description": "`markets`: one row per tradable contract (e.g. 'Fed funds rate ≥ 4.25% after Apr 2027 meeting'). `events`: one row per event grouping its contracts (odds table). `series`: the Kalshi catalogue (14,000 series) with category, tags, frequency and settlement sources — use it to discover tickers.",
            "default": "markets"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Keywords (all must match, case-insensitive) in event title/subtitle, market title, category, series and event tickers. Kalshi has no search API, so the actor scans all events of the status (~14,000 open, up to 20,000) and filters locally; with mode=markets every market of a series whose title, tags or category match counts too."
          },
          "category": {
            "title": "Category",
            "enum": [
              "Sports",
              "Entertainment",
              "Politics",
              "Elections",
              "Financials",
              "Economics",
              "Mentions",
              "Climate and Weather",
              "Science and Technology",
              "Crypto",
              "Companies",
              "World",
              "Health",
              "Commodities",
              "Social",
              "Transportation",
              "Exotics",
              "AI",
              "Business",
              "Education"
            ],
            "type": "string",
            "description": "Kalshi category, exactly as listed (as on kalshi.com). Apify refuses any other value before the run starts."
          },
          "seriesTicker": {
            "title": "Series ticker",
            "type": "string",
            "description": "Restrict to one series, e.g. KXFED (Fed decision), KXBTC (Bitcoin hourly), KXCPI, KXNBA. Discover tickers with mode=series."
          },
          "eventTicker": {
            "title": "Event ticker",
            "type": "string",
            "description": "One event and all its markets, e.g. KXFED-27APR. Overrides query/category."
          },
          "tickers": {
            "title": "Market tickers",
            "type": "array",
            "description": "Exact market tickers to fetch (open, closed or settled), e.g. ['KXFED-27APR-T4.25']. Cheapest way to monitor a watchlist. Overrides query, category, seriesTicker, eventTicker and status; the min* / price / close-date filters still apply. A ticker Kalshi does not know comes back as a row with found = false (billed like any row) and is named in the status message. mode=markets only.",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "title": "Series tags (mode=series)",
            "type": "array",
            "description": "Filter series by Kalshi tags, e.g. ['Inflation','Interest Rates']. Case-insensitive. See README for the tag list. mode=series only.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "open",
              "closed",
              "settled",
              "unopened"
            ],
            "type": "string",
            "description": "Market/event status. Ignored when `tickers` is set.",
            "default": "open"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24h",
              "volume",
              "openInterest",
              "liquidity",
              "closeTime",
              "openTime",
              "yesPrice",
              "priceChange"
            ],
            "type": "string",
            "description": "Ordering of results.",
            "default": "volume24h"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum rows to return. Billing is per item. The run also stops at your maximum cost per run.",
            "default": 50
          },
          "limit": {
            "title": "Max items (legacy alias)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Deprecated — same as maxItems (maxItems wins)."
          },
          "closeFrom": {
            "title": "Closes after",
            "pattern": "^\\s*(\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:?\\d{2})?)?)?\\s*$",
            "type": "string",
            "description": "Only markets whose trading close time is on/after this moment: YYYY-MM-DD (start of that day, UTC) or an ISO date-time. Any other text is refused before the run."
          },
          "closeTo": {
            "title": "Closes before",
            "pattern": "^\\s*(\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:?\\d{2})?)?)?\\s*$",
            "type": "string",
            "description": "Only markets closing on/before this moment: YYYY-MM-DD counts through the end of that day (UTC), or an ISO date-time. Any other text is refused before the run."
          },
          "closingWithinHours": {
            "title": "Closing within N hours",
            "minimum": 1,
            "type": "integer",
            "description": "Shortcut for closeTo = now + N hours (the earlier of the two wins when both are set)."
          },
          "minVolume24h": {
            "title": "Min 24h volume (contracts)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop markets with less 24h volume (Kalshi counts contracts, $1 notional each)."
          },
          "minVolume": {
            "title": "Min total volume (contracts)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop markets with less lifetime volume."
          },
          "minOpenInterest": {
            "title": "Min open interest (contracts)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop thin markets."
          },
          "yesPriceMin": {
            "title": "Yes price min (cents)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "E.g. 5 excludes markets priced under 5¢."
          },
          "yesPriceMax": {
            "title": "Yes price max (cents)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "E.g. 95 excludes near-certain markets."
          },
          "includeCombos": {
            "title": "Include combo/parlay markets",
            "type": "boolean",
            "description": "Kalshi's multivariate combo markets (KXMVECROSS…) are excluded by default — they are synthetic parlays, not standalone questions.",
            "default": false
          },
          "includeOrderBook": {
            "title": "Include order book",
            "type": "boolean",
            "description": "Adds `orderBook`: resting Yes and No bids (cents, contracts), best bid/ask and spread. One extra request per market.",
            "default": false
          },
          "orderBookDepth": {
            "title": "Order book depth",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Levels per side.",
            "default": 5
          },
          "includeCandles": {
            "title": "Include price candles",
            "type": "boolean",
            "description": "Adds `candles` (OHLC in cents, volume, open interest per period) plus first/last/min/max/change summary.",
            "default": false
          },
          "candlePeriod": {
            "title": "Candle period",
            "enum": [
              "1m",
              "1h",
              "1d"
            ],
            "type": "string",
            "description": "Candle size. Kalshi supports exactly these three.",
            "default": "1h"
          },
          "candleLookbackDays": {
            "title": "Candle lookback (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How far back to fetch candles.",
            "default": 7
          },
          "includeTrades": {
            "title": "Include recent trades",
            "type": "boolean",
            "description": "Adds `trades`: latest public trades (time, yes/no price in cents, contracts, taker side).",
            "default": false
          },
          "tradesLimit": {
            "title": "Trades per market",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many recent trades to include.",
            "default": 20
          },
          "includeRules": {
            "title": "Include rules text",
            "type": "boolean",
            "description": "Set false to drop `rulesPrimary`/`rulesSecondary` and keep rows compact.",
            "default": true
          },
          "fields": {
            "title": "Only these fields",
            "type": "array",
            "description": "Keep only these top-level fields, in your order. The row id (ticker / eventTicker / seriesTicker by mode) and fetchedAt are always kept and come first unless you list them elsewhere. Letter case, spaces, '_' and '-' are forgiven (open_interest = openInterest), each correction reported in the status; names the mode does not have are skipped with a note; orderBook / candles / trades need their include switch and are skipped with a note without it; the run fails if none of the listed fields remains. found = false rows always keep ticker, found, reason and sourceUrl.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}