{
  "openapi": "3.0.1",
  "info": {
    "title": "Football (Soccer) Monte Carlo Season Predictor",
    "description": "Soccer betting odds model for 17 leagues: Premier League, LaLiga, Serie A, Bundesliga, Ligue 1, Liga MX, Brasileirao, MLS and more. Monte Carlo replays every remaining fixture for fair title, top-four, playoff and relegation probabilities, plus value bets vs bookmaker odds. No API key.",
    "version": "0.0",
    "x-build-id": "u0uQgWDKIvV0I7Uam"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/commodus67~football-soccer-monte-carlo-predictor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-commodus67-football-soccer-monte-carlo-predictor",
        "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~football-soccer-monte-carlo-predictor/runs": {
      "post": {
        "operationId": "runs-sync-commodus67-football-soccer-monte-carlo-predictor",
        "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~football-soccer-monte-carlo-predictor/run-sync": {
      "post": {
        "operationId": "run-sync-commodus67-football-soccer-monte-carlo-predictor",
        "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": {
          "leagues": {
            "title": "Leagues (ESPN soccer league slugs)",
            "type": "array",
            "description": "ESPN soccer league slugs to analyze. Europe: eng.1 (Premier League), eng.2 (Championship), esp.1 (LaLiga), ita.1 (Serie A), ger.1 (Bundesliga), fra.1 (Ligue 1), ned.1, por.1, tur.1, bel.1, sco.1. Americas: bra.1 (Brasileirao), mex.1 (Liga MX), arg.1 (Liga Profesional), col.1 (Primera A), usa.1 (MLS). Any other ESPN soccer slug also works.",
            "default": [
              "eng.1"
            ],
            "items": {
              "type": "string"
            }
          },
          "iterations": {
            "title": "Monte Carlo iterations",
            "minimum": 100,
            "maximum": 20000,
            "type": "integer",
            "description": "Number of simulated seasons. More iterations are more accurate but slower.",
            "default": 2000
          },
          "historySeasons": {
            "title": "Historical seasons used as baseline",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many past seasons to blend into each team strength. This keeps predictions realistic before a season starts, when no matches have been played yet. More recent seasons carry more weight. Set to 0 to use current form only.",
            "default": 3
          },
          "homeAdvantage": {
            "title": "Home advantage",
            "minimum": 0,
            "maximum": 1.5,
            "type": "number",
            "description": "Extra strength given to the home side of every remaining fixture, in the same units as team strength (points per game). The default of 0.34 reproduces the usual split of roughly 46 percent home wins, 21 percent draws and 33 percent away wins between evenly matched teams. Set to 0 to ignore venue.",
            "default": 0.34
          },
          "edgeThreshold": {
            "title": "Minimum edge to flag value",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Minimum difference between fair title probability and market probability to mark hasValue as true.",
            "default": 0.05
          },
          "includeInjuries": {
            "title": "Adjust for injuries and suspensions",
            "type": "boolean",
            "description": "Reduces the strength of teams that are missing players through injury or suspension. Off by default. Needs your own API-Football key below, on a plan that covers the season you are simulating: their free tier only serves seasons 2022 to 2024, so it will not return absences for the current one.",
            "default": false
          },
          "apiFootballKey": {
            "title": "API-Football key (optional)",
            "type": "string",
            "description": "Your own API-Football key, used only to read injury and suspension data, one request per league per run. Get it from the My Access page of the api-football.com dashboard. Note that their free tier does not cover the current season, so the adjustment only returns real numbers on a plan that does. Leave empty to skip it; every other feature works without a key."
          },
          "apiFootballLeagueIds": {
            "title": "API-Football league id overrides (optional)",
            "type": "object",
            "description": "Only needed for leagues the Actor does not map automatically. Maps an ESPN league slug to an API-Football league id, for example {\"eng.1\": 39}.",
            "default": {}
          },
          "marketProbabilities": {
            "title": "Market probabilities (optional)",
            "type": "array",
            "description": "Optional list of your own market odds converted to probabilities, used to compute the edge. Each item: { team, league, marketProbability }.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}