{
  "openapi": "3.0.1",
  "info": {
    "title": "Polymarket & Kalshi Scraper – Odds, Volume & Price History",
    "description": "Polymarket and Kalshi scraper (plus Manifold): odds, YES/NO prices, volume, liquidity, open interest, resolution and price history in one format. Weather mode adds the settlement station and observed temperature for weather markets. Official public APIs.",
    "version": "1.0",
    "x-build-id": "YufbCwqp32vOCaBDY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/openharvest~prediction-markets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-openharvest-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/openharvest~prediction-markets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-openharvest-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/openharvest~prediction-markets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-openharvest-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "markets",
              "weather"
            ],
            "type": "string",
            "description": "<code>markets</code> = any prediction markets (search, category, URLs). <code>weather</code> = Kalshi and Polymarket weather markets (daily high/low temperature, rain, snow) enriched with the weather station they settle on and the observed values at that station (official NWS Daily Climate Report or METAR/ASOS observations). In weather mode, <code>searchQuery</code> and <code>category</code> are ignored; use <code>weatherCity</code> and <code>weatherType</code>.",
            "default": "markets"
          },
          "searchQuery": {
            "title": "Search markets",
            "type": "string",
            "description": "Optional keyword search across market and event titles, e.g. <code>fed rate</code>, <code>bitcoin</code>, <code>election</code>, <code>super bowl</code>. Leave empty to list the top markets."
          },
          "venues": {
            "title": "Venues",
            "type": "array",
            "description": "Which prediction market venues to scrape. Default: all three.",
            "items": {
              "type": "string",
              "enum": [
                "polymarket",
                "kalshi",
                "manifold"
              ],
              "enumTitles": [
                "Polymarket",
                "Kalshi",
                "Manifold"
              ]
            },
            "default": [
              "polymarket",
              "kalshi",
              "manifold"
            ]
          },
          "category": {
            "title": "Category",
            "enum": [
              "all",
              "politics",
              "elections",
              "economics",
              "finance",
              "crypto",
              "sports",
              "tech",
              "ai",
              "science",
              "world",
              "culture",
              "weather",
              "health",
              "companies"
            ],
            "type": "string",
            "description": "Optional topic filter, mapped to each venue's own categories/tags (Polymarket tag, Kalshi category, Manifold topic).",
            "default": "all"
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "<code>open</code> = currently trading. <code>closed</code> = ended / resolved markets (with their resolution). <code>all</code> = both.",
            "default": "open"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24h",
              "volume",
              "liquidity",
              "newest",
              "closingSoon"
            ],
            "type": "string",
            "description": "How markets are ranked on each venue. With a search query, Kalshi ranks by relevance when 24h volume is selected.",
            "default": "volume24h"
          },
          "maxItems": {
            "title": "Max markets (total)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of markets in total. The limit is split evenly across the selected venues (e.g. 30 with 3 venues = up to 10 per venue). You pay per market, so this also caps your cost.",
            "default": 30
          },
          "maxMarketsPerEvent": {
            "title": "Max markets per event",
            "minimum": 0,
            "type": "integer",
            "description": "Events such as \"Democratic nominee 2028\" or \"Fed decision in October\" contain many markets (one per candidate/outcome). Keep only the N most likely ones (highest YES price) per event. 0 = all markets of each event.",
            "default": 5
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Add a <code>priceHistory</code> array (time + YES price/probability) to every market. Charged as a separate <code>price-history</code> event, only when history data is returned.",
            "default": false
          },
          "priceHistoryRange": {
            "title": "Price history range",
            "enum": [
              "1d",
              "1w",
              "1m",
              "3m",
              "1y",
              "max"
            ],
            "type": "string",
            "description": "Time range of the price history, ending now (open markets) or at the close time (closed markets). Up to 1 month = hourly points, longer = daily points.",
            "default": "1w"
          },
          "weatherCity": {
            "title": "Weather city (weather mode)",
            "type": "string",
            "description": "Weather mode only. Optional city to filter weather markets, e.g. <code>NYC</code>, <code>Chicago</code>, <code>London</code>, <code>Seoul</code>. Leave empty for the most active weather markets."
          },
          "weatherType": {
            "title": "Weather market type (weather mode)",
            "enum": [
              "temperature",
              "precipitation",
              "all"
            ],
            "type": "string",
            "description": "Weather mode only. <code>temperature</code> = daily high/low (and hourly) temperature markets. <code>precipitation</code> = rain and snow markets. <code>all</code> = every weather/climate market, including hurricanes and climate records (station data only where a station applies).",
            "default": "temperature"
          },
          "marketUrls": {
            "title": "Specific market URLs or tickers",
            "type": "array",
            "description": "Optional. Scrape exactly these markets/events instead of searching: <code>https://polymarket.com/event/&lt;slug&gt;</code>, <code>https://kalshi.com/markets/&lt;series&gt;</code>, Kalshi tickers like <code>KXFEDDECISION-26OCT</code>, or <code>https://manifold.markets/&lt;user&gt;/&lt;slug&gt;</code>. When set, search/category/status/venues are ignored.",
            "items": {
              "type": "string"
            }
          },
          "customTag": {
            "title": "Custom venue tag (advanced)",
            "type": "string",
            "description": "Optional. A venue-native filter that overrides <code>category</code>: a Polymarket tag slug (e.g. <code>bitcoin</code>), a Kalshi category name (e.g. <code>Economics</code>) or a Manifold topic slug (e.g. <code>us-politics</code>). Best used with a single venue selected."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}