{
  "openapi": "3.0.1",
  "info": {
    "title": "Prediction Markets Scraper & Odds Monitor (Kalshi + Polymarket)",
    "description": "Live Kalshi and Polymarket odds in one table: probability, bid/ask, 24h change, volume, liquidity, close time. Filter by keyword or category. Monitor mode outputs only new markets and markets whose odds moved N points since the last run. No login.",
    "version": "0.1",
    "x-build-id": "Bw5yWU6dROoJwYsRa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rjmacarthy~prediction-markets-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rjmacarthy-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/rjmacarthy~prediction-markets-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rjmacarthy-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/rjmacarthy~prediction-markets-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rjmacarthy-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": {
          "platforms": {
            "title": "Platforms",
            "type": "array",
            "description": "Which prediction markets to read. Both are public and keyless.",
            "items": {
              "type": "string",
              "enum": [
                "kalshi",
                "polymarket"
              ],
              "enumTitles": [
                "Kalshi",
                "Polymarket"
              ]
            },
            "default": [
              "kalshi",
              "polymarket"
            ]
          },
          "query": {
            "title": "Keyword",
            "type": "string",
            "description": "Optional. Only markets whose event title, question or outcome contains every word, e.g. 'bitcoin', 'fed rate', 'super bowl'. Leave empty for the most active markets overall."
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Optional, e.g. Politics, Sports, Economics, Crypto, Elections, Financials, Weather, or narrower names like NBA or Tennis. Matched case-insensitively against Kalshi's category/tags and Polymarket's tags. A market matching any one is kept.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "volume24h",
              "volume",
              "liquidity",
              "closing"
            ],
            "type": "string",
            "description": "Which markets come first (and which are kept when 'Max markets per platform' cuts the list). Kalshi publishes no liquidity figure, so 'liquidity' sorts Kalshi by open interest.",
            "default": "volume24h"
          },
          "maxMarkets": {
            "title": "Max markets per platform",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum rows output per platform (each row is one market / outcome). 0 = no limit (capped at 1,000 per platform).",
            "default": 50
          },
          "minVolume": {
            "title": "Minimum total volume",
            "minimum": 0,
            "type": "integer",
            "description": "Skip markets whose lifetime volume is below this (USD on Polymarket, contracts of $1 on Kalshi). 0 = keep all.",
            "default": 0
          },
          "includeClosed": {
            "title": "Include closed markets",
            "type": "boolean",
            "description": "Also output markets that have closed or resolved. Off by default: only markets you can still trade.",
            "default": false
          },
          "includeCombos": {
            "title": "Include Kalshi combo markets",
            "type": "boolean",
            "description": "Kalshi multivariate combo markets (KXMVE... tickers, parlays) are skipped by default because they are thin and very numerous.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode",
            "enum": [
              "all",
              "new",
              "changes"
            ],
            "type": "string",
            "description": "For scheduled runs. 'all' outputs every matching market. 'new' outputs only markets not seen in earlier runs. 'changes' outputs new markets plus markets whose Yes probability moved at least 'Minimum move' points since the previous run, with changeType (new, moved_up, moved_down) and previousProbability. The first monitor run outputs everything as 'new' and becomes the baseline. You only pay for rows output, so a run where nothing moved costs just the start fee.",
            "default": "all"
          },
          "minMovePct": {
            "title": "Minimum move (percentage points)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For monitor mode 'changes': report a market when its Yes probability moved by at least this many points (5 = e.g. 40% -> 45%).",
            "default": 5
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name for the monitor's memory. Runs with the same name compare against each other; use a different name for each separate monitor (e.g. 'fed-odds', 'election-alerts').",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: both APIs are public. Apify datacenter proxy only: residential proxies are not supported and fall back to datacenter proxy with a warning.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}