STAT-API

NHL penalties API

penaltiesnhl.penalties
Every penalty assessed in every NHL game — the player penalized, the infraction (hooking, tripping, slashing, etc.), the minutes assessed (2-minute minor, 4-minute double minor, 5-minute major, game misconduct, match penalty), and the resulting power play.
GET/api/v1/nhl/penalties
Requires one of: game_id — requests satisfying none of these return 400.
Parameters
game_idquerybigintoptional
Filter to a single game.
team_idquerybigintoptional
Filter by penalized team.
limitqueryintegeroptionaldefault 50
Page size. Defaults to 50; max 5000.
from_idquerybigintoptional
Return 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/penalties?game_id=1'
Responses
200penalties rows matching the declared filter set, wrapped in { penalties, 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/json
Response Schema(12 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
drawn_by_player_id
bigintnullable—
e.g. 453
game_id
bigint—
e.g. 4002
penalty_id
integer——
e.g. 36
player_id
bigintnullable—
e.g. 1189
team_id
bigint—
e.g. 16
description
stringnullable——
e.g. — (all-null in sample)
is_bench_penalty
boolean——
Values:falsetrue
penalty_minutes
integer——
e.g. 2
penalty_type
string——
e.g. tripping
period_number
integer——
e.g. 2
time_remaining
string—Time remaining in period (MM:SS)
e.g. 00:00
GET/api/v1/nhl/penalties/{id}
Parameters
idpathbigintrequired
Primary key (id) of the penalty 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/penalties/{pk_value}'
Responses
200Single penalty row.application/jsonshow example ▸
404Row not found.
Response Schema(12 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
drawn_by_player_id
bigintnullable—
e.g. 453
game_id
bigint—
e.g. 4002
penalty_id
integer——
e.g. 36
player_id
bigintnullable—
e.g. 1189
team_id
bigint—
e.g. 16
description
stringnullable——
e.g. — (all-null in sample)
is_bench_penalty
boolean——
Values:falsetrue
penalty_minutes
integer——
e.g. 2
penalty_type
string——
e.g. tripping
period_number
integer——
e.g. 2
time_remaining
string—Time remaining in period (MM:SS)
e.g. 00:00