{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi & Polymarket Scraper - Odds, Results & Price History",
    "description": "Prediction market data from Kalshi and Polymarket in one row shape: live probabilities, bid/ask, volume and open interest, settled results, and price history candles. Sports (NFL, NBA, MLB, NHL, college, soccer, UFC, tennis, F1, golf, esports), politics, economics, crypto, weather and more.",
    "version": "0.1",
    "x-build-id": "dgOvuoTq6E79Nf2Ez"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/artsiom_k~prediction-markets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-artsiom_k-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/artsiom_k~prediction-markets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-artsiom_k-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/artsiom_k~prediction-markets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-artsiom_k-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": {
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Which sites to read. With both, maxItems is shared: Kalshi gets half (rounded up), Polymarket the rest.",
            "items": {
              "type": "string",
              "enum": [
                "kalshi",
                "polymarket"
              ],
              "enumTitles": [
                "Kalshi",
                "Polymarket"
              ]
            },
            "default": [
              "kalshi",
              "polymarket"
            ]
          },
          "entityType": {
            "title": "What to scrape",
            "enum": [
              "markets",
              "results",
              "priceHistory"
            ],
            "type": "string",
            "description": "\"markets\": open markets with the current probability, bid/ask, last trade, volume and open interest. \"results\": settled markets with the winning outcome (default window: the last 7 days; set a From date for older). \"priceHistory\": the price over time for each matching market (see Price history of and History interval).",
            "default": "markets"
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Market categories. Leave empty for every category. Ignored when leagues are set.",
            "items": {
              "type": "string",
              "enum": [
                "sports",
                "politics",
                "elections",
                "economics",
                "finance",
                "crypto",
                "weather",
                "culture",
                "tech",
                "world"
              ],
              "enumTitles": [
                "Sports",
                "Politics",
                "Elections",
                "Economics (Fed, inflation, jobs)",
                "Finance, companies & commodities",
                "Crypto",
                "Weather & climate",
                "Culture & entertainment",
                "Tech & science",
                "World & geopolitics"
              ]
            },
            "default": [
              "sports"
            ]
          },
          "leagues": {
            "title": "Leagues (sports)",
            "type": "array",
            "description": "Only these leagues (games, props and futures). The \"(all ...)\" entries cover every league of that sport. Empty = every market in the chosen categories.",
            "items": {
              "type": "string",
              "enum": [
                "nfl",
                "ncaaf",
                "nba",
                "wnba",
                "ncaamb",
                "ncaawb",
                "mlb",
                "nhl",
                "epl",
                "ucl",
                "uel",
                "laliga",
                "bundesliga",
                "seriea",
                "ligue1",
                "mls",
                "ligamx",
                "ufc",
                "boxing",
                "atp",
                "wta",
                "f1",
                "nascar",
                "pga",
                "ipl",
                "cs2",
                "lol",
                "soccer",
                "basketball",
                "hockey",
                "baseball",
                "tennis",
                "golf",
                "mma",
                "cricket",
                "esports"
              ],
              "enumTitles": [
                "NFL",
                "College football (NCAAF)",
                "NBA",
                "WNBA",
                "College basketball, men (NCAAB)",
                "College basketball, women",
                "MLB",
                "NHL",
                "English Premier League",
                "UEFA Champions League",
                "UEFA Europa League",
                "La Liga",
                "Bundesliga",
                "Serie A",
                "Ligue 1",
                "MLS",
                "Liga MX",
                "UFC",
                "Boxing",
                "ATP tennis",
                "WTA tennis",
                "Formula 1",
                "NASCAR",
                "PGA Tour golf",
                "Indian Premier League (cricket)",
                "Counter-Strike 2",
                "League of Legends",
                "Soccer (all leagues)",
                "Basketball (all leagues)",
                "Hockey (all leagues)",
                "Baseball (all leagues)",
                "Tennis (all tours)",
                "Golf (all tours)",
                "MMA (all promotions)",
                "Cricket (all)",
                "Esports (all)"
              ]
            }
          },
          "marketTypes": {
            "title": "Market types (sports)",
            "type": "array",
            "description": "Only these sports market types. Non-sports markets are not affected. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "moneyline",
                "spread",
                "total",
                "props",
                "futures"
              ],
              "enumTitles": [
                "Moneyline (full-game winner)",
                "Spread (incl. alternate, half and quarter lines)",
                "Total (incl. team and period totals)",
                "Props (players, period winners, other game markets)",
                "Futures (season, awards, tournaments)"
              ]
            }
          },
          "search": {
            "title": "Search",
            "type": "string",
            "description": "Only markets whose event, market or outcome text contains every word, e.g. \"Chiefs\" or \"bitcoin\"."
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Results and settled price history: settled on or after this date (default: 7 days ago). Open markets: events starting on or after this date. Kalshi history starts with each series (NFL games: September 2025); Polymarket sports go back to 2023."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Upper bound for the same date as From date (inclusive)."
          },
          "minVolume": {
            "title": "Minimum volume",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets that traded less than this (Kalshi: $1 contracts; Polymarket: USD). Drops empty markets."
          },
          "eventIds": {
            "title": "Event IDs or URLs",
            "type": "array",
            "description": "Scrape just these events instead of a listing: Kalshi event tickers (KXNFLGAME-26OCT26DALPHI) or kalshi.com market URLs, Polymarket event slugs (nfl-sea-den-2026-10-16) or polymarket.com event URLs. Every market of each event is returned, whatever its status.",
            "items": {
              "type": "string"
            }
          },
          "marketStatus": {
            "title": "Price history of",
            "enum": [
              "settled",
              "open"
            ],
            "type": "string",
            "description": "Price history only: read the history of settled or of open markets.",
            "default": "settled"
          },
          "historyInterval": {
            "title": "History interval",
            "enum": [
              "minute",
              "hour",
              "day"
            ],
            "type": "string",
            "description": "Price history only. Kalshi returns candles (open/high/low/close, bid/ask, volume, open interest); Polymarket returns one price per interval.",
            "default": "hour"
          },
          "historyLastHours": {
            "title": "Only the last N hours",
            "minimum": 0,
            "type": "integer",
            "description": "Price history only: keep just the last N hours before the market closed (or before now, for open markets). Empty = the whole market life."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "full",
              "incremental"
            ],
            "type": "string",
            "description": "Results only. \"incremental\" remembers what earlier incremental runs with the same filters returned and skips it, so a daily schedule gets only newly settled markets.",
            "default": "full"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows. Clear it for everything (a whole listing can be hundreds of thousands of rows).",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: both APIs are public. Available in case one starts limiting a shared IP."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}