{
  "openapi": "3.0.1",
  "info": {
    "title": "Prediction Markets Scraper (Kalshi + Polymarket)",
    "description": "Kalshi and Polymarket odds in one run: prices, implied probability, volume, open interest, order book and daily history, plus matched cross-venue pairs with the price spread. Public market data, no login. Bounded retries; failed venues are never charged.",
    "version": "0.1",
    "x-build-id": "m7P2Hqj51wWe13Dqg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signalclear~prediction-markets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signalclear-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/signalclear~prediction-markets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-signalclear-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/signalclear~prediction-markets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-signalclear-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": {
          "venues": {
            "title": "Venues",
            "enum": [
              "both",
              "kalshi",
              "polymarket"
            ],
            "type": "string",
            "description": "Which prediction markets to read. Cross-venue pairs need both.",
            "default": "both"
          },
          "query": {
            "title": "Search keywords",
            "type": "array",
            "description": "One keyword or phrase per line, such as nfl, super bowl, fed rate or bitcoin. Each line is searched separately on each venue and fails or succeeds on its own. Kalshi matches every word against series and event titles, tickers and tags; Polymarket uses its own search, or lists the tag when the keyword is a tag (nfl, nba). Leave empty for the most-traded markets.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Optional. One of sports, politics, elections, economics, finance, weather, climate, crypto, entertainment, tech, science, business, world, health, commodities, ai. Any other value is tried as a Polymarket tag (for example nfl or nba) and is unknown to Kalshi, so the Kalshi part fails (and is not charged). Optional with a keyword too: without a category, Kalshi's whole series catalog is searched."
          },
          "status": {
            "title": "Market status",
            "enum": [
              "open",
              "closed",
              "all"
            ],
            "type": "string",
            "description": "Open markets (trading now), closed markets (trading ended, including resolved ones with their outcome) or all.",
            "default": "open"
          },
          "minVolume": {
            "title": "Minimum volume",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets with lower lifetime volume. Units differ by venue: contracts on Kalshi (each pays $1), US dollars on Polymarket. 0 keeps everything.",
            "default": 0
          },
          "matchAcrossVenues": {
            "title": "Match the same question across venues",
            "type": "boolean",
            "description": "Adds a pair row (type: pair) for each question found on both venues, with both Yes prices and the spread. Game winners are matched by league, teams and date; other markets by fuzzy title and resolution date. Matching is approximate: check both markets' rules before acting on a spread.",
            "default": true
          },
          "includeOrderbook": {
            "title": "Include order book",
            "type": "boolean",
            "description": "Adds the top 5 bid and ask levels, total depth and the bid-ask spread for the Yes side. One extra request per market.",
            "default": false
          },
          "includeHistory": {
            "title": "Include daily price history",
            "type": "boolean",
            "description": "Adds one Yes price per day for the last N days (see History days). One extra request per market.",
            "default": false
          },
          "historyDays": {
            "title": "History days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How many days of daily price history to keep when price history is on.",
            "default": 30
          },
          "maxMarketsPerVenue": {
            "title": "Maximum markets per venue",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many markets from each venue for each keyword. Kalshi markets come from its most-traded series first; Polymarket markets by 24-hour volume.",
            "default": 500
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on dataset rows for the whole run, markets and pairs together. Pairs are added last, so a low cap can leave no room for them. Leave empty for no cap."
          },
          "maxConcurrency": {
            "title": "Parallel requests per venue",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Requests in flight to each venue at once. Requests are also paced to stay under the venues' public rate limits and slow down further on HTTP 429.",
            "default": 4
          },
          "maxAttempts": {
            "title": "Attempts per source",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Each attempt uses a fresh proxy session and replays what the previous one already fetched. A venue/keyword that still fails is listed in the FAILED_SOURCES record and is not charged.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for one HTTP response before the attempt counts as failed and is retried on a fresh session.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Both venues' public APIs answer datacenter IPs, so the default Apify proxy is enough. Residential is not needed.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}