{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi + Polymarket Scraper — Unified Odds & History",
    "description": "Scrape Kalshi and Polymarket prediction markets into one normalized feed: questions, implied probabilities, volume, close dates — plus full odds history (candlesticks & price time-series). Pure API, no browser.",
    "version": "1.0",
    "x-build-id": "ReWxi3ewdNsR9hH7K"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signalbench~kalshi-polymarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signalbench-kalshi-polymarket-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/signalbench~kalshi-polymarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-signalbench-kalshi-polymarket-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/signalbench~kalshi-polymarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-signalbench-kalshi-polymarket-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "markets",
              "history"
            ],
            "type": "string",
            "description": "**Unified markets feed** returns all open markets from both platforms in one normalized schema, sorted by volume. **Odds history** returns the full price time-series for the markets you specify.",
            "default": "markets"
          },
          "platform": {
            "title": "Platforms",
            "enum": [
              "both",
              "kalshi",
              "polymarket"
            ],
            "type": "string",
            "description": "Which platforms to include in the unified feed.",
            "default": "both"
          },
          "keyword": {
            "title": "Keyword filter",
            "type": "string",
            "description": "Only keep markets whose question or event title contains this text (case-insensitive). E.g. \"election\", \"fed\", \"bitcoin\"."
          },
          "category": {
            "title": "Category filter",
            "type": "string",
            "description": "Only keep markets whose category matches (case-insensitive substring), e.g. Politics, Economics, Sports, Crypto, World. Matches the Kalshi category and the Polymarket event tags."
          },
          "minVolume": {
            "title": "Minimum volume",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep markets with at least this much lifetime volume (USD on Polymarket, contracts ≈ notional USD on Kalshi). Useful for skipping dead markets.",
            "default": 0
          },
          "closingWithinDays": {
            "title": "Closing within N days",
            "minimum": 1,
            "type": "integer",
            "description": "Only keep markets that close within this many days. Leave empty for all open markets."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume",
              "closingSoon",
              "priceMovers"
            ],
            "type": "string",
            "description": "Order of the unified feed. **Volume** ranks each platform by its own volume and interleaves them (the two volume scales aren't comparable). **Closing soon** and **Biggest movers** are comparable across platforms, so they sort globally.",
            "default": "volume"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of items to store. Caps your cost — 1 stored item = 1 charge (a history item is one market's complete time-series).",
            "default": 200
          },
          "historyTargets": {
            "title": "Markets for odds history (for \"Odds history\" mode)",
            "type": "array",
            "description": "Kalshi tickers (e.g. KXELONMARS-99) and/or Polymarket URLs or slugs (e.g. https://polymarket.com/event/will-jesus-christ-return-before-2027). One history item is produced per market.",
            "items": {
              "type": "string"
            }
          },
          "historyDays": {
            "title": "History window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How many days of history to fetch, counting back from now.",
            "default": 30
          },
          "historyResolution": {
            "title": "History resolution",
            "enum": [
              "1d",
              "1h"
            ],
            "type": "string",
            "description": "Granularity of the time-series. Hourly is best for windows up to ~60 days; daily for longer.",
            "default": "1d"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy, used only as a fallback. Both platforms are open JSON APIs that work best over a direct connection, so the Actor tries direct first and only falls back to this proxy if the direct request is rate-limited. Leave as-is unless you have a reason to change it.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}