Skip to main content

NFL — NFL Pro API (pro.nfl.com, NFL+ Premium account) — 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_idStringNFL player id (nflId) as a string; the key the wrappers accept as nfl_id.
display_nameStringPlayer's full display name (e.g. 'Aaron Rodgers').
short_nameStringPlayer's abbreviated name, first initial and surname (e.g. 'A.Rodgers').
headshotStringNFL headshot image URL template; the {formatInstructions} token must be replaced with a Cloudinary transform (e.g. t_headshot_desktop) before use.
team_idStringNFL team id as a zero-padded string (e.g. '0200', '3430'); casting it to a number drops the leading zero.
jersey_numberInt64Jersey number the player wore in the season.
positionStringRoster position abbreviation (e.g. QB, WR, CB).
position_groupStringPosition group the roster position rolls up to (e.g. QB, RB, WR, TE, DB).
ngs_positionStringPosition Next Gen Stats assigns from tracking data; null for players NGS has not classified.
ngs_position_groupStringPosition group of ngs_position; null when ngs_position is null.
gpInt64Games played in the season (and season type) -- the denominator of every *_pg per-game column.
gsInt64Games started in the season.
tgInt64Games the player's team played while he was on the roster; equals gp in sampled data.
total_tgInt64Total games the player's team played in the season type (17 for a full regular season).
snapInt64Defensive snaps played, season total.
snap_pctFloat64Share of the team's defensive snaps the player played (snap / team_snap).
rdInt64
prInt64Pass-rush snaps, season total; the denominator of qbp_r.
tckInt64Tackles, season total.
t_stopInt64
h_stopInt64
qbpInt64Quarterback pressures, season total.
qbp_rFloat64Pressure rate: pressures per pass-rush snap (qbp / pr).
sackFloat64Sacks, season total (a count, not a per-play flag).
tgt_ndInt64Targets on which the player was the nearest defender, season total, per Next Gen Stats.
rec_ndInt64Receptions allowed as the nearest defender, season total.
rec_yds_ndInt64Receiving yards allowed as the nearest defender, season total.
rec_td_ndInt64Receiving touchdowns allowed as the nearest defender, season total.
intInt64Interceptions made, season total (a count, not a per-play flag).
pass_rating_ndFloat64Passer rating allowed on targets where the player was the nearest defender.
qdBooleanWhether the defender meets the league qualifying threshold for the table (the qualified filter).
game_snapInt64Defensive snaps the player played, season total; equals snap on the overview table.
team_snapInt64Defensive snaps the player's team played, season total; the denominator of snap_pct.

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

Raises​

ExceptionDescription
NFLProAuthErrorNo user-bound NFL Pro token could be resolved (pass token= or email=/password=, or set NFLPRO_TOKEN, or NFLPRO_EMAIL/NFLPRO_PW), or the resolved token carries no active NFL_PLUS_* plan, or pro.nfl.com answered 401 / 403 (an AssetFetchError).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. Pro.nfl.com answered 400 / 422, or ignored offset.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. Any other non-2xx or a connection failure after retries, or a 2xx whose body is not a JSON object or array -- including the HTTP 200 with an empty body that is how pro.nfl.com rejects unsupported query params.
NoDataErrorThe host answered 404 -- the requested resource does not exist.

