Skip to main content

NFL — additional Python functions — Play-by-play, schedule & rosters

espn_nfl_game_rosters​

espn_nfl_game_rosters(game_id: 'int', raw=False, return_as_pandas=False, **kwargs) -> 'pl.DataFrame'

espn_nfl_game_rosters() - Pull the game by id.

Parameters

ParameterTypeDefaultDescription
game_idintUnique game_id, can be obtained from espn_nfl_schedule().
rawFalse
return_as_pandasboolFalseIf True, returns a pandas dataframe. If False, returns a polars dataframe.

Returns

Polars dataframe of game roster data with columns: 'athlete_id', 'athlete_uid', 'athlete_guid', 'athlete_type', 'first_name', 'last_name', 'full_name', 'athlete_display_name', 'short_name', 'weight', 'display_weight', 'height', 'display_height', 'age', 'date_of_birth', 'slug', 'jersey', 'linked', 'active', 'alternate_ids_sdr', 'birth_place_city', 'birth_place_state', 'birth_place_country', 'headshot_href', 'headshot_alt', 'experience_years', 'experience_display_value', 'experience_abbreviation', 'status_id', 'status_name', 'status_type', 'status_abbreviation', 'hand_type', 'hand_abbreviation', 'hand_display_value', 'draft_display_text', 'draft_round', 'draft_year', 'draft_selection', 'player_id', 'starter', 'valid', 'did_not_play', 'display_name', 'ejected', 'athlete_href', 'position_href', 'statistics_href', 'team_id', 'team_guid', 'team_uid', 'team_slug', 'team_location', 'team_name', 'team_nickname', 'team_abbreviation', 'team_display_name', 'team_short_display_name', 'team_color', 'team_alternate_color', 'is_active', 'is_all_star', 'team_alternate_ids_sdr', 'logo_href', 'logo_dark_href', 'game_id'

