{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket & Kalshi Scraper",
    "description": "Polymarket and Kalshi prediction market data: markets and events with live odds, full-text search, whale trades in USD, price history, order books, top holders, wallet positions and PnL, trader leaderboards and comments. Public data, no login or API key.",
    "version": "1.0",
    "x-build-id": "i0YTIr7za5bB6yGU4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sheshinmcfly~polymarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sheshinmcfly-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/sheshinmcfly~polymarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sheshinmcfly-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/sheshinmcfly~polymarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sheshinmcfly-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": {
          "platform": {
            "title": "Platform",
            "enum": [
              "polymarket",
              "kalshi"
            ],
            "type": "string",
            "description": "Prediction market to read from.",
            "default": "polymarket"
          },
          "dataType": {
            "title": "Data type",
            "enum": [
              "markets",
              "events",
              "trades",
              "priceHistory",
              "orderBook",
              "holders",
              "walletPositions",
              "walletActivity",
              "walletProfile",
              "leaderboard",
              "comments"
            ],
            "type": "string",
            "description": "What to extract. Markets, events, trades, price history and order books work on both platforms; holders, wallets, leaderboard and comments are Polymarket only.",
            "default": "markets"
          },
          "searchQuery": {
            "title": "Search",
            "type": "string",
            "description": "Full-text search for markets or events, e.g. \"bitcoin\", \"election\", \"world cup\", \"temperature\"."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Polymarket: a tag slug such as politics, crypto, sports, pop-culture. Kalshi: a category such as Politics, Economics, Crypto, Climate and Weather (or just \"weather\"), Sports."
          },
          "seriesTicker": {
            "title": "Series ticker (Kalshi)",
            "type": "string",
            "description": "Kalshi only: restrict to one series, e.g. KXHIGHNY (NYC daily high temperature)."
          },
          "sortBy": {
            "title": "Sort by (Polymarket)",
            "enum": [
              "volume24hr",
              "volume",
              "liquidity",
              "endingSoon",
              "newest"
            ],
            "type": "string",
            "description": "Order of Polymarket markets and events.",
            "default": "volume24hr"
          },
          "activeOnly": {
            "title": "Open markets only",
            "type": "boolean",
            "description": "Only markets and events still open for trading.",
            "default": true
          },
          "includeClosed": {
            "title": "Include closed / resolved",
            "type": "boolean",
            "description": "Also return markets and events that already closed or resolved (historical analysis).",
            "default": false
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "For trades, price history, order book, holders and comments. Polymarket: market/event URL, slug or conditionId (an event expands to all its markets). Kalshi: market, event or series ticker, or a kalshi.com URL.",
            "items": {
              "type": "string"
            }
          },
          "wallets": {
            "title": "Wallets (Polymarket)",
            "type": "array",
            "description": "Wallet addresses (0x… 40 hex) for wallet positions, activity, profile, or to filter trades.",
            "items": {
              "type": "string"
            }
          },
          "minTradeUsd": {
            "title": "Minimum trade size (USD)",
            "minimum": 1,
            "type": "integer",
            "description": "Trades only: keep trades worth at least this many dollars — the whale filter."
          },
          "tradeSide": {
            "title": "Side (Polymarket)",
            "enum": [
              "",
              "BUY",
              "SELL"
            ],
            "type": "string",
            "description": "Trades only: buys, sells or both.",
            "default": ""
          },
          "priceInterval": {
            "title": "Price history range",
            "enum": [
              "1h",
              "6h",
              "1d",
              "1w",
              "1m",
              "max"
            ],
            "type": "string",
            "description": "How far back the price history goes.",
            "default": "1w"
          },
          "priceFidelity": {
            "title": "Price resolution (minutes)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional point spacing in minutes. Kalshi accepts 1, 60 or 1440."
          },
          "orderBookDepth": {
            "title": "Order book depth",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Price levels returned per side.",
            "default": 10
          },
          "leaderboardPeriod": {
            "title": "Leaderboard period",
            "enum": [
              "day",
              "week",
              "month",
              "all"
            ],
            "type": "string",
            "description": "Leaderboard only.",
            "default": "month"
          },
          "leaderboardRankBy": {
            "title": "Rank traders by",
            "enum": [
              "PNL",
              "VOL"
            ],
            "type": "string",
            "description": "Leaderboard only: profit or volume.",
            "default": "PNL"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records to return.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional — the data sources are public APIs and work without a proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}