Skip to main content
Version: 0.1.5

NFL — nflpro — Defense

nfl_pro_defense_overview_season​

GET /api/secured/stats/defense/overview/season — one row per defender for the season — defensive overview incl. snap counts, pressures and havoc stops.

Endpoint URL: GET https://pro.nfl.com/api/secured/stats/defense/overview/season

Valid URL: https://pro.nfl.com/api/secured/stats/defense/overview/season?season=2024&seasonType=REG&limit=500

API ParameterPythonPatternRequiredNullableDescription
seasonseasonYSeason, as the STARTING year (2024 = the 2024-25 NFL season).
seasonTypeseason_typeYSeason type code (string): PRE, REG, or POST -- not ESPN's numeric 1/2/3.
limitlimitYPage size. Responses truncate silently at this many rows; the getter pages on offset until it has them all.
offsetoffsetYZero-based row offset. The getter pages on this automatically; set it only to fetch a specific slice.
sortKeysort_keyYField name to sort by, e.g. epa.
sortValuesort_valueYSort direction: ASC or DESC.
qualifiedDefenderqualifiedYRestrict to players meeting the league qualifying threshold.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
nfl_idcharacterNFL player id (nflId) as a string; the key the wrappers accept as nfl_id.
display_namecharacterPlayer's full display name (e.g. 'Aaron Rodgers').
short_namecharacterPlayer's abbreviated name, first initial and surname (e.g. 'A.Rodgers').
headshotcharacterNFL headshot image URL template; the {formatInstructions} token must be replaced with a Cloudinary transform (e.g. t_headshot_desktop) before use.
team_idcharacterNFL team id as a zero-padded string (e.g. '0200', '3430'); casting it to a number drops the leading zero.
jersey_numberintegerJersey number the player wore in the season.
positioncharacterRoster position abbreviation (e.g. QB, WR, CB).
position_groupcharacterPosition group the roster position rolls up to (e.g. QB, RB, WR, TE, DB).
ngs_positioncharacterPosition Next Gen Stats assigns from tracking data; null for players NGS has not classified.
ngs_position_groupcharacterPosition group of ngs_position; null when ngs_position is null.
gpintegerGames played in the season (and season type) -- the denominator of every *_pg per-game column.
gsintegerGames started in the season.
tgintegerGames the player's team played while he was on the roster; equals gp in sampled data.
total_tgintegerTotal games the player's team played in the season type (17 for a full regular season).
snapintegerDefensive snaps played, season total.
snap_pctdoubleShare of the team's defensive snaps the player played (snap / team_snap).
rdinteger
printegerPass-rush snaps, season total; the denominator of qbp_r.
tckintegerTackles, season total.
t_stopinteger
h_stopinteger
qbpintegerQuarterback pressures, season total.
qbp_rdoublePressure rate: pressures per pass-rush snap (qbp / pr).
sackdoubleSacks, season total (a count, not a per-play flag).
tgt_ndintegerTargets on which the player was the nearest defender, season total, per Next Gen Stats.
rec_ndintegerReceptions allowed as the nearest defender, season total.
rec_yds_ndintegerReceiving yards allowed as the nearest defender, season total.
rec_td_ndintegerReceiving touchdowns allowed as the nearest defender, season total.
intintegerInterceptions made, season total (a count, not a per-play flag).
pass_rating_nddoublePasser rating allowed on targets where the player was the nearest defender.
qdlogicalWhether the defender meets the league qualifying threshold for the table (the qualified filter).
game_snapintegerDefensive snaps the player played, season total; equals snap on the overview table.
team_snapintegerDefensive snaps the player's team played, season total; the denominator of snap_pct.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

nfl_pro_defense_overview_season(season=2024, season_type='REG')

Last validated n/a.

nfl_pro_defense_overview_week​

GET /api/secured/stats/defense/overview/week — one row per defender per week — defensive overview incl. snap counts, pressures and havoc stops.

Endpoint URL: GET https://pro.nfl.com/api/secured/stats/defense/overview/week

Valid URL: https://pro.nfl.com/api/secured/stats/defense/overview/week?season=2024&seasonType=REG&limit=500

