NHL team_game_contexts API
team_game_contexts
nhl.team_game_contextsSchedule context of each NHL team in each game — game number, games left, share of the season played, rest days and back-to-backs for the team and its opponent.
GET/api/v1/nhl/team_game_contextsList team_game_contexts for NHL
Requires one of:
game_id or season_id + team_id — requests satisfying none of these return 400.Parameters
game_idquerybigintoptionalFilter to a single game.
team_idquerybigintoptionalFilter by team.
season_idquerybigintoptionalFilter by season.
limitqueryintegeroptionaldefault 50Page size. Defaults to 50; max 5000.
from_idquerybigintoptionalReturn rows with id strictly greater than this value; page using the previous response's `next_from_id`. Omit on the first page.
Restores the documented defaults (trial keys only accept the unchanged defaults).
Request
curl -sS --compressed \
-H 'Authorization: Bearer YOUR_API_KEY' \
'https://api.stat-api.com/api/v1/nhl/team_game_contexts?game_id=1'Responses
200team_game_contexts rows matching the declared filter set, wrapped in { team_game_contexts, limit, next_from_id, has_more }. has_more is true when another row follows this page. To walk every row, start with ?from_id=0 and pass each next_from_id back as from_id until it is null; the filters stay. A first page without from_id comes in the default order and gives next_from_id null.application/jsonshow example ▸
400No declared filter set was satisfied — response body matches MissingRequiredFiltersError; pick one combo from the accepted-sets hint and resend.
application/jsonResponse Schema(14 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. 3020 | |
opponent_team_id | bigint | — | — e.g. 4 |
season_id | bigint | — e.g. 2021 | |
team_id | bigint | — e.g. 4 | |
game_number | integer | — | — e.g. 1 |
games_remaining | integer | — | — e.g. 5 |
is_back_to_back | boolean | — | — Values:falsetrue |
is_home | boolean | — | — Values:falsetrue |
opponent_is_back_to_back | boolean | — | — Values:falsetrue |
opponent_rest_days | integernullable | — | — e.g. 1 |
rest_days | integernullable | — | Full days since the team's previous game (0 = back-to-back; empty for its first game) e.g. 1 |
season_pct | decimal | — | 0.0-1.0 share of the team's games of this season type played, this one included e.g. 1.0000 |
season_type | string | — | — Values:regular_seasonpostseason |
GET/api/v1/nhl/team_game_contexts/{id}Get a single team_game_context by id
Parameters
idpathbigintrequiredPrimary key (id) of the team_game_context row.
Restores the documented defaults (trial keys only accept the unchanged defaults).
Request
curl -sS --compressed \
-H 'Authorization: Bearer YOUR_API_KEY' \
'https://api.stat-api.com/api/v1/nhl/team_game_contexts/{pk_value}'Responses
200Single team_game_context row.application/jsonshow example ▸
404Row not found.
Response Schema(14 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. 3020 | |
opponent_team_id | bigint | — | — e.g. 4 |
season_id | bigint | — e.g. 2021 | |
team_id | bigint | — e.g. 4 | |
game_number | integer | — | — e.g. 1 |
games_remaining | integer | — | — e.g. 5 |
is_back_to_back | boolean | — | — Values:falsetrue |
is_home | boolean | — | — Values:falsetrue |
opponent_is_back_to_back | boolean | — | — Values:falsetrue |
opponent_rest_days | integernullable | — | — e.g. 1 |
rest_days | integernullable | — | Full days since the team's previous game (0 = back-to-back; empty for its first game) e.g. 1 |
season_pct | decimal | — | 0.0-1.0 share of the team's games of this season type played, this one included e.g. 1.0000 |
season_type | string | — | — Values:regular_seasonpostseason |