The roster of all teams in a league.

team_roster(
  leagueId = ffl_id(),
  leagueHistory = FALSE,
  scoringPeriodId = NULL,
  ...
)

Arguments

leagueId

Numeric league ID or ESPN fantasy page URL. Defaults to getOption("fflr.leagueId"). Function fails if no ID is found.

leagueHistory

logical; Should the leagueHistory version of the API be called? If TRUE, a list of results is returned, with one element for each historical year of the league.

scoringPeriodId

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.

...

Additional queries passed to httr::GET(). Arguments are converted to a named list and passed to query alongside view.

Value

A dataframe (or list) with league teams.

See also

Other roster functions: best_roster(), roster_score(), start_roster()

Examples

team_roster(leagueId = "42654852", scoringPeriodId = 1)
#> $AUS
#> # A tibble: 16 × 16
#>    seasonId scoringPeriodId teamId abbrev lineupSlot playerId firstName lastName
#>       <int>           <int>  <int> <fct>  <fct>         <int> <chr>     <chr>   
#>  1     2026               1      1 AUS    QB          4426348 Jayden    Daniels 
#>  2     2026               1      1 AUS    RB          4429160 De'Von    Achane  
#>  3     2026               1      1 AUS    RB          4685382 Omarion   Hampton 
#>  4     2026               1      1 AUS    WR          4426515 Puka      Nacua   
#>  5     2026               1      1 AUS    WR          4374302 Amon-Ra   St. Bro…
#>  6     2026               1      1 AUS    TE          4361307 Trey      McBride 
#>  7     2026               1      1 AUS    FLEX        4870808 Jeremiyah Love    
#>  8     2026               1      1 AUS    D/ST         -16026 Seahawks  D/ST    
#>  9     2026               1      1 AUS    K           3953687 Brandon   Aubrey  
#> 10     2026               1      1 AUS    BE          4567048 Kenneth   Walker …
#> 11     2026               1      1 AUS    BE          4569618 Garrett   Wilson  
#> 12     2026               1      1 AUS    BE          4685472 Tetairoa  McMillan
#> 13     2026               1      1 AUS    BE          4429615 Zay       Flowers 
#> 14     2026               1      1 AUS    BE            16800 Davante   Adams   
#> 15     2026               1      1 AUS    BE          4696981 Cam       Skattebo
#> 16     2026               1      1 AUS    BE          3915416 DJ        Moore   
#> # ℹ 8 more variables: proTeam <fct>, position <fct>, injuryStatus <chr>,
#> #   projectedScore <dbl>, actualScore <dbl>, percentStarted <dbl>,
#> #   percentOwned <dbl>, percentChange <dbl>
#> 
#> $BOS
#> # A tibble: 16 × 16
#>    seasonId scoringPeriodId teamId abbrev lineupSlot playerId firstName lastName
#>       <int>           <int>  <int> <fct>  <fct>         <int> <chr>     <chr>   
#>  1     2026               1      2 BOS    QB          3918298 Josh      Allen   
#>  2     2026               1      2 BOS    RB          4430807 Bijan     Robinson
#>  3     2026               1      2 BOS    RB          3929630 Saquon    Barkley 
#>  4     2026               1      2 BOS    WR          4430878 Jaxon     Smith-N…
#>  5     2026               1      2 BOS    WR          4241389 CeeDee    Lamb    
#>  6     2026               1      2 BOS    TE          4723086 Colston   Loveland
#>  7     2026               1      2 BOS    FLEX        3043078 Derrick   Henry   
#>  8     2026               1      2 BOS    D/ST         -16007 Broncos   D/ST    
#>  9     2026               1      2 BOS    K           2473037 Jason     Myers   
#> 10     2026               1      2 BOS    BE          4428331 Rashee    Rice    
#> 11     2026               1      2 BOS    BE          4361579 Javonte   Williams
#> 12     2026               1      2 BOS    BE          4241478 DeVonta   Smith   
#> 13     2026               1      2 BOS    BE          4612826 Ladd      McConkey
#> 14     2026               1      2 BOS    BE          4882093 Bhayshul  Tuten   
#> 15     2026               1      2 BOS    BE          4596448 Bucky     Irving  
#> 16     2026               1      2 BOS    BE          4431299 Rome      Odunze  
#> # ℹ 8 more variables: proTeam <fct>, position <fct>, injuryStatus <chr>,
#> #   projectedScore <dbl>, actualScore <dbl>, percentStarted <dbl>,
#> #   percentOwned <dbl>, percentChange <dbl>
#> 
#> $CHI
#> # A tibble: 16 × 16
#>    seasonId scoringPeriodId teamId abbrev lineupSlot playerId firstName lastName
#>       <int>           <int>  <int> <fct>  <fct>         <int> <chr>     <chr>   
#>  1     2026               1      3 CHI    QB          4431452 Drake     Maye    
#>  2     2026               1      3 CHI    RB          4429795 Jahmyr    Gibbs   
#>  3     2026               1      3 CHI    RB          4242335 Jonathan  Taylor  
#>  4     2026               1      3 CHI    WR          4426502 Drake     London  
#>  5     2026               1      3 CHI    WR          4047646 A.J.      Brown   
#>  6     2026               1      3 CHI    TE          4431459 Tyler     Warren  
#>  7     2026               1      3 CHI    FLEX        4379399 James     Cook III
#>  8     2026               1      3 CHI    D/ST         -16034 Texans    D/ST    
#>  9     2026               1      3 CHI    K           4574716 Harrison  Mevis   
#> 10     2026               1      3 CHI    BE          4258173 Nico      Collins 
#> 11     2026               1      3 CHI    BE          4361370 Chris     Olave   
#> 12     2026               1      3 CHI    BE          4430737 Kyren     Williams
#> 13     2026               1      3 CHI    BE          4595348 Malik     Nabers  
#> 14     2026               1      3 CHI    BE          4567750 Emeka     Egbuka  
#> 15     2026               1      3 CHI    BE          4685702 Quinshon  Judkins 
#> 16     2026               1      3 CHI    BE          4372016 Jaylen    Waddle  
#> # ℹ 8 more variables: proTeam <fct>, position <fct>, injuryStatus <chr>,
#> #   projectedScore <dbl>, actualScore <dbl>, percentStarted <dbl>,
#> #   percentOwned <dbl>, percentChange <dbl>
#> 
#> $DEN
#> # A tibble: 16 × 16
#>    seasonId scoringPeriodId teamId abbrev lineupSlot playerId firstName lastName
#>       <int>           <int>  <int> <fct>  <fct>         <int> <chr>     <chr>   
#>  1     2026               1      4 DEN    QB          3916387 Lamar     Jackson 
#>  2     2026               1      4 DEN    RB          3117251 Christian McCaffr…
#>  3     2026               1      4 DEN    RB          4362238 Chase     Brown   
#>  4     2026               1      4 DEN    WR          4362628 Ja'Marr   Chase   
#>  5     2026               1      4 DEN    WR          4262921 Justin    Jeffers…
#>  6     2026               1      4 DEN    TE          4432665 Brock     Bowers  
#>  7     2026               1      4 DEN    FLEX        4890973 Ashton    Jeanty  
#>  8     2026               1      4 DEN    D/ST         -16023 Steelers  D/ST    
#>  9     2026               1      4 DEN    K           4362081 Cameron   Dicker  
#> 10     2026               1      4 DEN    BE          4426354 George    Pickens 
#> 11     2026               1      4 DEN    BE          4427366 Breece    Hall    
#> 12     2026               1      4 DEN    BE          4239996 Travis    Etienne…
#> 13     2026               1      4 DEN    BE          4239993 Tee       Higgins 
#> 14     2026               1      4 DEN    BE          4259545 D'Andre   Swift   
#> 15     2026               1      4 DEN    BE          3121422 Terry     McLaurin
#> 16     2026               1      4 DEN    BE          4426388 Jameson   Williams
#> # ℹ 8 more variables: proTeam <fct>, position <fct>, injuryStatus <chr>,
#> #   projectedScore <dbl>, actualScore <dbl>, percentStarted <dbl>,
#> #   percentOwned <dbl>, percentChange <dbl>
#>