API ParameterPythonPatternRequiredNullableDescription
seasonseasonYSeason, as the STARTING year (2024 = the 2024-25 NFL season).
seasonTypeseason_typeYSeason type code (string): PRE, REG, or POST -- not ESPN's numeric 1/2/3.
limitlimitYPage size. Responses truncate silently at this many rows; the getter pages on offset until it has them all.
offsetoffsetYZero-based row offset. The getter pages on this automatically; set it only to fetch a specific slice.
sortKeysort_keyYField name to sort by, e.g. epa.
sortValuesort_valueYSort direction: ASC or DESC.
qualifiedDefenderqualifiedYRestrict to players meeting the league qualifying threshold.
nflIdnfl_idYOptional player filter; omit for the whole league-week table. Note week is a path scope here, not a query param.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
nfl_idcharacterNFL player id (nflId) as a string; the key the wrappers accept as nfl_id.
display_namecharacterPlayer's full display name (e.g. 'Aaron Rodgers').
short_namecharacterPlayer's abbreviated name, first initial and surname (e.g. 'A.Rodgers').
headshotcharacterNFL headshot image URL template; the {formatInstructions} token must be replaced with a Cloudinary transform (e.g. t_headshot_desktop) before use.
team_idcharacterNFL team id as a zero-padded string (e.g. '0200', '3430'); casting it to a number drops the leading zero.
jersey_numberintegerJersey number the player wore in the season.
positioncharacterRoster position abbreviation (e.g. QB, WR, CB).
position_groupcharacterPosition group the roster position rolls up to (e.g. QB, RB, WR, TE, DB).
ngs_positioncharacterPosition Next Gen Stats assigns from tracking data; null for players NGS has not classified.
ngs_position_groupcharacterPosition group of ngs_position; null when ngs_position is null.
gpintegerGames played in the season (and season type) -- the denominator of every *_pg per-game column.
gsintegerGames started in the season.
tgintegerGames the player's team played while he was on the roster; equals gp in sampled data.
total_tgintegerTotal games the player's team played in the season type (17 for a full regular season).
week_slugcharacterWeek slug of the game (e.g. 'WEEK_1', 'WEEK_18'); the week scope of the row.
game_idintegerNFL game id as an integer (e.g. 2024090900, the date followed by a two-digit sequence).
fapi_game_idcharacterNFL Football API (FAPI) UUID of the game, the id api.nfl.com uses for the same game.
opponent_team_idcharacterOpponent's NFL team id as a zero-padded string.
is_homelogicalWhether the player's team was the home team in the game.
final_scorecharacterFinal score as 'own-opponent' (e.g. '19-32' for a 32-19 loss).
game_resultcharacterResult from the player's team's side: 'W', 'L' or 'T'.
snapintegerDefensive snaps played in the game.
snap_pctdoubleShare of the team's defensive snaps the player played (snap / team_snap).
rdinteger
printegerPass-rush snaps in the game; the denominator of qbp_r.
tckintegerTackles in the game.
t_stopinteger
h_stopinteger
qbpintegerQuarterback pressures in the game.
qbp_rdoublePressure rate: pressures per pass-rush snap (qbp / pr).
sackintegerSacks in the game (a count, not a per-play flag).
tgt_ndintegerTargets on which the player was the nearest defender in the game, per Next Gen Stats.
rec_ndintegerReceptions allowed as the nearest defender in the game.
rec_yds_ndintegerReceiving yards allowed as the nearest defender in the game.
rec_td_ndintegerReceiving touchdowns allowed as the nearest defender in the game.
intintegerInterceptions made in the game (a count, not a per-play flag).
pass_rating_nddoublePasser rating allowed on targets where the player was the nearest defender.
qdlogicalWhether the defender meets the league qualifying threshold for the table (the qualified filter).
game_snapintegerDefensive snaps the player played in the game; equals snap on the overview table.
team_snapintegerDefensive snaps the player's team played in the game; the denominator of snap_pct.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

nfl_pro_defense_overview_week(season=2024, season_type='REG')

Last validated n/a.

nfl_pro_defense_nearest_season​

GET /api/secured/stats/defense/nearest/season — one row per defender for the season — nearest-defender coverage incl. targets, catch rate and CROE allowed.

