{
  "openapi": "3.0.1",
  "info": {
    "title": "NHL Advanced Stats Scraper: MoneyPuck xG, Corsi, Odds",
    "description": "Scrape NHL expected goals, Corsi, on-ice splits, line combos, playoff odds and game win probabilities back to the 2008-09 season.",
    "version": "0.1",
    "x-build-id": "frz6N31sufZhoIHQx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~nhl-advanced-stats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-nhl-advanced-stats-scraper",
        "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/parseforge~nhl-advanced-stats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-nhl-advanced-stats-scraper",
        "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/parseforge~nhl-advanced-stats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-nhl-advanced-stats-scraper",
        "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": {
          "datasets": {
            "title": "Data to scrape",
            "type": "array",
            "description": "Which NHL tables to pull. Skaters, goalies, teams and lines are MoneyPuck season summaries; playoff odds are MoneyPuck simulations; schedule and standings come from the NHL public API; game logs are one row per game per entity.",
            "items": {
              "type": "string",
              "enum": [
                "skaters",
                "goalies",
                "teams",
                "lines",
                "playoffOdds",
                "gamePredictions",
                "schedule",
                "standings",
                "playerGameLogs",
                "teamGameLogs"
              ],
              "enumTitles": [
                "Skater season stats",
                "Goalie season stats",
                "Team season stats",
                "Line and pairing stats",
                "Playoff odds (simulations)",
                "Game win predictions",
                "Schedule and results",
                "Standings",
                "Player game logs",
                "Team game logs"
              ]
            },
            "default": [
              "skaters"
            ]
          },
          "season": {
            "title": "Season",
            "enum": [
              "latest",
              "2025",
              "2024",
              "2023",
              "2022",
              "2021",
              "2020",
              "2019",
              "2018",
              "2017",
              "2016",
              "2015",
              "2014",
              "2013",
              "2012",
              "2011",
              "2010",
              "2009",
              "2008"
            ],
            "type": "string",
            "description": "Season start year, MoneyPuck style: 2025 is the 2025-26 season. Leave on Latest to take the most recent published season automatically.",
            "default": "latest"
          },
          "gameType": {
            "title": "Game type",
            "enum": [
              "regular",
              "playoffs"
            ],
            "type": "string",
            "description": "Regular season or playoffs. Both are published for every season back to 2008-09.",
            "default": "regular"
          },
          "situations": {
            "title": "Game situations",
            "type": "array",
            "description": "MoneyPuck splits every table by situation. 'all' is the full-strength-plus-special-teams total; the others are the strength states.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "5on5",
                "5on4",
                "4on5",
                "other"
              ],
              "enumTitles": [
                "All situations",
                "5 on 5",
                "5 on 4 power play",
                "4 on 5 penalty kill",
                "Other strengths"
              ]
            },
            "default": [
              "all"
            ]
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: limited to 10 items (preview). Paid users: up to 1,000,000."
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Filter by team code. Historical codes are matched automatically, so LAK also matches the L.A rows used before 2017.",
            "items": {
              "type": "string",
              "enum": [
                "ANA",
                "ARI",
                "ATL",
                "BOS",
                "BUF",
                "CAR",
                "CBJ",
                "CGY",
                "CHI",
                "COL",
                "DAL",
                "DET",
                "EDM",
                "FLA",
                "LAK",
                "MIN",
                "MTL",
                "NJD",
                "NSH",
                "NYI",
                "NYR",
                "OTT",
                "PHI",
                "PIT",
                "SEA",
                "SJS",
                "STL",
                "TBL",
                "TOR",
                "UTA",
                "VAN",
                "VGK",
                "WPG",
                "WSH"
              ],
              "enumTitles": [
                "Anaheim Ducks",
                "Arizona Coyotes (historical)",
                "Atlanta Thrashers (historical)",
                "Boston Bruins",
                "Buffalo Sabres",
                "Carolina Hurricanes",
                "Columbus Blue Jackets",
                "Calgary Flames",
                "Chicago Blackhawks",
                "Colorado Avalanche",
                "Dallas Stars",
                "Detroit Red Wings",
                "Edmonton Oilers",
                "Florida Panthers",
                "Los Angeles Kings",
                "Minnesota Wild",
                "Montreal Canadiens",
                "New Jersey Devils",
                "Nashville Predators",
                "New York Islanders",
                "New York Rangers",
                "Ottawa Senators",
                "Philadelphia Flyers",
                "Pittsburgh Penguins",
                "Seattle Kraken",
                "San Jose Sharks",
                "St. Louis Blues",
                "Tampa Bay Lightning",
                "Toronto Maple Leafs",
                "Utah Mammoth",
                "Vancouver Canucks",
                "Vegas Golden Knights",
                "Winnipeg Jets",
                "Washington Capitals"
              ]
            }
          },
          "positions": {
            "title": "Positions",
            "type": "array",
            "description": "Skater positions as MoneyPuck labels them. Goalies live in their own dataset, not here.",
            "items": {
              "type": "string",
              "enum": [
                "C",
                "L",
                "R",
                "D"
              ],
              "enumTitles": [
                "Centre",
                "Left wing",
                "Right wing",
                "Defence"
              ]
            }
          },
          "playerName": {
            "title": "Player name contains",
            "type": "string",
            "description": "Case-insensitive substring match on the player name, for example 'McDavid'."
          },
          "playerIds": {
            "title": "Player IDs",
            "type": "array",
            "description": "NHL player IDs to pull game logs for, for example 8478402. When empty, the game-log datasets take the highest-ice-time players that pass the filters.",
            "items": {
              "type": "string"
            }
          },
          "minGamesPlayed": {
            "title": "Minimum games played",
            "minimum": 0,
            "type": "integer",
            "description": "Drop rows below this many games. Useful to cut the long tail of one-game call-ups."
          },
          "minIcetimeMinutes": {
            "title": "Minimum ice time (minutes)",
            "minimum": 0,
            "type": "number",
            "description": "Drop rows below this much total ice time in the season, in minutes."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "number",
            "description": "Drop skater rows below this many points."
          },
          "minXGoals": {
            "title": "Minimum expected goals",
            "minimum": 0,
            "type": "number",
            "description": "Drop rows below this many individual expected goals. Decimals are honoured, so 12.5 works."
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "First date for the schedule, game predictions and standings datasets, as YYYY-MM-DD. Defaults to seven days ago."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Last date for the schedule, game predictions and standings datasets, as YYYY-MM-DD. Defaults to today."
          },
          "maxGameLogEntities": {
            "title": "Max players or teams for game logs",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many players or teams the game-log datasets walk. Each one is a separate file download."
          },
          "includeDangerBreakdown": {
            "title": "Include shot danger breakdown",
            "type": "boolean",
            "description": "Adds low, medium and high danger shots, expected goals and goals to every row.",
            "default": false
          },
          "includeOnIceFor": {
            "title": "Include on-ice offence (for)",
            "type": "boolean",
            "description": "Adds the ~30 on-ice-for columns: shots, expected goals, rebounds and danger buckets while the player was on the ice.",
            "default": false
          },
          "includeOnIceAgainst": {
            "title": "Include on-ice defence (against)",
            "type": "boolean",
            "description": "Adds the ~30 on-ice-against columns, which is what a defensive-impact model needs.",
            "default": false
          },
          "includeZoneStarts": {
            "title": "Include zone starts and shift usage",
            "type": "boolean",
            "description": "Adds offensive, defensive, neutral and on-the-fly shift starts and ends, plus time on bench.",
            "default": false
          },
          "includeExpectedGoalsDetail": {
            "title": "Include expected-goals detail",
            "type": "boolean",
            "description": "Adds the expected rebound, freeze, play-stopped and score-adjusted components behind the xG number.",
            "default": false
          },
          "includeOffIceSplits": {
            "title": "Include off-ice splits",
            "type": "boolean",
            "description": "Adds the team's expected goals and shot attempts while the player was on the bench, plus the after-shift carryover columns.",
            "default": false
          },
          "includePlayerBio": {
            "title": "Include player biography",
            "type": "boolean",
            "description": "Looks each skater or goalie up in the NHL public API and adds height, weight, birth date and place, shoots or catches, draft position and headshot.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}