{
  "openapi": "3.0.1",
  "info": {
    "title": "Prediction Markets",
    "description": "Live prediction market data from Polymarket, Kalshi and Manifold in one clean JSON format: odds, order books, OHLC price history, cross-venue arbitrage, dutch-book scanner, consensus fair value and Kelly stake sizing. Export to JSON, CSV or Excel, or call it by API.",
    "version": "1.0",
    "x-build-id": "mjUykJcrqhGmXyaci"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pintostudio~prediction-markets/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pintostudio-prediction-markets",
        "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/pintostudio~prediction-markets/runs": {
      "post": {
        "operationId": "runs-sync-pintostudio-prediction-markets",
        "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/pintostudio~prediction-markets/run-sync": {
      "post": {
        "operationId": "run-sync-pintostudio-prediction-markets",
        "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",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "markets",
              "market",
              "orderbook",
              "odds",
              "oddsCompare",
              "history",
              "search",
              "arbitrage",
              "arbitrageEvent",
              "arbitrageEvents",
              "consensus",
              "kelly",
              "venues",
              "health"
            ],
            "type": "string",
            "description": "Which thing to do. Each operation uses a different subset of the fields below."
          },
          "venue": {
            "title": "Venue",
            "type": "string",
            "description": "polymarket | kalshi | manifold. Comma-separate two or more for operations that compare venues (arbitrage, arbitrageEvents, consensus), e.g. \"polymarket,kalshi\". Leave empty to use all three where that's allowed."
          },
          "id": {
            "title": "Market ID",
            "type": "string",
            "description": "The venue's own market identifier: Polymarket numeric id or slug, Kalshi ticker, Manifold id or slug. Used by: market, orderbook, odds, history, kelly."
          },
          "eventId": {
            "title": "Event ID",
            "type": "string",
            "description": "The venue's event identifier (Polymarket numeric id/slug, Kalshi event_ticker) - a group of mutually-exclusive candidate markets. Used by: arbitrageEvent."
          },
          "q": {
            "title": "Search term",
            "type": "string",
            "description": "Free-text search term, e.g. \"fed rate cut\". Used by: markets, oddsCompare, search, arbitrage, arbitrageEvents, consensus. Strongly recommended on arbitrage/consensus/arbitrageEvents - scopes the scan and makes matches far more accurate."
          },
          "outcome": {
            "title": "Outcome",
            "type": "string",
            "description": "Which outcome to use: \"Yes\" or \"No\" (Polymarket also accepts custom outcome names). Used by: orderbook, history, kelly."
          },
          "interval": {
            "title": "Candle interval",
            "enum": [
              "1m",
              "5m",
              "15m",
              "1h",
              "4h",
              "1d",
              "1w"
            ],
            "type": "string",
            "description": "OHLC candle width. Used by: history."
          },
          "lookback": {
            "title": "History lookback",
            "enum": [
              "1d",
              "7d",
              "30d",
              "90d",
              "180d",
              "365d"
            ],
            "type": "string",
            "description": "How far back to fetch history. Used by: history."
          },
          "limit": {
            "title": "Limit",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Max results to return. Used by: markets, search, arbitrage, arbitrageEvents."
          },
          "perVenueLimit": {
            "title": "Per-venue scan limit",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "How many markets per venue to scan before matching (higher = more thorough, slower). Used by: arbitrage. Leave empty for a sensible default."
          },
          "minEdge": {
            "title": "Minimum edge",
            "minimum": -1,
            "maximum": 1,
            "type": "number",
            "description": "Minimum profit edge to report, as a decimal fraction of $1 (e.g. 0.02 = 2%). Used by: arbitrage, arbitrageEvents."
          },
          "minSimilarity": {
            "title": "Minimum title similarity",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "How strictly two venues' market titles must match to be treated as the same question, 0-1 (higher = stricter). Used by: arbitrage, consensus."
          },
          "feeAware": {
            "title": "Fee-aware",
            "type": "boolean",
            "description": "Subtract Kalshi's real public trading fee from the reported edge/cost. Used by: arbitrage, arbitrageEvent, arbitrageEvents.",
            "default": false
          },
          "probability": {
            "title": "Your probability estimate",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "YOUR OWN estimate that the outcome happens, 0-1 exclusive (e.g. 0.6). Used by: kelly."
          },
          "price": {
            "title": "Market price",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "The market's price for the outcome, 0-1 (cost of a $1 Yes contract). Pass this OR venue+id. Used by: kelly."
          },
          "bankroll": {
            "title": "Bankroll",
            "minimum": 0,
            "type": "number",
            "description": "Your stake budget, any currency unit. Used by: kelly."
          },
          "fraction": {
            "title": "Kelly fraction",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "1 = full Kelly, 0.5 = half Kelly, 0.25 = quarter Kelly (lower variance, usually recommended). Used by: kelly."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}