Example​

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

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_idStringNFL player id (nflId) as a string; the key the wrappers accept as nfl_id.
display_nameStringPlayer's full display name (e.g. 'Aaron Rodgers').
short_nameStringPlayer's abbreviated name, first initial and surname (e.g. 'A.Rodgers').
headshotStringNFL headshot image URL template; the {formatInstructions} token must be replaced with a Cloudinary transform (e.g. t_headshot_desktop) before use.
team_idStringNFL team id as a zero-padded string (e.g. '0200', '3430'); casting it to a number drops the leading zero.
jersey_numberInt64Jersey number the player wore in the season.
positionStringRoster position abbreviation (e.g. QB, WR, CB).
position_groupStringPosition group the roster position rolls up to (e.g. QB, RB, WR, TE, DB).
ngs_positionStringPosition Next Gen Stats assigns from tracking data; null for players NGS has not classified.
ngs_position_groupStringPosition group of ngs_position; null when ngs_position is null.
gpInt64Games played in the season (and season type) -- the denominator of every *_pg per-game column.
gsInt64Games started in the season.
tgInt64Games the player's team played while he was on the roster; equals gp in sampled data.
total_tgInt64Total games the player's team played in the season type (17 for a full regular season).
week_slugStringWeek slug of the game (e.g. 'WEEK_1', 'WEEK_18'); the week scope of the row.
game_idInt64NFL game id as an integer (e.g. 2024090900, the date followed by a two-digit sequence).
fapi_game_idStringNFL Football API (FAPI) UUID of the game, the id api.nfl.com uses for the same game.
opponent_team_idStringOpponent's NFL team id as a zero-padded string.
is_homeBooleanWhether the player's team was the home team in the game.
final_scoreStringFinal score as 'own-opponent' (e.g. '19-32' for a 32-19 loss).
game_resultStringResult from the player's team's side: 'W', 'L' or 'T'.
snapInt64Defensive snaps played in the game.
snap_pctFloat64Share of the team's defensive snaps the player played (snap / team_snap).
rdInt64
prInt64Pass-rush snaps in the game; the denominator of qbp_r.
tckInt64Tackles in the game.
t_stopInt64
h_stopInt64
qbpInt64Quarterback pressures in the game.
qbp_rFloat64Pressure rate: pressures per pass-rush snap (qbp / pr).
sackInt64Sacks in the game (a count, not a per-play flag).
tgt_ndInt64Targets on which the player was the nearest defender in the game, per Next Gen Stats.
rec_ndInt64Receptions allowed as the nearest defender in the game.
rec_yds_ndInt64Receiving yards allowed as the nearest defender in the game.
rec_td_ndInt64Receiving touchdowns allowed as the nearest defender in the game.
intInt64Interceptions made in the game (a count, not a per-play flag).
pass_rating_ndFloat64Passer rating allowed on targets where the player was the nearest defender.
qdBooleanWhether the defender meets the league qualifying threshold for the table (the qualified filter).
game_snapInt64Defensive snaps the player played in the game; equals snap on the overview table.
team_snapInt64Defensive snaps the player's team played in the game; the denominator of snap_pct.

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

Raises​

ExceptionDescription
NFLProAuthErrorNo user-bound NFL Pro token could be resolved (pass token= or email=/password=, or set NFLPRO_TOKEN, or NFLPRO_EMAIL/NFLPRO_PW), or the resolved token carries no active NFL_PLUS_* plan, or pro.nfl.com answered 401 / 403 (an AssetFetchError).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. Pro.nfl.com answered 400 / 422, or ignored offset.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. Any other non-2xx or a connection failure after retries, or a 2xx whose body is not a JSON object or array -- including the HTTP 200 with an empty body that is how pro.nfl.com rejects unsupported query params.
NoDataErrorThe host answered 404 -- the requested resource does not exist.

Example​

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

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_idStringNFL player id (nflId) as a string; the key the wrappers accept as nfl_id.
display_nameStringPlayer's full display name (e.g. 'Aaron Rodgers').
short_nameStringPlayer's abbreviated name, first initial and surname (e.g. 'A.Rodgers').
headshotStringNFL headshot image URL template; the {formatInstructions} token must be replaced with a Cloudinary transform (e.g. t_headshot_desktop) before use.
team_idStringNFL team id as a zero-padded string (e.g. '0200', '3430'); casting it to a number drops the leading zero.
jersey_numberInt64Jersey number the player wore in the season.
positionStringRoster position abbreviation (e.g. QB, WR, CB).
position_groupStringPosition group the roster position rolls up to (e.g. QB, RB, WR, TE, DB).
ngs_positionStringPosition Next Gen Stats assigns from tracking data; null for players NGS has not classified.
ngs_position_groupStringPosition group of ngs_position; null when ngs_position is null.
gpInt64Games played in the season (and season type) -- the denominator of every *_pg per-game column.
gsInt64Games started in the season.
tgInt64Games the player's team played while he was on the roster; equals gp in sampled data.
total_tgInt64Total games the player's team played in the season type (17 for a full regular season).
covInt64
cov_ndInt64
tgt_ndInt64Targets on which the player was the nearest defender, season total, per Next Gen Stats.
rec_ndInt64Receptions allowed as the nearest defender, season total.
rec_yds_ndInt64Receiving yards allowed as the nearest defender, season total.
rec_td_ndInt64Receiving touchdowns allowed as the nearest defender, season total.
intInt64Interceptions made, season total (a count, not a per-play flag).
pass_rating_ndFloat64Passer rating allowed on targets where the player was the nearest defender.
catch_ndFloat64Catch rate allowed as the nearest defender (rec_nd / tgt_nd), as a fraction.
croe_ndFloat64Catch rate over expected allowed as the nearest defender (actual minus expected catch rate), per Next Gen Stats.
tgt_epa_ndFloat64Total expected points added allowed on targets where the player was the nearest defender.
tgt_r_ndFloat64Target rate as the nearest defender: share of coverage snaps on which the receiver he covered was targeted.
sepFloat64Average separation in yards allowed at pass arrival as the nearest defender, per Next Gen Stats.
twf_pctFloat64
bh_pctFloat64
yacpr_ndFloat64
qdBooleanWhether the defender meets the league qualifying threshold for the table (the qualified filter).
game_snapInt64Defensive snaps the player played, season total; equals snap on the overview table.
team_snapInt64Defensive snaps the player's team played, season total; the denominator of snap_pct.

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

