STAT-API

NHL scoring_plays API

scoring_playsnhl.scoring_plays
Every goal scored in every NHL game — the scorer, the assists, the goaltender beaten, the strength (even strength, power play, short-handed), and the score state when the goal went in.
GET/api/v1/nhl/scoring_plays
Requires one of: game_id — requests satisfying none of these return 400.
Parameters
game_idquerybigintoptional
Filter to a single game.
team_idquerybigintoptional
Filter by scoring 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/scoring_plays?game_id=1'
Responses
200scoring_plays rows matching the declared filter set, wrapped in { scoring_plays, 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(13 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 4367
primary_assist_player_id
bigintnullable—
e.g. 1120
scored_by_player_id
bigintnullable—
e.g. 161
scoring_play_id
integer——
e.g. 99
secondary_assist_player_id
bigintnullable—
e.g. 126
team_id
bigint—
e.g. 7
away_team_score
integer——
e.g. 1
description
stringnullable——
e.g. — (all-null in sample)
goal_type
stringnullable——
Values:wristsnapslapbackhandtip-indeflectedwrap-aroundbatpoke
home_team_score
integer——
e.g. 1
period_number
integer——
e.g. 3
time_remaining
string—Time remaining in period (MM:SS)
e.g. 00:59
GET/api/v1/nhl/scoring_plays/{id}
Parameters
idpathbigintrequired
Primary key (id) of the scoring_play 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/scoring_plays/{pk_value}'
Responses
200Single scoring_play row.application/jsonshow example ▸
404Row not found.
Response Schema(13 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 4367
primary_assist_player_id
bigintnullable—
e.g. 1120
scored_by_player_id
bigintnullable—
e.g. 161
scoring_play_id
integer——
e.g. 99
secondary_assist_player_id
bigintnullable—
e.g. 126
team_id
bigint—
e.g. 7
away_team_score
integer——
e.g. 1
description
stringnullable——
e.g. — (all-null in sample)
goal_type
stringnullable——
Values:wristsnapslapbackhandtip-indeflectedwrap-aroundbatpoke
home_team_score
integer——
e.g. 1
period_number
integer——
e.g. 3
time_remaining
string—Time remaining in period (MM:SS)
e.g. 00:59