{
  "openapi": "3.0.1",
  "info": {
    "title": "Kalshi Scraper & Polymarket Scraper: Odds, Volume",
    "description": "[$2.00 / 1K] Kalshi and Polymarket in one schema: question, probability, bid and ask, volume, liquidity, close date, resolution and order book. Official APIs, no key, no browser. Weather preset covers every Kalshi temperature series. Watch mode reports new markets and moves.",
    "version": "0.1",
    "x-build-id": "sgRGJD6p1o3mC2cGq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deriverge~kalshi-polymarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deriverge-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/deriverge~kalshi-polymarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deriverge-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/deriverge~kalshi-polymarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deriverge-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": {
          "preset": {
            "title": "Preset",
            "enum": [
              "",
              "weather",
              "politics",
              "economics",
              "sports",
              "crypto",
              "entertainment"
            ],
            "type": "string",
            "description": "A ready-made category filter. Weather selects the Kalshi daily temperature markets (series KXHIGHNY, KXLOWNY and the other cities) plus any Polymarket weather tags. Combine with keywords for a narrower cut."
          },
          "exchanges": {
            "title": "Exchanges",
            "type": "array",
            "description": "Which exchanges to read. Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "kalshi",
                "polymarket"
              ],
              "enumTitles": [
                "Kalshi",
                "Polymarket"
              ]
            }
          },
          "query": {
            "title": "Search phrase",
            "type": "string",
            "description": "Full-text search on Polymarket and a keyword filter on Kalshi, for example \"bitcoin\", \"election\", \"fed rate\"."
          },
          "keywords": {
            "title": "Keyword filter (any of)",
            "type": "array",
            "description": "Keep only markets whose question, subtitle, category or tags contain one of these words.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories (any of)",
            "type": "array",
            "description": "Keep only markets in these categories or tags, for example Politics, Crypto, Sports, Economics.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "settled",
              "all"
            ],
            "type": "string",
            "description": "Open markets are still trading; settled markets carry their resolved outcome.",
            "default": "open"
          },
          "minVolumeUsd": {
            "title": "Minimum total volume (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop thin markets below this lifetime volume. Useful to skip the long tail of automated sports markets."
          },
          "closingWithinDays": {
            "title": "Closing within N days",
            "minimum": 1,
            "type": "integer",
            "description": "Keep only markets that close within this many days. Leave empty for all."
          },
          "maxMarkets": {
            "title": "Maximum markets per exchange",
            "minimum": 1,
            "type": "integer",
            "description": "Both exchanges list tens of thousands of markets, most of them automated sports contracts. Start small.",
            "default": 200
          },
          "includeOrderBook": {
            "title": "Include the order book",
            "type": "boolean",
            "description": "Adds bids and asks per market. One extra request per market, charged separately.",
            "default": false
          },
          "orderBookDepth": {
            "title": "Order book depth",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many price levels per side.",
            "default": 10
          },
          "newOnly": {
            "title": "Return only markets that appeared since the last run",
            "type": "boolean",
            "description": "Keeps a snapshot per watch name (or per saved task) and returns only markets not seen in the previous run. The CHANGES record always lists new markets, settled markets and the biggest probability moves, whether this is on or off.",
            "default": false
          },
          "watchKey": {
            "title": "Watch name",
            "type": "string",
            "description": "Name of the snapshot used for change tracking, for example \"politics\". Runs from a saved task get a snapshot automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}