col_nametypedescription
athlete_idintegerESPN athlete id.
athlete_uidcharacterESPN athlete UID (universal identifier).
athlete_guidcharacterESPN athlete GUID.
athlete_typecharacterAthlete type / class.
first_namecharacterFirst name of player
last_namecharacterLast name of player
full_namecharacterFull name as per NFL.com
athlete_display_namecharacterPlayer display name; athlete_detail = TRUE only.
short_namecharacterPlayer short name (i.e. "F.Last")
weightdoubleOfficial weight, in pounds
display_weightcharacterHuman-readable weight (e.g. 205 lbs).
heightdoubleOfficial height, in inches
display_heightcharacterHuman-readable height (e.g. 6' 1").
ageintegerAge as of last pipeline build, rounded to one decimal. Pipeline is built on a weekly basis.
date_of_birthcharacterPlayer date of birth (if published).
debut_yearintegerYear of professional debut.
slugcharacterURL slug for the team.
jerseycharacterJersey number.
linkedlogicalTRUE if the record is linked to a related entity.
activelogicalTRUE if the player was active for the game.
alternate_ids_sdrcharacterAlternate ids sdr.
birth_place_citycharacterBirth place city.
birth_place_statecharacterBirth place state.
birth_place_countrycharacterBirth place country.
headshot_hrefcharacterLink to ESPN Headshot of Player
headshot_altcharacterAlternative-text label for the headshot.
projections_hrefcharacterESPN API hyperlink reference URL for the player's statistical projection resource.
contracts_hrefcharacterESPN API hyperlink reference URL for the full list of the player's historical contract records.
experience_yearsintegerYears of experience.
college_athlete_hrefcharacterESPN API hyperlink reference URL for the athlete's college profile resource.
contract_hrefcharacterESPN API hyperlink reference URL for the player's full contract resource.
contract_option_typeintegerContract option type.
contract_salaryintegerContract salary.
contract_bonusintegerSigning or roster bonus amount (in dollars) associated with the player's current contract.
contract_years_remainingintegerContract years remaining.
contract_signed_throughintegerFinal year of the player's current contract, expressed as a four-digit season year.
contract_season_hrefcharacterESPN API hyperlink reference URL for the specific season-level contract detail resource.
contract_team_hrefcharacterESPN API hyperlink reference URL for the team associated with the player's contract.
contract_activelogicalContract active.
status_idcharacterESPN commitment status id.
status_namecharacterStatus-type key (e.g. STATUS_FINAL).
status_typecharacterStatus type.
status_abbreviationcharacterStatus abbreviation.
contract_salary_remainingintegerContract salary remaining.
draft_display_textcharacterDraft display text.
draft_roundintegerRound that player was drafted in
draft_yearintegerYear that player was drafted
draft_selectionintegerDraft selection.
draft_team_hrefcharacterESPN API hyperlink reference URL for the team that originally drafted this player.
draft_pick_hrefcharacterESPN API hyperlink reference URL for the draft-pick record associated with this player.
hand_typecharacterHand type.
hand_abbreviationcharacterHand abbreviation.
hand_display_valuecharacterHand display value.
starterlogicalTRUE if the athlete started the game.
jersey_rightcharacterSecondary or alternate jersey number display string used by ESPN (e.g., for special-game uniforms).
validlogicalTRUE if the roster entry is flagged valid by ESPN.
did_not_playlogicalTRUE if the athlete did not play.
display_namecharacterFull name of player
athlete_hrefcharacterESPN API hyperlink reference URL for the athlete resource.
position_hrefcharacterESPN API hyperlink reference URL for the player's positional classification resource.
statistics_hrefcharacterESPN API hyperlink reference URL for the player's career statistics resource.
team_idintegerESPN team id.
orderintegerTeam order within the competition (0 = first).
home_awaycharacterhome or away.
winnerlogicalTRUE if this team won the game.
team_guidcharacterESPN team GUID.
team_uidcharacterESPN universal team identifier (UID format 's:40~l:...~t:...').
team_slugcharacterTeam slug for the stat row.
team_locationcharacterTeam location / school name; team_detail = TRUE only.
team_namecharacterTeam nickname; team_detail = TRUE only.
team_nicknamecharacterTeam nickname label; team_detail = TRUE only.
team_abbreviationcharacterTeam abbreviation; team_detail = TRUE only.
team_display_namecharacterFull team display name; team_detail = TRUE only.
team_short_display_namecharacterShort team display name; team_detail = TRUE only.
team_colorcharacterPrimary team color; team_detail = TRUE only.
team_alternate_colorcharacterAlternate team color; team_detail = TRUE only.
is_activelogicalActive contract
is_all_starlogicalWhether the team is an all-star team.
team_alternate_ids_sdrcharacterSportsDataverse SDR alternate identifier for the team, used for cross-source joins.
logo_hrefcharacterURL of the default team logo.
logo_dark_hrefcharacterURL of the dark-variant team logo.
game_idintegerTen digit identifier for NFL game.

Example

from sportsdataverse.nfl import espn_nfl_game_rosters
rosters = espn_nfl_game_rosters(game_id=401220403)
rosters.shape

# Pandas round-trip with home/away split

rosters_pd = espn_nfl_game_rosters(game_id=401220403, return_as_pandas=True)
home = rosters_pd[rosters_pd["home_away"] == "home"]
away = rosters_pd[rosters_pd["home_away"] == "away"]

espn_nfl_play_participants​

espn_nfl_play_participants(game_id: 'int', *, raw: 'bool' = False, return_as_pandas: 'bool' = False, resolve_missing: 'bool' = True, resolve_missing_max: 'int' = 50, **kwargs: 'Any') -> 'pl.DataFrame | pd.DataFrame | dict[str, Any]'

Pull ESPN per-play participants for an NFL game.

One row per play keyed by play_id with {type}_player_name / {type}_player_id scalars (first occurrence) and {type}_player_names / {type}_player_ids lists for every participant type ESPN ships (passer, rusher, receiver, tackler, sacked_by, forced_by, pass_defender, kicker, punter, returner, recoverer, scorer, pat_scorer, penalized, assisted_by). NFLPlayProcess runs it on the live path to overwrite the text-extracted names and ids.

Parameters

ParameterTypeDefaultDescription
game_idintESPN game / event identifier.
rawboolFalseIf True, returns the raw list of play-items dicts.
return_as_pandasboolFalseIf True, returns a pandas DataFrame; otherwise polars.
resolve_missingboolTrueFetch athletes the sidecar omits from their $ref.
resolve_missing_maxint50Cap on those per-athlete requests (default 50).

Returns

Polars (or pandas) DataFrame, one row per play; the raw play dicts when raw=True.

Example

from sportsdataverse.nfl import espn_nfl_play_participants
participants = espn_nfl_play_participants(game_id=401872922)
print(participants.select("play_id", "passer_player_name", "passer_player_id").head())

espn_nfl_player_stats​

espn_nfl_player_stats(athlete_id: 'int', season: 'int', *, season_type: 'str' = 'regular', total: 'bool' = False, raw: 'bool' = False, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'pl.DataFrame | pd.DataFrame | dict[str, Any]'

Pull an NFL athlete's ESPN season stat line as one wide row.

See sportsdataverse.wbb.espn_wbb_player_stats for full documentation of the wide return shape, the {category}_{stat} stat columns (for football: passing_*, rushing_*, receiving_*, scoring_*, ...), the athlete / team metadata blocks, and the season_type / total parameters. For the richer multi-category web-v3 payload use sportsdataverse.nfl.espn_nfl_player_stats_v3.

Parameters

ParameterTypeDefaultDescription
athlete_idintESPN NFL athlete identifier (e.g. 3139477 for Patrick Mahomes).
seasonintSeason year, used in the core-v2 path.
season_typestr'regular'"regular" (type 2) or "postseason" (type 3).
totalboolFalseForward-compat totals passthrough.
rawboolFalseIf True, returns the raw core-v2 statistics JSON dict.
return_as_pandasboolFalseIf True, returns a pandas DataFrame; else polars.

Returns

A single-row wide DataFrame (polars by default). When raw=True returns the raw statistics JSON dict.

col_nametypedescription
seasoninteger4 digit number indicating to which season(s) the specified timeframe belongs to.
season_typecharacterREG or POST indicating if the timeframe belongs to regular or post season.
totallogicalThe sum of each team's score in the game. Equals h_score + v_score. Is NA for games which haven't yet been played. Convenient for evaluating over/under total bets.
athlete_idintegerESPN athlete id.
athlete_uidcharacterESPN athlete UID (universal identifier).
athlete_guidcharacterESPN athlete GUID.
athlete_typecharacterAthlete type / class.
first_namecharacterFirst name of player
last_namecharacterLast name of player
full_namecharacterFull name as per NFL.com
display_namecharacterFull name of player
short_namecharacterPlayer short name (i.e. "F.Last")
weightdoubleOfficial weight, in pounds
display_weightcharacterHuman-readable weight (e.g. 205 lbs).
heightdoubleOfficial height, in inches
display_heightcharacterHuman-readable height (e.g. 6' 1").
ageintegerAge as of last pipeline build, rounded to one decimal. Pipeline is built on a weekly basis.
date_of_birthcharacterPlayer date of birth (if published).
jerseycharacterJersey number.
slugcharacterURL slug for the team.
activelogicalTRUE if the player was active for the game.
position_idintegerESPN position id.
position_namecharacterPosition name (e.g. Quarterback); position_detail = TRUE only.
position_display_namecharacterHuman-readable position name; position_detail = TRUE only.
position_abbreviationcharacterPosition abbreviation (e.g. QB); position_detail = TRUE only.
college_namecharacterOfficial college (usually the last one attended)
status_idintegerESPN commitment status id.
status_namecharacterStatus-type key (e.g. STATUS_FINAL).
general_fumblesdoubleTotal number of times the player fumbled the ball regardless of who recovered it.
general_fumbles_lostdoubleNumber of fumbles by the player that were subsequently recovered by the opposing team.
general_fumbles_forceddoubleNumber of fumbles the player forced from opposing ball carriers.
general_fumbles_forced_primarydoubleNumber of fumbles forced where the player was credited as the primary forcer rather than an assist.
general_fumbles_recovereddoubleNumber of fumbles (own or opponent's) recovered by the player.
general_fumbles_recovered_yardsdoubleTotal yards gained on fumble recoveries returned by the player.
general_fumbles_touchdownsdoubleNumber of touchdowns scored by the player on fumble recoveries.
general_games_playeddoubleGames Played.
general_offensive_two_pt_returnsdoubleNumber of two-point conversion attempts the player's offense returned defensively for a score.
general_offensive_fumbles_touchdownsdoubleNumber of touchdowns scored by recovering an offensive team fumble (e.g., a fumble recovered in the end zone).
general_defensive_fumbles_touchdownsdoubleNumber of touchdowns scored by recovering or returning an opponent's fumble on the defensive side.
passing_avg_gaindoubleAverage yards gained per passing attempt including sacks.
passing_completion_pctdoublePercentage of pass attempts that resulted in a completed reception (completions divided by attempts).
passing_completionsdoublePass completions (split from CFBD's C/ATT field).
passing_espnqb_ratingdoubleESPN's proprietary composite quarterback rating blending efficiency, usage, and situational performance into a single metric.
passing_interception_pctdoublePercentage of pass attempts that resulted in an interception (interceptions divided by attempts).
passing_interceptionsdoubleTotal number of passes thrown that were intercepted by the opposing defense.
passing_long_passingdoubleLongest completed pass in yards recorded by the player during the period.
passing_net_passing_yardsdoublePassing yards minus yards lost on sacks, giving a net aerial production figure.
passing_net_passing_yards_per_gamedoubleNet passing yards (after sack yardage deduction) per game played.
passing_net_total_yardsdoubleCombined net rushing and net passing yards accumulated by the player.
passing_net_yards_per_gamedoubleNet total offensive yards (rushing plus net passing) per game.
passing_passing_attemptsdoubleTotal number of pass attempts thrown by the player.
passing_passing_big_playsdoubleNumber of passing plays that gained 20 or more yards.
passing_passing_first_downsdoubleNumber of pass completions that resulted in a first down.
passing_passing_fumblesdoubleNumber of times the player fumbled while in the act of passing or being sacked.
passing_passing_fumbles_lostdoubleNumber of passing-related fumbles that were recovered by the opposing team.
passing_passing_touchdown_pctdoublePercentage of pass attempts that resulted in a touchdown (touchdowns divided by attempts).
passing_passing_touchdownsdoubleTotal number of touchdown passes thrown by the player.
passing_passing_yardsdoubleTotal aerial yards gained on completions thrown by the player.
passing_passing_yards_after_catchdoubleTotal yards gained by receivers after catching the ball on passes thrown by the player.
passing_passing_yards_at_catchdoubleTotal yards gained through the air (prior to the catch) on completions thrown by the player.
passing_passing_yards_per_gamedoubleGross passing yards per game played by the quarterback.
passing_qb_ratingdoubleTraditional NFL passer rating computed from completion percentage, yards per attempt, touchdown percentage, and interception percentage on a roughly 0–158.3 scale.
passing_sacksdoubleTotal number of times the player was sacked behind the line of scrimmage while attempting to pass.
passing_sack_yards_lostdoubleTotal yards lost by the player as a result of being sacked behind the line of scrimmage.
passing_net_passing_attemptsdoubleTotal pass attempts minus sacks taken, representing meaningful dropbacks.
passing_team_games_playeddoubleNumber of games played by the player's team during which the player accumulated passing statistics.
passing_total_offensive_playsdoubleTotal number of offensive plays (pass attempts, rushes, and sacks) run with the player as the primary ball handler.
passing_total_points_per_gamedoubleAverage total points scored by the player's team per game.
passing_total_touchdownsdoubleTotal touchdowns (passing, rushing, and receiving) scored by or credited to the player.
passing_total_yardsdoubleCombined total of passing, rushing, and receiving yards accumulated by the player.
passing_total_yards_from_scrimmagedoubleTotal yards from scrimmage (rushing plus receiving) credited to the player in addition to passing yards.
passing_two_point_pass_convsdoubleNumber of successful two-point conversion attempts thrown by the player.
passing_two_pt_passdoubleNumber of two-point conversion passes the player successfully completed.
passing_two_pt_pass_attemptsdoubleNumber of two-point conversion pass attempts thrown by the player regardless of outcome.
passing_yards_from_scrimmage_per_gamedoubleYards from scrimmage (rushing plus receiving) per game for a player who also has passing statistics recorded.
passing_yards_per_completiondoubleAverage yards gained per completed pass attempt.
passing_yards_per_gamedoubleGross passing yards per game (equivalent to passing_passing_yards_per_game; alternate label).
passing_yards_per_pass_attemptdoubleGross passing yards divided by total pass attempts, not penalizing for sacks.
passing_net_yards_per_pass_attemptdoubleNet passing yards divided by total pass attempts including sacks, penalizing passers for yardage lost in the pocket.
passing_qbrdoubleESPN Quarterback Rating (QBR) for the player in this game.
passing_adj_qbrdoubleESPN's Adjusted Total Quarterback Rating, which adjusts raw QBR for opponent strength and clutch situations on a 0–100 scale.
passing_quarterback_ratingdoubleAlternate or supplemental quarterback rating value; may represent a different calculation context from passing_qb_rating (e.g., situational or opponent-adjusted).
rushing_avg_gaindoubleAverage yards gained per rushing attempt by the player.
rushing_espnrb_ratingdoubleESPN's proprietary composite running back rating blending efficiency and usage metrics.
rushing_long_rushingdoubleLongest single rushing play in yards recorded by the player during the period.
rushing_net_total_yardsdoubleCombined net rushing and receiving yards accumulated by the player.
rushing_net_yards_per_gamedoubleNet total offensive yards per game for the player.
rushing_rushing_attemptsdoubleTotal number of rushing attempts carried by the player.
rushing_rushing_big_playsdoubleNumber of rushing plays that gained 10 or more yards.
rushing_rushing_first_downsdoubleNumber of rushing attempts that resulted in a first down.
rushing_rushing_fumblesdoubleNumber of times the player fumbled while carrying the ball on a rushing play.
rushing_rushing_fumbles_lostdoubleNumber of rushing fumbles by the player that were recovered by the opposing team.
rushing_rushing_touchdownsdoubleTotal number of rushing touchdowns scored by the player.
rushing_rushing_yardsdoubleTotal yards gained by the player on all rushing attempts.
rushing_rushing_yards_per_gamedoubleRushing yards per game played by the player.
rushing_stuffsdoubleNumber of rushing attempts where the player was tackled at or behind the line of scrimmage.
rushing_stuff_yards_lostdoubleTotal yards lost on rushing plays where the player was tackled behind the line of scrimmage (stuffed).
rushing_team_games_playeddoubleNumber of games played by the player's team during which the player accumulated rushing statistics.
rushing_total_offensive_playsdoubleTotal number of offensive plays run with the player active in a rushing role.
rushing_total_points_per_gamedoubleAverage total points scored by the player's team per game.
rushing_total_touchdownsdoubleTotal touchdowns (rushing and receiving) scored by the player.
rushing_total_yardsdoubleCombined total rushing and receiving yards accumulated by the player.
rushing_total_yards_from_scrimmagedoubleTotal yards from scrimmage (rushing plus receiving) credited to the player.
rushing_two_point_rush_convsdoubleNumber of successful two-point conversion rushes scored by the player.
rushing_two_pt_rushdoubleNumber of two-point conversion rushes the player successfully converted.
rushing_two_pt_rush_attemptsdoubleNumber of two-point conversion rush attempts by the player regardless of outcome.
rushing_yards_from_scrimmage_per_gamedoubleTotal yards from scrimmage per game for the player.
rushing_yards_per_gamedoubleRushing yards per game (equivalent label to rushing_rushing_yards_per_game).
rushing_yards_per_rush_attemptdoubleAverage yards gained per rushing attempt by the player.
receiving_avg_gaindoubleAverage yards gained per reception by the player.
receiving_espnwr_ratingdoubleESPN's proprietary composite wide receiver / pass-catcher rating blending efficiency and usage metrics.
receiving_long_receptiondoubleLongest single reception in yards recorded by the player during the period.
receiving_net_total_yardsdoubleCombined net rushing and receiving yards accumulated by the player.
receiving_net_yards_per_gamedoubleNet total offensive yards (rushing plus receiving) per game for the player.
receiving_receiving_big_playsdoubleNumber of receptions that gained 20 or more yards.
receiving_receiving_first_downsdoubleNumber of receptions that resulted in a first down.
receiving_receiving_fumblesdoubleNumber of times the player fumbled after making a reception.
receiving_receiving_fumbles_lostdoubleNumber of post-reception fumbles by the player that were recovered by the opposing team.
receiving_receiving_targetsdoubleTotal number of times the player was the intended target of a pass attempt.
receiving_receiving_touchdownsdoubleTotal number of touchdown receptions credited to the player.
receiving_receiving_yardsdoubleTotal yards gained by the player on all receptions.
receiving_receiving_yards_after_catchdoubleTotal yards gained by the player after making contact with the ball (yards after catch).
receiving_receiving_yards_at_catchdoubleTotal air yards at the point of the catch (depth of target) on receptions by the player.
receiving_receiving_yards_per_gamedoubleReceiving yards per game played by the player.
receiving_receptionsdoubleTotal number of passes successfully caught by the player.
receiving_team_games_playeddoubleNumber of games played by the player's team during which the player accumulated receiving statistics.
receiving_total_offensive_playsdoubleTotal number of offensive plays run during which the player was active on the field.
receiving_total_points_per_gamedoubleAverage total points scored by the player's team per game (context for the receiver's role).
receiving_total_touchdownsdoubleTotal touchdowns (rushing and receiving) scored by the player.
receiving_total_yardsdoubleCombined total rushing and receiving yards accumulated by the player.
receiving_total_yards_from_scrimmagedoubleTotal yards from scrimmage (rushing plus receiving) credited to the player.
receiving_two_point_rec_convsdoubleNumber of successful two-point conversion receptions caught by the player.
receiving_two_pt_receptiondoubleNumber of two-point conversion passes the player successfully caught.
receiving_two_pt_reception_attemptsdoubleNumber of two-point conversion targets thrown to the player regardless of outcome.
receiving_yards_from_scrimmage_per_gamedoubleTotal yards from scrimmage per game for the player.
receiving_yards_per_gamedoubleReceiving yards per game (equivalent label to receiving_receiving_yards_per_game).
receiving_yards_per_receptiondoubleAverage yards gained per reception, also known as yards per catch.
defensive_assist_tacklesdoubleNumber of assisted tackles credited to the player (helped bring down the ball carrier but was not the primary tackler).
defensive_avg_interception_yardsdoubleAverage yards gained per interception returned by the player.
defensive_avg_sack_yardsdoubleAverage yards lost per sack the player recorded against the opposing quarterback.
defensive_avg_stuff_yardsdoubleAverage yards lost per run stuff (tackle behind the line of scrimmage) recorded by the player.
defensive_blocked_field_goal_touchdownsdoubleNumber of touchdowns scored by the player after blocking an opponent's field goal attempt and returning it.
defensive_blocked_punt_touchdownsdoubleNumber of touchdowns scored by the player after blocking an opponent's punt and returning it.
defensive_hurriesdoubleNumber of times the player pressured the quarterback into an early or errant throw without recording a sack.
defensive_kicks_blockeddoubleTotal number of kicks (field goals or extra points) the player blocked.
defensive_long_interceptiondoubleLongest single interception return in yards recorded by the player.
defensive_misc_touchdownsdoubleNumber of defensive touchdowns scored via miscellaneous means not captured by other specific categories.
defensive_passes_batted_downdoubleNumber of passes the player knocked down at the line of scrimmage without recording an interception.
defensive_passes_defendeddoubleTotal number of passes the player broke up or deflected, including both pass deflections and interceptions.
defensive_qb_hitsdoubleNumber of times the player legally hit the quarterback during or just after a pass attempt.
defensive_two_pt_returnsdoubleNumber of two-point conversion attempts the player's defense returned for a defensive conversion score.
defensive_sacksdoubleSacks credited to the player.
defensive_sack_yardsdoubleTotal yards lost by the opposing offense as a result of the player's sacks.
defensive_safetiesdoubleNumber of safeties recorded by the player (tackling the ball carrier in their own end zone).
defensive_solo_tacklesdoubleNumber of unassisted tackles credited solely to the player.
defensive_stuffsdoubleNumber of times the player tackled a ball carrier for a loss on a rushing play.
defensive_stuff_yardsdoubleTotal yards lost by the offense on run stuffs recorded by the player.
defensive_tackles_for_lossdoubleTotal number of tackles resulting in a loss of yards for the opposing offense.
defensive_tackles_yards_lostdoubleTotal yards lost by the opposing offense on the player's tackles for loss.
defensive_team_games_playeddoubleNumber of games played by the player's team in which the player appeared on the defensive side.
defensive_total_tacklesdoubleCombined total of solo tackles and assisted tackles recorded by the player.
defensive_yards_alloweddoubleTotal yards allowed by the player's defense during games the player appeared in.
defensive_points_alloweddoubleTotal points allowed by the player's team during games the player appeared in.
defensive_one_pt_safeties_madedoubleNumber of one-point safeties recorded by the player's defense (scored when the opposing team is downed in their own end zone during a try).
defensive_missed_field_goal_return_tddoubleNumber of touchdowns scored by returning a missed field goal attempt.
defensive_blocked_punt_ez_rec_tddoubleNumber of touchdowns scored by recovering a blocked punt in the end zone.
defensive_interceptions_interceptionsdoubleTotal number of passes intercepted by the player.
defensive_interceptions_interception_touchdownsdoubleNumber of touchdowns scored by the player on interception returns.
defensive_interceptions_interception_yardsdoubleTotal yards gained by the player on interception returns.
scoring_defensive_pointsdoubleTotal points scored by the player's defense via safeties, defensive touchdowns, and blocked kick returns.
scoring_field_goalsdoubleTotal number of field goals successfully made by the player during the period.
scoring_kick_extra_pointsdoubleTotal number of extra point attempts (PAT kicks) by the player.
scoring_kick_extra_points_madedoubleTotal number of extra points successfully kicked through the uprights by the player.
scoring_misc_pointsdoublePoints scored via miscellaneous methods not captured by other scoring categories.
scoring_passing_touchdownsdoubleTotal passing touchdowns thrown by the player, contributing to their total scoring line.
scoring_receiving_touchdownsdoubleTotal receiving touchdowns scored by the player.
scoring_return_touchdownsdoubleTotal touchdowns scored by the player on kick or punt returns.
scoring_rushing_touchdownsdoubleTotal rushing touchdowns scored by the player.
scoring_total_pointsdoubleTotal points contributed by the player across all scoring methods (touchdowns, PATs, field goals, etc.).
scoring_total_points_per_gamedoubleAverage total points contributed by the player per game.
scoring_total_touchdownsdoubleTotal touchdowns scored or thrown by the player across all methods.
scoring_total_two_point_convsdoubleTotal number of successful two-point conversions scored or thrown by the player.
scoring_two_point_pass_convsdoubleNumber of successful two-point conversion passes thrown by the player.
scoring_two_point_rec_convsdoubleNumber of successful two-point conversion receptions caught by the player.
scoring_two_point_rush_convsdoubleNumber of successful two-point conversion rushes scored by the player.
scoring_one_pt_safeties_madedoubleNumber of one-point safeties recorded, scored when the defense stops an offense that is attempting a two-point conversion in their own end zone.
team_idintegerESPN team id.
team_uidcharacterESPN universal team identifier (UID format 's:40~l:...~t:...').
team_guidcharacterESPN team GUID.
team_slugcharacterTeam slug for the stat row.
team_locationcharacterTeam location / school name; team_detail = TRUE only.
team_namecharacterTeam nickname; team_detail = TRUE only.
team_abbreviationcharacterTeam abbreviation; team_detail = TRUE only.
team_display_namecharacterFull team display name; team_detail = TRUE only.
team_short_display_namecharacterShort team display name; team_detail = TRUE only.
team_colorcharacterPrimary team color; team_detail = TRUE only.
team_alternate_colorcharacterAlternate team color; team_detail = TRUE only.
team_is_activelogicalTRUE if the team is currently active.
team_logo_hrefcharacterDefault team logo URL; team_detail = TRUE only.
general_defensive_fumbles_forceddoubleFumbles the player forced on defense, excluding miscellaneous and special-teams plays (ESPN defensiveFumblesForced, as a float); 0.0 in the single sampled row.
general_misc_fumbles_forceddoubleFumbles the player forced when not on defense or special teams (ESPN miscFumblesForced, as a float); 0.0 in the single sampled row.
general_special_teams_fumbles_forceddoubleFumbles the player forced on special-teams plays (ESPN specialTeamsFumblesForced, as a float); 0.0 in the single sampled row.
passing_offensive_snap_pctdoubleESPN's offensiveSnapPct stat (described upstream as '% of plays the player was on the field'); 0.0 for every athlete checked, including a 175-target receiver (Ja'Marr Chase, 2024), so ESPN does not appear to populate it.
passing_target_share_pctdoubleESPN's targetSharePct stat (described upstream as '% of total team targets'); 0.0 for every athlete checked, including a 175-target receiver (Ja'Marr Chase, 2024), so ESPN does not appear to populate it.
passing_yards_per_route_rundoubleESPN's yardsPerRouteRun stat (yards per route run, YPRR) under the passing category; 0.0 for every athlete checked, including a 175-target receiver (Ja'Marr Chase, 2024), so ESPN does not appear to populate it.
passing_avg_depth_of_targetdoubleESPN's avgDepthOfTarget stat (average depth of target, aDOT) under the passing category; 0.0 for every athlete checked, including a 175-target receiver (Ja'Marr Chase, 2024), so ESPN does not appear to populate it.