Endpoint URL: GET https://pro.nfl.com/api/secured/stats/defense/nearest/season

Valid URL: https://pro.nfl.com/api/secured/stats/defense/nearest/season?season=2024&seasonType=REG&limit=500

API ParameterPythonPatternRequiredNullableDescription
seasonseasonYSeason, as the STARTING year (2024 = the 2024-25 NFL season).
seasonTypeseason_typeYSeason type code (string): PRE, REG, or POST -- not ESPN's numeric 1/2/3.
limitlimitYPage size. Responses truncate silently at this many rows; the getter pages on offset until it has them all.
offsetoffsetYZero-based row offset. The getter pages on this automatically; set it only to fetch a specific slice.
sortKeysort_keyYField name to sort by, e.g. epa.
sortValuesort_valueYSort direction: ASC or DESC.
qualifiedDefenderqualifiedYRestrict to players meeting the league qualifying threshold.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
nfl_idcharacterNFL player id (nflId) as a string; the key the wrappers accept as nfl_id.
display_namecharacterPlayer's full display name (e.g. 'Aaron Rodgers').
short_namecharacterPlayer's abbreviated name, first initial and surname (e.g. 'A.Rodgers').
headshotcharacterNFL headshot image URL template; the {formatInstructions} token must be replaced with a Cloudinary transform (e.g. t_headshot_desktop) before use.
team_idcharacterNFL team id as a zero-padded string (e.g. '0200', '3430'); casting it to a number drops the leading zero.
jersey_numberintegerJersey number the player wore in the season.
positioncharacterRoster position abbreviation (e.g. QB, WR, CB).
position_groupcharacterPosition group the roster position rolls up to (e.g. QB, RB, WR, TE, DB).
ngs_positioncharacterPosition Next Gen Stats assigns from tracking data; null for players NGS has not classified.
ngs_position_groupcharacterPosition group of ngs_position; null when ngs_position is null.
gpintegerGames played in the season (and season type) -- the denominator of every *_pg per-game column.
gsintegerGames started in the season.
tgintegerGames the player's team played while he was on the roster; equals gp in sampled data.
total_tgintegerTotal games the player's team played in the season type (17 for a full regular season).
covinteger
cov_ndinteger
tgt_ndintegerTargets on which the player was the nearest defender, season total, per Next Gen Stats.
rec_ndintegerReceptions allowed as the nearest defender, season total.
rec_yds_ndintegerReceiving yards allowed as the nearest defender, season total.
rec_td_ndintegerReceiving touchdowns allowed as the nearest defender, season total.
intintegerInterceptions made, season total (a count, not a per-play flag).
pass_rating_nddoublePasser rating allowed on targets where the player was the nearest defender.
catch_nddoubleCatch rate allowed as the nearest defender (rec_nd / tgt_nd), as a fraction.
croe_nddoubleCatch rate over expected allowed as the nearest defender (actual minus expected catch rate), per Next Gen Stats.
tgt_epa_nddoubleTotal expected points added allowed on targets where the player was the nearest defender.
tgt_r_nddoubleTarget rate as the nearest defender: share of coverage snaps on which the receiver he covered was targeted.
sepdoubleAverage separation in yards allowed at pass arrival as the nearest defender, per Next Gen Stats.
twf_pctdouble
bh_pctdouble
yacpr_nddouble
qdlogicalWhether the defender meets the league qualifying threshold for the table (the qualified filter).
game_snapintegerDefensive snaps the player played, season total; equals snap on the overview table.
team_snapintegerDefensive snaps the player's team played, season total; the denominator of snap_pct.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

nfl_pro_defense_nearest_season(season=2024, season_type='REG')

Last validated n/a.

nfl_pro_defense_nearest_week​

GET /api/secured/stats/defense/nearest/week — one row per defender per week — nearest-defender coverage incl. targets, catch rate and CROE allowed.

Endpoint URL: GET https://pro.nfl.com/api/secured/stats/defense/nearest/week

Valid URL: https://pro.nfl.com/api/secured/stats/defense/nearest/week?season=2024&seasonType=REG&limit=500

