NHL periods API
periods
nhl.periodsPer-period scores for every NHL game — the three regulation periods plus any overtime and the shootout, with the away and home goals in each. (Shots and penalties per period are not carried here.)
GET/api/v1/nhl/periodsList periods for NHL
Requires one of:
game_id — requests satisfying none of these return 400.Parameters
game_idquerybigintoptionalFilter to a single game.
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/periods?game_id=1'Responses
200periods rows matching the declared filter set, wrapped in { periods, 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(8 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. — (all-null in sample) | |
league_game_id | integer | — | Official NHL game ID (issued by the league; matches nhl.games.league_game_id). e.g. — (all-null in sample) |
period_id | integer | — | — e.g. — (all-null in sample) |
away_team_score | integer | — | — e.g. — (all-null in sample) |
home_team_score | integer | — | — e.g. — (all-null in sample) |
name | string | — | 1, 2, 3, OT, OT2, SO e.g. — (all-null in sample) |
period_number | integer | — | — e.g. — (all-null in sample) |
GET/api/v1/nhl/periods/{id}Get a single period by id
Parameters
idpathbigintrequiredPrimary key (id) of the period 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/periods/{pk_value}'Responses
200Single period row.application/jsonshow example ▸
404Row not found.
Response Schema(8 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. — (all-null in sample) | |
league_game_id | integer | — | Official NHL game ID (issued by the league; matches nhl.games.league_game_id). e.g. — (all-null in sample) |
period_id | integer | — | — e.g. — (all-null in sample) |
away_team_score | integer | — | — e.g. — (all-null in sample) |
home_team_score | integer | — | — e.g. — (all-null in sample) |
name | string | — | 1, 2, 3, OT, OT2, SO e.g. — (all-null in sample) |
period_number | integer | — | — e.g. — (all-null in sample) |