{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi & Polymarket Odds Scraper (No Login, No API Key)",
    "description": "Scrape Kalshi and Polymarket odds by keyword, topic or link: implied probability, 24-hour volume, liquidity, open interest, bid and ask, close time and result, plus price history and order book. The same question is matched across both venues with the gap. No login or API key. $1 per 1,000 markets.",
    "version": "0.1",
    "x-build-id": "ijO9DNrNoLE4iWytx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/locaihost~prediction-markets/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-locaihost-prediction-markets",
        "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/locaihost~prediction-markets/runs": {
      "post": {
        "operationId": "runs-sync-locaihost-prediction-markets",
        "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/locaihost~prediction-markets/run-sync": {
      "post": {
        "operationId": "run-sync-locaihost-prediction-markets",
        "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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words to search for on each venue, e.g. \"fed decision\", \"bitcoin\", \"election\", \"Ballon d'Or\". Every word must appear in a market's wording. Leave empty (with no categories or links) to get each venue's most traded markets.",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "Venues",
            "type": "array",
            "description": "Which venues to read. Leave both on to get the same question matched across Kalshi and Polymarket. (Links below always go to the venue they belong to.)",
            "items": {
              "type": "string",
              "enum": [
                "kalshi",
                "polymarket"
              ],
              "enumTitles": [
                "Kalshi",
                "Polymarket"
              ]
            },
            "default": [
              "kalshi",
              "polymarket"
            ]
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Topics in either venue's words, e.g. Politics, Elections, Sports, Crypto, Economics, Finance, Tech, Weather, Culture, World. With search terms, they narrow the results; on their own, they list the topic's markets, most traded first.",
            "items": {
              "type": "string"
            }
          },
          "markets": {
            "title": "Market or event links / IDs",
            "type": "array",
            "description": "Links copied from kalshi.com or polymarket.com (a market, an event or a Kalshi series page), or bare ids: Kalshi tickers (KXFEDDECISION-26OCT, KXFEDDECISION-26OCT-H0), Polymarket slugs, condition ids (0x...) or market ids. Links always return their markets, whatever the filters below. A link that can't be found is listed in the status message and costs nothing.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Market status",
            "type": "array",
            "description": "Which markets to return. Open = trading now. Closed = trading ended, no result yet. Resolved = has a result (Kalshi's older results come from its archive when you search, pick a category or a series). Upcoming = listed, not trading yet (Kalshi only).",
            "items": {
              "type": "string",
              "enum": [
                "open",
                "closed",
                "resolved",
                "upcoming"
              ],
              "enumTitles": [
                "Open",
                "Closed",
                "Resolved",
                "Upcoming"
              ]
            },
            "default": [
              "open"
            ]
          },
          "minVolume24h": {
            "title": "Minimum 24-hour volume",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets that traded less than this in the last 24 hours (contracts on Kalshi, US dollars on Polymarket). 0 = no minimum.",
            "default": 0
          },
          "minVolume": {
            "title": "Minimum total volume",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets with less total volume than this (contracts on Kalshi, US dollars on Polymarket). 0 = no minimum.",
            "default": 0
          },
          "minLiquidity": {
            "title": "Minimum liquidity (Polymarket)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip Polymarket markets with less liquidity than this. Kalshi publishes no liquidity figure, so Kalshi rows are not affected. 0 = no minimum.",
            "default": 0
          },
          "maxItemsPerQuery": {
            "title": "Markets per search, category or listing",
            "minimum": 0,
            "type": "integer",
            "description": "How many markets to return for each search term, category or series, per venue, most traded first. 0 = all of them (every open market on both venues is well over 50,000 rows).",
            "default": 100
          },
          "maxResults": {
            "title": "Max markets per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many markets in total. 0 = no limit.",
            "default": 0
          },
          "priceHistory": {
            "title": "Price history",
            "enum": [
              "none",
              "hour",
              "day"
            ],
            "type": "string",
            "description": "Add each market's past prices to its row as history[] (time and probability). Hourly covers up to 31 days, daily up to 365.",
            "default": "none"
          },
          "historyDays": {
            "title": "History length",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How many days of price history to read.",
            "default": 7
          },
          "includeOrderBook": {
            "title": "Order book (top 5 levels)",
            "type": "boolean",
            "description": "Add the best five bids and asks (price and size, in Yes terms) to each row as orderBook. Every row already has the best bid and ask.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new markets",
            "type": "boolean",
            "description": "Return only markets this setup has never returned before, e.g. to catch newly listed markets on a topic. Remembered per saved task (or per set of inputs).",
            "default": false
          },
          "onlyChanged": {
            "title": "Only markets that moved",
            "type": "boolean",
            "description": "Return (and pay for) only markets whose probability moved by at least the threshold below, whose status or result changed, or that are new to this setup. Each row then also has previous (last probability and when) and changeSinceLast. Ideal for an hourly or daily schedule.",
            "default": false
          },
          "minChangePoints": {
            "title": "Move threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "For \"Only markets that moved\": the smallest move that counts, in percentage points (1 = from 42% to 43%).",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}