Example

from sportsdataverse.nfl import espn_nfl_player_stats
df = espn_nfl_player_stats(athlete_id=3139477, season=2023)
df.select(["full_name", "team_display_name", "passing_passing_yards"])

espn_nfl_schedule​

espn_nfl_schedule(dates=None, week=None, season_type=None, groups=None, limit=500, return_as_pandas=False, **kwargs) -> 'pl.DataFrame'

espn_nfl_schedule - look up the NFL schedule for a given season

Parameters

ParameterTypeDefaultDescription
datesintNoneUsed to define different seasons. 2002 is the earliest available season.
weekintNoneWeek of the schedule.
season_typeintNone2 for regular season, 3 for post-season, 4 for off-season.
groupsNone
limitint500number of records to return, default: 500.
return_as_pandasboolFalseIf True, returns a pandas dataframe. If False, returns a polars dataframe.

Returns

Polars dataframe containing schedule dates for the requested season. Returns None if no games

col_nametypedescription
idcharacterID of the player in the 'name' column.
uidcharacterESPN global unique identifier.
datecharacterDate of the poll release.
attendanceintegerReported attendance at the game.
time_validlogicalWhether the start time is confirmed.
neutral_sitelogicalTRUE/FALSE flag for if the game took place at a neutral site.
conference_competitionlogicalConference competition.
play_by_play_availablelogicalWhether play-by-play data is available.
recentlogicalWhether the game is recent.
start_datecharacterSeason start timestamp (ISO 8601, UTC).
broadcastcharacterBroadcast network short name.
highlightscharacterGame highlight urls.
notes_typecharacterNotes type.
notes_headlinecharacterNotes headline.
broadcast_marketcharacterBroadcast market label (e.g. 'national', 'home').
broadcast_namecharacterBroadcast name.
type_idcharacterPlay-type id.
type_abbreviationcharacterPlay-type abbreviation (e.g. RUSH, TD).
venue_idcharacterReferencing venue id.
venue_full_namecharacterVenue full name.
venue_address_citycharacterVenue address city.
venue_address_statecharacterVenue address state / region.
venue_address_countrycharacterTwo-letter ISO country code or country name for the country where the venue is located.
venue_indoorlogicalWhether the home venue is indoors.
status_clockdoubleGame clock in seconds.
status_display_clockcharacterStatus display clock.
status_periodintegerCurrent period.
status_type_idcharacterUnique identifier for status type.
status_type_namecharacterStatus type name.
status_type_statecharacterStatus state (pre/in/post).
status_type_completedlogicalWhether the game is complete.
status_type_descriptioncharacterStatus type description.
status_type_detailcharacterStatus type detail.
status_type_short_detailcharacterStatus type short detail.
status_is_tbd_flexlogicalBoolean flag indicating whether the game's broadcast slot is designated as a flex/TBD window.
format_regulation_periodsintegerFormat regulation periods.
home_idcharacterHome team referencing id.
home_uidcharacterHome team's uid.
home_locationcharacterHome team's location.
home_namecharacterHome team display name.
home_abbreviationcharacterHome team's abbreviation.
home_display_namecharacterHome team display name.
home_short_display_namecharacterHome short display name.
home_colorcharacterHome team primary color hex.
home_alternate_colorcharacterColor code (hex) for home alternate.
home_is_activelogicalHome team's is active.
home_venue_idcharacterUnique identifier for home venue.
home_logocharacterHome team logo URL.
home_scorecharacterThe number of points the home team scored. Is NA for games which haven't yet been played.
home_current_rankintegerCurrent AP or ESPN power ranking of the home team at the time of the game.
home_linescoreslistComma-separated or serialized quarter-by-quarter score totals for the home team.
home_recordscharacterSerialized win-loss-tie record(s) for the home team (e.g., overall, home, away, conference).
away_idcharacterAway team referencing id.
away_uidcharacterAway team's uid.
away_locationcharacterAway team's location.
away_namecharacterAway team display name.
away_abbreviationcharacterAway team's abbreviation.
away_display_namecharacterAway team display name.
away_short_display_namecharacterAway short display name.
away_colorcharacterAway team primary color hex.
away_alternate_colorcharacterColor code (hex) for away alternate.
away_is_activelogicalAway team's is active.
away_venue_idcharacterUnique identifier for away venue.
away_logocharacterAway team logo URL.
away_scorecharacterThe number of points the away team scored. Is NA for games which haven't yet been played.
away_current_rankintegerCurrent AP or ESPN power ranking of the away team at the time of the game.
away_linescoreslistComma-separated or serialized quarter-by-quarter score totals for the away team.
away_recordscharacterSerialized win-loss-tie record(s) for the away team (e.g., overall, home, away, conference).
game_idintegerTen digit identifier for NFL game.
seasoninteger4 digit number indicating to which season(s) the specified timeframe belongs to.
season_typeintegerREG or POST indicating if the timeframe belongs to regular or post season.
weekintegerSeason week.

Example

from sportsdataverse.nfl import espn_nfl_schedule
sched = espn_nfl_schedule(dates=20240908)

# Specific week of regular season (``season_type=2``)

wk1 = espn_nfl_schedule(dates=2024, week=1, season_type=2)

# Pandas round-trip

sched_pd = espn_nfl_schedule(dates=20240908, return_as_pandas=True)