Skip to main content
Version: 0.1.5

NFL — PFF Developer API (api.pff.com, API key) — Other: ref_leagues–whoami

pff_api_ref_leagues​

List the leagues you can read, with their seasons and weeks

Endpoint URL: GET https://api.pff.com/v1/leagues

Valid URL: https://api.pff.com/v1/leagues

API ParameterPythonPatternRequiredNullableDescription

Returns​

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

col_nametypedescription
abbreviationcharacterLeague abbreviation as the source lists it (e.g. NFL).
default_seasonnumericSeason the source API currently treats as the default for this league.
default_weeknumericWeek number the source API currently treats as the default for this league.
default_week_groupcharacterIdentifier of the week grouping (e.g., regular season or postseason phase) currently set as the league default.
idnumericNumeric league id from the source API (PFF: 1 = NFL).
namecharacterLeague display name as the source lists it (PFF: 'Pro Football').
seasonslistNested list (stringified) of the seasons the source publishes for the league.
slugcharacterURL slug of the league on premium.pff.com (e.g. nfl).
week_groupslistNested list of week-group objects (phase label and week span) defined for the league.
weekslistNested list of week objects available for the league.

return_parsed=False — The decoded JSON body. /v1 routes return the Premium Stats envelope ({report_slug: rows}); /v2 routes return {..meta.., columns, rows}..

Example​

pff_api_ref_leagues()

Last validated n/a.

pff_api_ref_games​

List game results for a league, season and week

Endpoint URL: GET https://api.pff.com/v1/games

Valid URL: https://api.pff.com/v1/games?league=nfl&season=2022&week=1

API ParameterPythonPatternRequiredNullableDescription
leagueleagueYLeague slug, and the FIRST positional argument of every command that takes one — every command except the facet leaderboards, where --league stays a flag because --game alone is a complete request.
seasonseasonYSeason, as a four-digit year, taken as a positional argument.
weekweekYWeek, and the THIRD positional argument of games — the one command that takes a single week number rather than a comma-separated list.
franchise_idfranchise_idYFranchise (team) id.

Returns​

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

col_nametypedescription
away_franchise_idnumericPFF franchise id of the away team.
away_teamlistAway team object (JSON-stringified in the tidy frame).
has_statslogicalWhether PFF has published stats for the game.
home_franchise_idnumericPFF franchise id of the home team.
home_teamlistHome team object (JSON-stringified in the tidy frame).
idnumericPFF game id (integer join key).
leaguelistNested league object of the game (stringified) with the PFF league id, name and abbreviation (e.g. NFL).
league_idnumericPFF league id (integer).
lock_statuscharacterData lock/publish status for the game.
scorelistNested final-score object of the game (stringified) with away_team and home_team points.
seasonnumericSeason (starting year) of the game.
stadium_idnumericPFF stadium identifier for the game venue.
startcharacterKickoff timestamp (ISO 8601 string).
weeknumericWeek number of the game.

return_parsed=False — The decoded JSON body. /v1 routes return the Premium Stats envelope ({report_slug: rows}); /v2 routes return {..meta.., columns, rows}..

Example​

pff_api_ref_games(league='nfl', season=2022, week=1)

Last validated n/a.

pff_api_ref_players​

Search the player directory by name or id

Endpoint URL: GET https://api.pff.com/v1/players

Valid URL: https://api.pff.com/v1/players?league=nfl&name=burrow

API ParameterPythonPatternRequiredNullableDescription
leagueleagueYLeague slug, and the FIRST positional argument of every command that takes one — every command except the facet leaderboards, where --league stays a flag because --game alone is a complete request.
ididYExact player-id lookup, ref-players only.
namenameYFree-text player-name search, ref-players only.

Returns​

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

col_nametypedescription
collegecharacterCollege the player attended, as the source lists it.
current_classcharacterPlayer's current college class designation (e.g., Freshman, Senior), per PFF.
current_eligible_yearnumericYear the player is or was first draft-eligible, per PFF.
dobcharacterPlayer's date of birth (YYYY-MM-DD).
draftlistNested draft-selection details for the player (year, round, pick, and franchise) as returned by the source API.
first_namecharacterPlayer's first name as the source lists it.
heightnumericPlayer's height as the source encodes it (PFF uses feet and inches without a separator, 602 = 6'02"; others use inches or centimetres).
idnumericPFF numeric player id, the key of the player-scoped endpoints.
jersey_numbercharacterJersey number as a string.
last_namecharacterPlayer's last name as the source lists it.
positioncharacterPosition abbreviation as the source lists it (e.g. QB, WR).
speednumeric40-yard-dash time in seconds as recorded by PFF.
teamlistCurrent team of the player as the source ships it (a nested team object, stringified, or a team code).
weightnumericPlayer's weight as the source lists it (pounds for US sources).

return_parsed=False — The decoded JSON body. /v1 routes return the Premium Stats envelope ({report_slug: rows}); /v2 routes return {..meta.., columns, rows}..

Example​

pff_api_ref_players(league='nfl', name='burrow')

Last validated n/a.

pff_api_whoami​

Show what this API believes about the current credential

Endpoint URL: GET https://api.pff.com/v1/auth/whoami

Valid URL: https://api.pff.com/v1/auth/whoami

API ParameterPythonPatternRequiredNullableDescription

Returns​

Show what this API believes about the current credential

Example​

pff_api_whoami()

Last validated n/a.