{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi Scraper: Prediction Market Odds & Prices",
    "description": "Live Kalshi odds by keyword, category, series, event or ticker: YES/NO bid/ask, implied probability, 24h/total volume, open interest, close time, status and result, optional candlestick history and a free order book. No key or account. $0.90 per 1,000 markets.",
    "version": "0.1",
    "x-build-id": "ThDFp7ssjs9E9gDYg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyharvest~kalshi-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyharvest-kalshi-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/tidyharvest~kalshi-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidyharvest-kalshi-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/tidyharvest~kalshi-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidyharvest-kalshi-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Find markets by keyword (e.g. `fed`, `bitcoin`, `election`, `elon musk`). Matches Kalshi series and event titles; every word must appear. One search per line. Leave empty (and the ticker fields empty) to browse the whole exchange.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "Politics",
              "Elections",
              "Economics",
              "Financials",
              "Crypto",
              "Companies",
              "Sports",
              "Entertainment",
              "Climate and Weather",
              "Science and Technology",
              "World",
              "Health",
              "Mentions",
              "Commodities",
              "Social",
              "Transportation"
            ],
            "type": "string",
            "description": "Only markets in this Kalshi category. Narrows keyword searches and browsing."
          },
          "seriesTickers": {
            "title": "Series tickers",
            "type": "array",
            "description": "Kalshi series, e.g. `KXFED` (Fed funds rate), `KXBTCD` (Bitcoin daily), `KXHIGHNY` (NYC high temperature). Returns the markets of the series' events.",
            "items": {
              "type": "string"
            }
          },
          "eventTickers": {
            "title": "Event tickers",
            "type": "array",
            "description": "Kalshi events, e.g. `KXFED-26OCT`. Returns every market (strike/outcome) in the event. Returned open or settled, like market tickers.",
            "items": {
              "type": "string"
            }
          },
          "marketTickers": {
            "title": "Market tickers or Kalshi URLs",
            "type": "array",
            "description": "Specific markets (`KXFED-26OCT-T4.00`) or `https://kalshi.com/markets/...` URLs. Event and series tickers work here too. Markets and events given here are returned open or settled (Status `closed`/`settled` narrows them).",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Status",
            "enum": [
              "open",
              "closed",
              "settled",
              "all"
            ],
            "type": "string",
            "description": "Which markets to return.",
            "default": "open"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24h",
              "volume",
              "openInterest",
              "closingSoon",
              "newest"
            ],
            "type": "string",
            "description": "Order of results.",
            "default": "volume24h"
          },
          "minVolume": {
            "title": "Min total volume (contracts)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets with fewer contracts traded in total (one contract pays $1)."
          },
          "minVolume24h": {
            "title": "Min 24h volume (contracts)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets with fewer contracts traded in the last 24 hours."
          },
          "minOpenInterest": {
            "title": "Min open interest (contracts)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets with fewer outstanding contracts."
          },
          "closeDateFrom": {
            "title": "Closes on or after",
            "type": "string",
            "description": "Only markets whose trading closes on or after this date (YYYY-MM-DD)."
          },
          "closeDateTo": {
            "title": "Closes on or before",
            "type": "string",
            "description": "Only markets whose trading closes on or before this date (YYYY-MM-DD)."
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop markets whose title, event or rules mention any of these (applied before billing). E.g. `15 min` to skip 15-minute crypto markets.",
            "items": {
              "type": "string"
            }
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Add candlesticks (open/high/low/close price, bid/ask, volume, open interest) to each market. Billed per candlestick (see Pricing).",
            "default": false
          },
          "historyPeriod": {
            "title": "Candlestick period",
            "enum": [
              "minute",
              "hour",
              "day"
            ],
            "type": "string",
            "description": "Length of each candlestick.",
            "default": "hour"
          },
          "historyDays": {
            "title": "History window (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "How many days back the history goes.",
            "default": 7
          },
          "maxHistoryPointsPerMarket": {
            "title": "Max candlesticks per market",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Keep only the most recent N candlesticks per market. Caps the price-point cost.",
            "default": 200
          },
          "includeOrderBook": {
            "title": "Include order book (free)",
            "type": "boolean",
            "description": "Add a live order-book snapshot (YES bids, YES asks, NO bids, total depth) to each open market. No extra charge.",
            "default": false
          },
          "orderBookDepth": {
            "title": "Order book levels",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many price levels to keep per side.",
            "default": 10
          },
          "maxItems": {
            "title": "Max markets",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on markets per run (shared across searches/tickers). Also caps your cost.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}