{
  "openapi": "3.0.1",
  "info": {
    "title": "MLB Playoff Odds API — Monte Carlo Simulator & Value Bets",
    "description": "MLB playoff odds as data, not a web page. Monte Carlo replays every remaining game on the real schedule for division, wild card, postseason and top-seed probabilities for all 30 baseball teams, plus projected records, value bets vs sportsbook odds and Kelly bet sizing. No API key.",
    "version": "0.0",
    "x-build-id": "7SrQ5rdaSE3nYa1aS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/commodus67~mlb-playoff-odds-monte-carlo/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-commodus67-mlb-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~mlb-playoff-odds-monte-carlo/runs": {
      "post": {
        "operationId": "runs-sync-commodus67-mlb-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~mlb-playoff-odds-monte-carlo/run-sync": {
      "post": {
        "operationId": "run-sync-commodus67-mlb-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": 200,
            "maximum": 200000,
            "type": "integer",
            "description": "How many full seasons to simulate. More iterations give smoother probabilities and cost a little more time. 10000 is plenty for stable numbers; the run takes a few seconds either way.",
            "default": 10000
          },
          "season": {
            "title": "Season year (optional)",
            "type": "integer",
            "description": "Leave empty to use the current season. Set a year to project a past season from where it stood, which is useful for backtesting the model."
          },
          "archiveToNamedDataset": {
            "title": "Archive to a named dataset (optional)",
            "type": "string",
            "description": "Leave empty for a normal run. If you put a name here, every run also appends its results to a named dataset in your account, which Apify keeps indefinitely instead of deleting it after a few weeks. Run it on a schedule and you build your own history of how the probabilities moved across the season, which is something you cannot reconstruct later. Use the same name every time, for example mlb-playoff-odds-history."
          },
          "regressionGames": {
            "title": "Regression to the mean, in games",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How strongly a partial season is pulled towards .500. Think of it as adding this many imaginary games at a .500 record. Around 70 is the usual choice for baseball. Lower it to trust the current record more, raise it to trust it less.",
            "default": 70
          },
          "pythagoreanWeight": {
            "title": "Weight on run differential",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "How much of the strength estimate comes from runs scored and allowed (Pythagorean expectation) rather than the raw win-loss record. Run differential predicts future wins better than the record itself, so the default leans on it.",
            "default": 0.6
          },
          "homeFieldAdvantage": {
            "title": "Home field advantage (log-odds)",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Added to the home team's strength in every simulated game. The default of 0.16 corresponds to roughly a 54 percent win rate for the home side between evenly matched teams, which is the long-run MLB average.",
            "default": 0.16
          },
          "strengthUncertainty": {
            "title": "Strength uncertainty",
            "minimum": 0,
            "maximum": 0.5,
            "type": "number",
            "description": "How unsure the model is about each team's true talent. Every simulated season draws a slightly different version of each team. Setting this to zero makes the output far too confident, because the favourite then wins almost every time.",
            "default": 0.1
          },
          "edgeThreshold": {
            "title": "Minimum edge to flag value",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "A team is flagged in the hasValue column when the model probability beats the market probability you supplied by at least this much. 0.05 means five percentage points.",
            "default": 0.05
          },
          "bankroll": {
            "title": "Bankroll for position sizing",
            "minimum": 1,
            "type": "integer",
            "description": "Your total betting capital, in dollars. It only scales the sizing columns: suggestedContracts and suggested stake grow with it. The suggestedFractionOfBankroll column is independent of this number, so it stays meaningful whatever capital you run.",
            "default": 1000
          },
          "maxPerPositionPct": {
            "title": "Max stake per position",
            "minimum": 0.0001,
            "maximum": 1,
            "type": "number",
            "description": "Hard ceiling on any single bet, as a fraction of bankroll. 0.02 means no position ever exceeds 2% of your capital. Quarter-Kelly sizing is clipped to this ceiling, and the kellyFractionUncapped column shows what the model wanted before the clip.",
            "default": 0.02
          },
          "maxTotalExposurePct": {
            "title": "Max total portfolio exposure",
            "minimum": 0.0001,
            "maximum": 1,
            "type": "number",
            "description": "Ceiling on the sum of all open positions, as a fraction of bankroll. This divided by the per-position ceiling is how many bets actually fit: at the defaults, 6% over 2% means three. Qualifying bets beyond that are still marked VALUE but come back with zero contracts and cappedByPortfolioLimit set to true.",
            "default": 0.06
          },
          "marketProbabilities": {
            "title": "Market probabilities (optional)",
            "type": "array",
            "description": "Bookmaker implied probabilities to compare against, so the output shows where the model disagrees with the market. Each entry needs a team name, a market of either playoff or division, and a probability between 0 and 1. Example: [{ \"team\": \"New York Yankees\", \"market\": \"playoff\", \"impliedProbability\": 0.78 }]",
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}