{
  "openapi": "3.0.1",
  "info": {
    "title": "NBA Playoff Odds API — Monte Carlo Simulator & Value Bets",
    "description": "Replays every remaining NBA game thousands of times for playoff, play-in, division, conference and championship probabilities for all 30 teams, priced against live Kalshi contracts.",
    "version": "0.0",
    "x-build-id": "SGtpp4ZLXfIBIJk2F"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/commodus67~nba-playoff-odds-monte-carlo/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-commodus67-nba-playoff-odds-monte-carlo",
        "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/commodus67~nba-playoff-odds-monte-carlo/runs": {
      "post": {
        "operationId": "runs-sync-commodus67-nba-playoff-odds-monte-carlo",
        "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/commodus67~nba-playoff-odds-monte-carlo/run-sync": {
      "post": {
        "operationId": "run-sync-commodus67-nba-playoff-odds-monte-carlo",
        "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": {
          "iterations": {
            "title": "Monte Carlo iterations",
            "minimum": 1000,
            "maximum": 200000,
            "type": "integer",
            "description": "How many full seasons to simulate. More iterations give smoother probabilities and a longer run.",
            "default": 20000
          },
          "season": {
            "title": "Season",
            "type": "integer",
            "description": "ESPN names a season by the year it ENDS, so 2026-27 is 2027. Leave empty to pick the current season automatically."
          },
          "archiveToNamedDataset": {
            "title": "Also archive to a named dataset",
            "type": "string",
            "description": "Optional. Name a dataset in your account and every run appends its rows there as well. Run datasets are deleted after 31 days; a named dataset is kept, which is how you build a season-long history of how these probabilities moved.",
            "default": ""
          },
          "regressionGames": {
            "title": "Regression games",
            "minimum": 0,
            "maximum": 82,
            "type": "integer",
            "description": "How many games of prior are mixed into each team's rating. Higher values pull teams toward their preseason expectation for longer.",
            "default": 20
          },
          "pythagoreanWeight": {
            "title": "Pythagorean weight",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "How much of a team's rating comes from points scored and allowed rather than from its actual win-loss record. Point differential predicts the rest of the season better than record does.",
            "default": 0.65
          },
          "homeAdvantage": {
            "title": "Home court advantage",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Home edge in log-odds. The default of 0.32 makes an evenly matched home team a 57.9% favourite, which is where the NBA has settled.",
            "default": 0.32
          },
          "strengthUncertainty": {
            "title": "Strength uncertainty",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "How unsure the model is of each team's true strength, in log-odds. Each simulated season redraws every rating once. Set to 0 to treat the ratings as exact, which makes the probabilities far more confident than they deserve to be.",
            "default": 0.22
          },
          "priorCarryover": {
            "title": "Prior carryover",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "How much of last season's point differential carries into this season's starting rating. At 0 every team opens at .500 and the preseason table is meaningless; at 1 nothing regresses toward the mean.",
            "default": 0.6
          },
          "seasonLength": {
            "title": "Regular season length",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Games per team. ESPN publishes 80 of the 82 before the season starts because two depend on the NBA Cup; the gap is simulated against an average opponent so win totals stay on an 82-game scale.",
            "default": 82
          },
          "minGamesPlayedForValue": {
            "title": "Games played before value calls",
            "minimum": 0,
            "maximum": 82,
            "type": "integer",
            "description": "Until each team has played this many games, no row is allowed to call itself VALUE. In October the model only knows how last season ended, so its biggest edges are really the offseason it cannot see. Edges are still reported in full; every row is simply labelled WATCH.",
            "default": 10
          },
          "includeMarketComparison": {
            "title": "Compare against Kalshi",
            "type": "boolean",
            "description": "Fetch live prices from the Kalshi playoff-qualifier market and compute edge, expected value and position sizing. Turn off for projections only.",
            "default": true
          },
          "includePlayInMarkets": {
            "title": "Include the play-in markets",
            "type": "boolean",
            "description": "Also price the two per-conference play-in markets. Careful: these settle on finishing 7th to 10th, which is NOT making the playoffs, so they are compared against a different column. They are also far less liquid.",
            "default": false
          },
          "includeChampionshipMarket": {
            "title": "Include the championship market",
            "type": "boolean",
            "description": "Also price the outright title market by simulating the full bracket, including home court and the play-in.",
            "default": false
          },
          "edgeThreshold": {
            "title": "Edge threshold",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "How far the model has to be from the market before a row is called VALUE.",
            "default": 0.05
          },
          "feeRate": {
            "title": "Fee rate",
            "minimum": 0,
            "maximum": 0.5,
            "type": "number",
            "description": "Kalshi's taker fee coefficient. The fee per contract is rate x price x (1 - price). Assuming taker is deliberate and conservative; a maker pays roughly a quarter of it.",
            "default": 0.07
          },
          "bankroll": {
            "title": "Bankroll",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. With a bankroll set, each VALUE row gets a quarter-Kelly position size, capped per position and in total. Leave at 0 for no sizing.",
            "default": 0
          },
          "maxPerPositionPct": {
            "title": "Max per position",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on any single position as a percentage of bankroll.",
            "default": 5
          },
          "maxTotalExposurePct": {
            "title": "Max total exposure",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on the sum of all suggested positions as a percentage of bankroll.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}