{
  "openapi": "3.0.1",
  "info": {
    "title": "US Sports Probability Engine: NFL, NBA, MLB & NHL",
    "description": "Statistical win probabilities, expected scores, totals (over/under) and spreads for every NFL, NBA, MLB and NHL game. Poisson / Negative Binomial and Gaussian models with home advantage, back-to-back fatigue and time decay, plus market edge and a public walk-forward calibration backtest.",
    "version": "1.0",
    "x-build-id": "RYo9ZUKY1fh9MWyJX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jenko_systems~us-sports-probability-engine/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jenko_systems-us-sports-probability-engine",
        "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/jenko_systems~us-sports-probability-engine/runs": {
      "post": {
        "operationId": "runs-sync-jenko_systems-us-sports-probability-engine",
        "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/jenko_systems~us-sports-probability-engine/run-sync": {
      "post": {
        "operationId": "run-sync-jenko_systems-us-sports-probability-engine",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "predictions",
              "matchup",
              "power_rankings",
              "team",
              "calibration"
            ],
            "type": "string",
            "description": "predictions = probabilities for upcoming games (default). matchup = any two teams. power_rankings = model ratings for every team. team = one team's rating, last 10 results and next games. calibration = walk-forward backtest of the model (accuracy, Brier score, calibration bins).",
            "default": "predictions"
          },
          "league": {
            "title": "League",
            "enum": [
              "all",
              "nfl",
              "nba",
              "mlb",
              "nhl"
            ],
            "type": "string",
            "description": "Which championship to analyze. 'all' runs every league that has games in the period (leagues in off-season are skipped).",
            "default": "all"
          },
          "day": {
            "title": "Game day",
            "enum": [
              "today",
              "tomorrow",
              "today_and_tomorrow"
            ],
            "type": "string",
            "description": "Which slate to analyze, by the leagues' own calendar (US Eastern time): today (default), tomorrow, or both. Games already started or finished today are included too (pre-game probabilities + final score). NFL: when there are no games today/tomorrow, the next game day within 7 days is returned.",
            "default": "today"
          },
          "team": {
            "title": "Team",
            "type": "string",
            "description": "Abbreviation or name (e.g. BOS, Lakers, New York Yankees). In 'predictions' it filters that team's game; in 'team' mode it picks the team (empty = top-rated team)."
          },
          "home_team": {
            "title": "Home team (matchup)",
            "type": "string",
            "description": "Matchup mode only. Empty = the #1 team in the power rankings."
          },
          "away_team": {
            "title": "Away team (matchup)",
            "type": "string",
            "description": "Matchup mode only. Empty = the #2 team in the power rankings."
          },
          "neutral_site": {
            "title": "Neutral site (matchup)",
            "type": "boolean",
            "description": "Matchup mode only: removes home advantage.",
            "default": false
          },
          "total_line": {
            "title": "Total line to price (matchup)",
            "type": "number",
            "description": "Matchup mode only: over/under line to price (e.g. 6.5 goals, 224.5 points). Empty = lines around the expected total."
          },
          "home_spread": {
            "title": "Home spread to price (matchup)",
            "type": "number",
            "description": "Matchup mode only: home handicap (e.g. -1.5, -6.5). Empty = automatic."
          },
          "top_n": {
            "title": "Top N (power rankings)",
            "minimum": 1,
            "type": "integer",
            "description": "Power rankings only: how many teams to return. Empty = all."
          },
          "backtest_days": {
            "title": "Backtest window in days (calibration)",
            "minimum": 14,
            "maximum": 300,
            "type": "integer",
            "description": "Calibration only: how many past days to evaluate with weekly refits. Default 60."
          },
          "include_market": {
            "title": "Compare with market line",
            "type": "boolean",
            "description": "When a betting line is published for the game, add the no-vig market probability and the model's edge.",
            "default": true
          },
          "summary_only": {
            "title": "Summary only (compact output for AI agents)",
            "type": "boolean",
            "description": "Drops the detailed blocks (totals ladder, team totals, most likely scores, model info) and keeps the headline probabilities.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}