{
  "openapi": "3.0.1",
  "info": {
    "title": "NHL Data Scraper — Stats, Standings, Rosters, Salaries & More",
    "version": "0.1",
    "x-build-id": "ajr7eLJopEpOQY6no"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tempting_finch~nhl-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tempting_finch-nhl-data-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/tempting_finch~nhl-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tempting_finch-nhl-data-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/tempting_finch~nhl-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tempting_finch-nhl-data-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",
        "required": [
          "seasons"
        ],
        "properties": {
          "seasons": {
            "title": "Seasons",
            "type": "array",
            "description": "NHL seasons to scrape, e.g. [\"20232024\", \"20242025\"]. Format: 4-digit start year + 4-digit end year.",
            "items": {
              "type": "string"
            }
          },
          "teams": {
            "title": "Teams",
            "type": "array",
            "description": "Team abbreviations to fetch (leave empty for all teams).",
            "items": {
              "type": "string",
              "enum": [
                "ANA",
                "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",
                "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 Hockey Club",
                "Vancouver Canucks",
                "Vegas Golden Knights",
                "Winnipeg Jets",
                "Washington Capitals"
              ]
            }
          },
          "players": {
            "title": "Player IDs",
            "type": "array",
            "description": "NHL player IDs to fetch stats for (leave empty to discover from selected seasons/teams).",
            "items": {
              "type": "string"
            }
          },
          "endpoints": {
            "title": "Data Endpoints",
            "type": "array",
            "description": "Select which data types to fetch. Each selected endpoint produces records with a corresponding dataType field.",
            "items": {
              "type": "string",
              "enum": [
                "standings",
                "schedule",
                "scores",
                "rosters",
                "playerStats",
                "playerGameLogs",
                "teamStats",
                "boxscores",
                "playByPlay",
                "playoffs",
                "draft",
                "edge",
                "logos",
                "coaches",
                "advancedStats",
                "transactions",
                "salaries",
                "trades"
              ],
              "enumTitles": [
                "Standings (season-by-season)",
                "Schedule (league + per-team)",
                "Daily Scores",
                "Rosters (current + historical)",
                "Player Stats & Leaders",
                "Player Game Logs",
                "Team Stats",
                "Game Boxscores",
                "Play-by-Play (with coordinates)",
                "Playoff Brackets & Series",
                "Draft Rankings & Picks",
                "EDGE Tracking (shot speed, skating, zone time)",
                "Team Logos (CDN URLs)",
                "Coaching Records [RISKY]",
                "Advanced Stats (xG, Corsi, SRS) [RISKY]",
                "Transactions / Trades [RISKY]",
                "Salary Cap & Contracts [RISKY]",
                "Trade Tracker [RISKY]"
              ]
            },
            "default": [
              "standings",
              "rosters",
              "playerStats"
            ]
          },
          "startDate": {
            "title": "Start Date",
            "type": "string",
            "description": "Filter games/events from this date (YYYY-MM-DD)."
          },
          "endDate": {
            "title": "End Date",
            "type": "string",
            "description": "Filter games/events up to this date (YYYY-MM-DD)."
          },
          "includeAdvancedStats": {
            "title": "Include Advanced Stats",
            "type": "boolean",
            "description": "Fetch EDGE tracking data and enhanced analytics (additional charges apply).",
            "default": false
          },
          "riskySources": {
            "title": "Enable Risky Sources (Coaches / Salaries / Trades)",
            "type": "boolean",
            "description": "WARNING: Enables scraping of Hockey-Reference and PuckPedia. These sites prohibit automated scraping in their ToS. Use at your own risk. Heavy rate limiting applied.",
            "default": false
          },
          "maxResultsPerEndpoint": {
            "title": "Max Results Per Endpoint",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records to return per endpoint group.",
            "default": 5000
          },
          "requestDelayMs": {
            "title": "Request Delay (ms)",
            "minimum": 100,
            "type": "integer",
            "description": "Milliseconds between requests (used for rate limiting on risky sources).",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}