{
  "openapi": "3.0.1",
  "info": {
    "title": "Prediction Markets Scraper - Kalshi & Polymarket Odds",
    "description": "Scrape live Kalshi and Polymarket odds: yes/no prices, bid/ask, volume, open interest, order books, price history, recent trades and cross-platform price gaps for the same question. Export CSV, Excel, JSON or API. No login or API key. Verified: 10 markets + 10 matches in 12 s.",
    "version": "0.1",
    "x-build-id": "OqVCMi8reNAUYB09u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~prediction-markets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-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/recordsdata~prediction-markets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-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/recordsdata~prediction-markets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-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",
            "uniqueItems": true,
            "type": "array",
            "description": "Which prediction market platforms to scrape. Valid values: \"kalshi\", \"polymarket\". Leave both (default) for cross-platform matching.",
            "default": [
              "kalshi",
              "polymarket"
            ],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "settled",
              "all"
            ],
            "type": "string",
            "description": "Which markets to collect. Open = currently tradable.",
            "default": "open"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Optional. Only keep markets whose question, event title or ticker contains any of these phrases (case-insensitive). Polymarket uses its public search, so rare markets are found too. Leave empty for all markets. Examples: \"federal reserve\", \"bitcoin\", \"world series\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Optional. Only keep markets in these categories, for example \"crypto\", \"politics\", \"sports\", \"economics\", \"science and technology\". Matched against the Kalshi event category and the Polymarket tags. Leave empty for all categories.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minVolume": {
            "title": "Minimum volume",
            "minimum": 0,
            "type": "number",
            "description": "Only keep markets with at least this total traded volume, measured like the volume column (USD on Polymarket, contracts on Kalshi). 0 keeps everything.",
            "default": 0
          },
          "minLiquidity": {
            "title": "Minimum liquidity (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep Polymarket markets with at least this much liquidity (order book depth). Kalshi publishes no liquidity figure, so Kalshi markets are not filtered by it. 0 keeps everything.",
            "default": 0
          },
          "liquidOnly": {
            "title": "Liquid markets only",
            "type": "boolean",
            "description": "Drop markets with zero volume (stale or never-traded ticks).",
            "default": false
          },
          "sortBy": {
            "title": "Sort markets by",
            "enum": [
              "default",
              "volume",
              "volume24h",
              "liquidity",
              "newest",
              "endingSoon"
            ],
            "type": "string",
            "description": "Order of the delivered market rows within each platform. Polymarket sorts on the server across all markets. Kalshi cannot sort on the server, so its order applies within the first 1,500 markets read.",
            "default": "default"
          },
          "maxPerPlatform": {
            "title": "Max markets per platform",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of markets to fetch from each selected platform. Larger values improve cross-platform match coverage. Each run reads the listings for at most about 40 seconds, so a very rare filter may return fewer markets than asked.",
            "default": 300
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of market-summary rows to deliver (Kalshi and Polymarket alternate). Cross-platform match rows are capped by the same number separately. Free users: limited to 10 (preview). Paid users: max 1,000,000.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new markets since the last run",
            "type": "boolean",
            "description": "Skip markets (and cross-platform matches) that an earlier run of the same search already delivered. Skipped rows are not charged. The memory is a named key-value store in your own account, one record per search (platforms, status, search terms, categories, volume and liquidity filters, state key). The first run delivers everything, later runs only what is new.",
            "default": false
          },
          "priceChangeThreshold": {
            "title": "Re-deliver when the price moves by",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Only used with \"Only new markets\". A market already delivered comes back, marked changeType \"price-move\" with the earlier price in previousYesPrice, when its Yes price moved by at least this much since it was last delivered (0.05 = 5 cents on a $1 contract). 0 switches the price-move check off.",
            "default": 0
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Optional name for the monitor memory. Use different keys to keep several independent monitors on the same search.",
            "default": ""
          },
          "resetSeen": {
            "title": "Reset the monitor memory",
            "type": "boolean",
            "description": "Forget everything the monitor delivered before and deliver all matching markets again on this run.",
            "default": false
          },
          "includeOrderBook": {
            "title": "Order book depth",
            "type": "boolean",
            "description": "Top ten bid/ask price levels per market (Kalshi orderbook + Polymarket CLOB book). Billed per market as order-book-record.",
            "default": false
          },
          "includeCrossMatch": {
            "title": "Cross-platform match",
            "type": "boolean",
            "description": "Find the same question listed on both Kalshi and Polymarket (requires both platforms selected) and output the price gap between them. With no search term it deep-scans both platforms to locate overlaps. Billed per match as cross-match-record.",
            "default": true
          },
          "includePriceHistory": {
            "title": "Price history",
            "type": "boolean",
            "description": "Historical price time series for the market (Kalshi candlesticks, Polymarket CLOB price history). Useful for charting or backtesting. Billed per market as price-history-record.",
            "default": false
          },
          "includeTrades": {
            "title": "Recent trades",
            "type": "boolean",
            "description": "The last individual trades for the market: side, price, size, timestamp. Billed per market as recent-trades-record.",
            "default": false
          },
          "includeHolders": {
            "title": "Top holders (Polymarket)",
            "type": "boolean",
            "description": "The ten largest holders per outcome (public wallet address, Polymarket pseudonym, outcome and amount held). Polymarket only: Kalshi positions are not public. Billed per market as holders-record when it is in the live price list; otherwise delivered free.",
            "default": false
          },
          "crossMatchDepth": {
            "title": "Cross-match scan depth",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "How many markets per platform to scan when cross-matching without a search term. Larger depth finds more matches but adds requests (Kalshi and Polymarket keep overlaps thousands of markets into their listings).",
            "default": 3000
          },
          "walletAddresses": {
            "title": "Wallet addresses",
            "type": "array",
            "description": "Public Polymarket proxy wallet addresses (0x followed by 40 hex characters, shown on a Polymarket profile). Returns each wallet's current positions (resolved ones not yet redeemed included): outcome, size, average price, current value and profit and loss. Billed per position as wallet-position-record when it is in the live price list; otherwise delivered free. Max Items is shared across the wallets; up to 100 wallets are read per run.",
            "default": [],
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}