API ParameterPythonPatternRequiredNullableDescription
seasonseasonYSeason, as the STARTING year (2024 = the 2024-25 NFL season).
seasonTypeseason_typeYSeason type code (string): PRE, REG, or POST -- not ESPN's numeric 1/2/3.
limitlimitYPage size. Responses truncate silently at this many rows; the getter pages on offset until it has them all.
offsetoffsetYZero-based row offset. The getter pages on this automatically; set it only to fetch a specific slice.
sortKeysort_keyYField name to sort by, e.g. epa.
sortValuesort_valueYSort direction: ASC or DESC.
qualifiedDefenderqualifiedYRestrict to players meeting the league qualifying threshold.
nflIdnfl_idYOptional player filter; omit for the whole league-week table. Note week is a path scope here, not a query param.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
nfl_idcharacterNFL player id (nflId) as a string; the key the wrappers accept as nfl_id.
display_namecharacterPlayer's full display name (e.g. 'Aaron Rodgers').
short_namecharacterPlayer's abbreviated name, first initial and surname (e.g. 'A.Rodgers').
headshotcharacterNFL headshot image URL template; the {formatInstructions} token must be replaced with a Cloudinary transform (e.g. t_headshot_desktop) before use.
team_idcharacterNFL team id as a zero-padded string (e.g. '0200', '3430'); casting it to a number drops the leading zero.
jersey_numberintegerJersey number the player wore in the season.
positioncharacterRoster position abbreviation (e.g. QB, WR, CB).
position_groupcharacterPosition group the roster position rolls up to (e.g. QB, RB, WR, TE, DB).
ngs_positioncharacterPosition Next Gen Stats assigns from tracking data; null for players NGS has not classified.
ngs_position_groupcharacterPosition group of ngs_position; null when ngs_position is null.
gpintegerGames played in the season (and season type) -- the denominator of every *_pg per-game column.
gsintegerGames started in the season.
tgintegerGames the player's team played while he was on the roster; equals gp in sampled data.
total_tgintegerTotal games the player's team played in the season type (17 for a full regular season).
week_slugcharacterWeek slug of the game (e.g. 'WEEK_1', 'WEEK_18'); the week scope of the row.
game_idintegerNFL game id as an integer (e.g. 2024090900, the date followed by a two-digit sequence).
fapi_game_idcharacterNFL Football API (FAPI) UUID of the game, the id api.nfl.com uses for the same game.
opponent_team_idcharacterOpponent's NFL team id as a zero-padded string.
is_homelogicalWhether the player's team was the home team in the game.
final_scorecharacterFinal score as 'own-opponent' (e.g. '19-32' for a 32-19 loss).
game_resultcharacterResult from the player's team's side: 'W', 'L' or 'T'.
covinteger
cov_ndinteger
tgt_ndintegerTargets on which the player was the nearest defender in the game, per Next Gen Stats.
rec_ndintegerReceptions allowed as the nearest defender in the game.
rec_yds_ndintegerReceiving yards allowed as the nearest defender in the game.
rec_td_ndintegerReceiving touchdowns allowed as the nearest defender in the game.
intintegerInterceptions made in the game (a count, not a per-play flag).
pass_rating_nddoublePasser rating allowed on targets where the player was the nearest defender.
catch_nddoubleCatch rate allowed as the nearest defender (rec_nd / tgt_nd), as a fraction.
croe_nddoubleCatch rate over expected allowed as the nearest defender (actual minus expected catch rate), per Next Gen Stats.
tgt_epa_nddoubleTotal expected points added allowed on targets where the player was the nearest defender.
tgt_r_nddoubleTarget rate as the nearest defender: share of coverage snaps on which the receiver he covered was targeted.
sepdoubleAverage separation in yards allowed at pass arrival as the nearest defender, per Next Gen Stats.
twf_pctinteger
bh_pctdouble
yacpr_nddouble
qdlogicalWhether the defender meets the league qualifying threshold for the table (the qualified filter).
game_snapintegerDefensive snaps the player played in the game; equals snap on the overview table.
team_snapintegerDefensive snaps the player's team played in the game; the denominator of snap_pct.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

nfl_pro_defense_nearest_week(season=2024, season_type='REG')

Last validated n/a.