Raises​

ExceptionDescription
NFLProAuthErrorNo user-bound NFL Pro token could be resolved (pass token= or email=/password=, or set NFLPRO_TOKEN, or NFLPRO_EMAIL/NFLPRO_PW), or the resolved token carries no active NFL_PLUS_* plan, or pro.nfl.com answered 401 / 403 (an AssetFetchError).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. Pro.nfl.com answered 400 / 422, or ignored offset.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. Any other non-2xx or a connection failure after retries, or a 2xx whose body is not a JSON object or array -- including the HTTP 200 with an empty body that is how pro.nfl.com rejects unsupported query params.
NoDataErrorThe host answered 404 -- the requested resource does not exist.

Example​

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

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_idStringNFL player id (nflId) as a string; the key the wrappers accept as nfl_id.
display_nameStringPlayer's full display name (e.g. 'Aaron Rodgers').
short_nameStringPlayer's abbreviated name, first initial and surname (e.g. 'A.Rodgers').
headshotStringNFL headshot image URL template; the {formatInstructions} token must be replaced with a Cloudinary transform (e.g. t_headshot_desktop) before use.
team_idStringNFL team id as a zero-padded string (e.g. '0200', '3430'); casting it to a number drops the leading zero.
jersey_numberInt64Jersey number the player wore in the season.
positionStringRoster position abbreviation (e.g. QB, WR, CB).
position_groupStringPosition group the roster position rolls up to (e.g. QB, RB, WR, TE, DB).
ngs_positionStringPosition Next Gen Stats assigns from tracking data; null for players NGS has not classified.
ngs_position_groupStringPosition group of ngs_position; null when ngs_position is null.
gpInt64Games played in the season (and season type) -- the denominator of every *_pg per-game column.
gsInt64Games started in the season.
tgInt64Games the player's team played while he was on the roster; equals gp in sampled data.
total_tgInt64Total games the player's team played in the season type (17 for a full regular season).
week_slugStringWeek slug of the game (e.g. 'WEEK_1', 'WEEK_18'); the week scope of the row.
game_idInt64NFL game id as an integer (e.g. 2024090900, the date followed by a two-digit sequence).
fapi_game_idStringNFL Football API (FAPI) UUID of the game, the id api.nfl.com uses for the same game.
opponent_team_idStringOpponent's NFL team id as a zero-padded string.
is_homeBooleanWhether the player's team was the home team in the game.
final_scoreStringFinal score as 'own-opponent' (e.g. '19-32' for a 32-19 loss).
game_resultStringResult from the player's team's side: 'W', 'L' or 'T'.
covInt64
cov_ndInt64
tgt_ndInt64Targets on which the player was the nearest defender in the game, per Next Gen Stats.
rec_ndInt64Receptions allowed as the nearest defender in the game.
rec_yds_ndInt64Receiving yards allowed as the nearest defender in the game.
rec_td_ndInt64Receiving touchdowns allowed as the nearest defender in the game.
intInt64Interceptions made in the game (a count, not a per-play flag).
pass_rating_ndFloat64Passer rating allowed on targets where the player was the nearest defender.
catch_ndFloat64Catch rate allowed as the nearest defender (rec_nd / tgt_nd), as a fraction.
croe_ndFloat64Catch rate over expected allowed as the nearest defender (actual minus expected catch rate), per Next Gen Stats.
tgt_epa_ndFloat64Total expected points added allowed on targets where the player was the nearest defender.
tgt_r_ndFloat64Target rate as the nearest defender: share of coverage snaps on which the receiver he covered was targeted.
sepFloat64Average separation in yards allowed at pass arrival as the nearest defender, per Next Gen Stats.
twf_pctInt64
bh_pctFloat64
yacpr_ndFloat64
qdBooleanWhether the defender meets the league qualifying threshold for the table (the qualified filter).
game_snapInt64Defensive snaps the player played in the game; equals snap on the overview table.
team_snapInt64Defensive snaps the player's team played in the game; the denominator of snap_pct.

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

Raises​

ExceptionDescription
NFLProAuthErrorNo user-bound NFL Pro token could be resolved (pass token= or email=/password=, or set NFLPRO_TOKEN, or NFLPRO_EMAIL/NFLPRO_PW), or the resolved token carries no active NFL_PLUS_* plan, or pro.nfl.com answered 401 / 403 (an AssetFetchError).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. Pro.nfl.com answered 400 / 422, or ignored offset.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. Any other non-2xx or a connection failure after retries, or a 2xx whose body is not a JSON object or array -- including the HTTP 200 with an empty body that is how pro.nfl.com rejects unsupported query params.
NoDataErrorThe host answered 404 -- the requested resource does not exist.

Example​

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