{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi Prediction Markets Scraper",
    "description": "Scrape Kalshi prediction markets with live odds, bid and ask, spread, volume, open interest, rules and results. Also get event summaries, order books, trades, price history candles and a Kalshi vs Polymarket price comparison. Filter by category, keyword or ticker. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "tsRQhR0KuTIYVCdwT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~kalshi-prediction-markets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-kalshi-prediction-markets-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/parselab~kalshi-prediction-markets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-kalshi-prediction-markets-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/parselab~kalshi-prediction-markets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-kalshi-prediction-markets-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": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "markets",
              "events",
              "orderbook",
              "trades",
              "history",
              "crossmarket"
            ],
            "type": "string",
            "description": "Markets gives one row per market with odds, order book top, volume and rules. Events gives one summary row per event. Order book gives the full depth of chosen markets. Trades gives recent trades. Price history gives candles over time. Kalshi vs Polymarket matches similar questions on both platforms and shows the price gap.",
            "default": "markets"
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "settled",
              "all"
            ],
            "type": "string",
            "description": "Open markets can be traded now. Closed markets stopped trading and wait for the result. Settled markets have a result.",
            "default": "open"
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Kalshi categories, for example Politics, Elections, Economics, Sports, Financials, Crypto, Climate and Weather, Entertainment, Science and Technology, Health, Companies, World.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep markets whose title, outcome or rules contain any of these words, for example Fed, bitcoin, Trump.",
            "items": {
              "type": "string"
            }
          },
          "seriesTickers": {
            "title": "Series tickers",
            "type": "array",
            "description": "Series codes such as KXFEDDECISION or KXHIGHNY. A series groups the recurring events of one topic.",
            "items": {
              "type": "string"
            }
          },
          "eventTickers": {
            "title": "Event tickers",
            "type": "array",
            "description": "Event codes such as KXNFLGAME-26SEP21NYGLAR.",
            "items": {
              "type": "string"
            }
          },
          "marketTickers": {
            "title": "Market tickers",
            "type": "array",
            "description": "Market codes. Required for order book, trades and price history modes, for example KXNFLGAME-26SEP21NYGLAR-NYG. You can copy them from a markets run.",
            "items": {
              "type": "string"
            }
          },
          "minVolume": {
            "title": "Minimum volume",
            "minimum": 0,
            "type": "number",
            "description": "Only markets with at least this many contracts traded in total."
          },
          "minOpenInterest": {
            "title": "Minimum open interest",
            "minimum": 0,
            "type": "number",
            "description": "Only markets with at least this many contracts held open."
          },
          "onlyPriced": {
            "title": "Only markets with a price",
            "type": "boolean",
            "description": "Skip markets that have no quote and no trade yet.",
            "default": false
          },
          "closesWithinDays": {
            "title": "Closes within days",
            "minimum": 0,
            "type": "integer",
            "description": "Only markets that close within this many days from now."
          },
          "sortBy": {
            "title": "Sort markets by",
            "enum": [
              "none",
              "volume",
              "volume24h",
              "openInterest",
              "closeTime"
            ],
            "type": "string",
            "description": "Sorting reads all matching markets first, so the run takes longer. None keeps the order of the source.",
            "default": "none"
          },
          "includeCombos": {
            "title": "Include combo markets",
            "type": "boolean",
            "description": "Include the multi-leg parlay style markets. They are excluded by default because there are thousands of them and most have no trading.",
            "default": false
          },
          "candlePeriod": {
            "title": "Candle size",
            "enum": [
              "1min",
              "1hour",
              "1day"
            ],
            "type": "string",
            "description": "Size of each price candle in price history mode.",
            "default": "1hour"
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 730,
            "type": "integer",
            "description": "How far back to read price history and trades. The default is 1 day for 1 minute candles, 14 days for hourly and 90 days for daily."
          },
          "minSimilarity": {
            "title": "Minimum title similarity",
            "minimum": 0.3,
            "maximum": 1,
            "type": "number",
            "description": "For the Kalshi vs Polymarket comparison: how similar two titles must be to count as a match, from 0.3 to 1. Higher is stricter.",
            "default": 0.6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}