Player detail for any player ID in the league – rostered, free agent, or
on waivers, including defenses – shaped like a row from team_roster().
player_lookup(
playerId,
leagueId = ffl_id(),
seasonId = ffl_year(),
scoringPeriodId = ffl_week(),
cookie = ffl_cookie()
)Integer vector of player IDs. Defense IDs are negative. An error is raised if any ID doesn't match a player.
Numeric league ID or ESPN fantasy page URL. Defaults to
getOption("fflr.leagueId"). Function fails if no ID is found.
Integer year of NFL season. By default, the season is
currently set to 2026. Use a recent year or set leagueHistory to TRUE
to obtain all past data.
Integer week of NFL season. By default, NULL will
use the current week (see ffl_week()). Scoring periods are always one
week in length, whereas matchups might be longer.
The alphanumeric espn_s2 cookie string from a signed-in
session, defaulting to ffl_cookie(). Since 2025, this cookie is required
by the leagueHistory endpoint. Past seasons can also be requested without
a cookie by passing an explicit seasonId instead of using
leagueHistory = TRUE.
A tibble, one row per unique playerId in the order given, shaped
like a team_roster() row but without teamId, abbrev, or lineupSlot – a looked-up
player isn't rostered by, or slotted on, any one team.
player_info() can't do this: it 404s on defenses, whose IDs are
negative, and its upstream source drops fields inconsistently. This asks
the same kona_player_info view list_players() uses, filtered to
exactly these IDs with an X-Fantasy-Filter header, so it works for any
player regardless of which team, if any, rosters them – the building
block for simulating a roster that doesn't exist yet, as evaluate_trade()
does.
Other player functions:
all_players(),
list_players(),
player_info(),
player_news(),
player_outlook(),
recent_activity(),
transaction_counter()
if (FALSE) { # \dontrun{
player_lookup(playerId = c(4427366, -16027))
} # }