Skip to main content

NFL — Sleeper fantasy API v1 (api.sleeper.app)

sportsdataverse.nfl — 15 endpoints.

sleeper_draft​

A draft.

Endpoint URL: GET https://api.sleeper.app/v1/draft/{draft_id}

Valid URL: https://api.sleeper.app/v1/draft/257270643320426496

API ParameterPythonPatternRequiredNullableDescription
draft_iddraft_idYdraft_id path parameter.

Returns​

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

col_nametypedescription
createdInt64
creatorsString
draft_idStringSleeper draft id, as a string.
draft_orderString
last_message_idString
last_message_timeInt64
last_pickedInt64
league_idStringSleeper league id the draft belongs to, as a string.
seasonString4 digit number indicating to which season(s) the specified timeframe belongs to.
season_typeStringREG or POST indicating if the timeframe belongs to regular or post season.
slot_to_roster_idString
sportString
start_timeInt64Kickoff time in eastern time zone.
statusStringDraft status (e.g. 'pre_draft', 'drafting', 'complete').
typeStringDraft type (e.g. 'snake', 'linear', 'auction').
metadata_descriptionString
metadata_nameString
metadata_scoring_typeString
settings_pick_timerInt64
settings_roundsInt64
settings_slots_bnInt64
settings_slots_defInt64
settings_slots_flexInt64
settings_slots_kInt64
settings_slots_qbInt64
settings_slots_rbInt64
settings_slots_teInt64
settings_slots_wrInt64
settings_teamsInt64

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_draft(draft_id='257270643320426496')

sleeper_draft_picks​

Picks of a draft.

Endpoint URL: GET https://api.sleeper.app/v1/draft/{draft_id}/picks

Valid URL: https://api.sleeper.app/v1/draft/257270643320426496/picks

API ParameterPythonPatternRequiredNullableDescription
draft_iddraft_idYdraft_id path parameter.

Returns​

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

col_nametypedescription
draft_idStringSleeper draft id the pick belongs to, as a string.
draft_slotInt64
is_keeperString
pick_noInt64
picked_byString
player_idStringSleeper player id of the drafted player, as a string.
reactionsString
roster_idString
roundInt64Draft round the pick was made in (1 = first round).
metadata_first_nameString
metadata_injury_statusString
metadata_last_nameString
metadata_news_updatedString
metadata_numberString
metadata_player_idString
metadata_positionString
metadata_sportString
metadata_statusString
metadata_teamString

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_draft_picks(draft_id='257270643320426496')

sleeper_drafts​

Drafts of a league.

Endpoint URL: GET https://api.sleeper.app/v1/league/{league_id}/drafts

Valid URL: https://api.sleeper.app/v1/league/289646328504385536/drafts

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYleague_id path parameter.

Returns​

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

col_nametypedescription
createdInt64
creatorsString
draft_idStringSleeper draft id, as a string.
draft_orderString
last_message_idString
last_message_timeInt64
last_pickedInt64
league_idStringSleeper league id the draft belongs to, as a string.
seasonString4 digit number indicating to which season(s) the specified timeframe belongs to.
season_typeStringREG or POST indicating if the timeframe belongs to regular or post season.
sportString
start_timeInt64Kickoff time in eastern time zone.
statusStringDraft status (e.g. 'pre_draft', 'drafting', 'complete').
typeStringDraft type (e.g. 'snake', 'linear', 'auction').
metadata_descriptionString
metadata_nameString
metadata_scoring_typeString
settings_cpu_autopickInt64
settings_pick_timerInt64
settings_player_typeInt64
settings_roundsInt64
settings_slots_bnInt64
settings_slots_defInt64
settings_slots_flexInt64
settings_slots_qbInt64
settings_slots_rbInt64
settings_slots_teInt64
settings_slots_wrInt64
settings_teamsInt64

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_drafts(league_id='289646328504385536')

sleeper_league​

A league.

Endpoint URL: GET https://api.sleeper.app/v1/league/{league_id}

Valid URL: https://api.sleeper.app/v1/league/289646328504385536

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYleague_id path parameter.

Returns​

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

col_nametypedescription
nameStringName, as reported by MFL but reordered into FirstName LastName instead of Last, First
statusStringLeague status (e.g. 'pre_draft', 'drafting', 'in_season', 'complete').
avatarString
company_idString
shardInt64
seasonString4 digit number indicating to which season(s) the specified timeframe belongs to.
season_typeStringREG or POST indicating if the timeframe belongs to regular or post season.
sportString
last_message_idString
last_author_avatarString
last_author_display_nameString
last_author_idString
last_author_is_botString
last_message_attachmentString
last_message_text_mapString
last_message_timeInt64
last_pinned_message_idString
last_read_idString
draft_idStringSleeper draft id of the league's draft, as a string.
league_idStringSleeper league id, as a string.
previous_league_idString
bracket_idString
roster_positionsString
bracket_overrides_idString
group_idStringSleeper league-group id when the league belongs to a group; null otherwise.
loser_bracket_idString
loser_bracket_overrides_idString
total_rostersInt64
metadata_trophy_loserString
metadata_trophy_loser_backgroundString
metadata_trophy_loser_banner_textString
metadata_trophy_winnerString
metadata_trophy_winner_backgroundString
metadata_trophy_winner_banner_textString
settings_bench_lockInt64
settings_daily_waiversInt64
settings_daily_waivers_hourInt64
settings_draft_roundsInt64
settings_last_reportInt64
settings_last_scored_legInt64
settings_league_average_matchInt64
settings_legInt64
settings_max_keepersInt64
settings_num_teamsInt64
settings_offseason_addsInt64
settings_pick_tradingInt64
settings_playoff_teamsInt64
settings_playoff_typeInt64
settings_playoff_week_startInt64
settings_reserve_allow_doubtfulInt64
settings_reserve_allow_outInt64
settings_reserve_allow_susInt64
settings_reserve_slotsInt64
settings_start_weekInt64
settings_taxi_allow_vetsInt64
settings_taxi_deadlineInt64
settings_taxi_slotsInt64
settings_taxi_yearsInt64
settings_trade_deadlineInt64
settings_trade_review_daysInt64
settings_typeInt64
settings_waiver_budgetInt64
settings_waiver_clear_daysInt64
settings_waiver_day_of_weekInt64
settings_waiver_typeInt64
settings_was_auto_archivedInt64
scoring_settings_sackFloat64
scoring_settings_qb_hitFloat64
scoring_settings_fgm_40_49Float64
scoring_settings_bonus_rec_yd_100Float64
scoring_settings_bonus_rush_yd_100Float64
scoring_settings_pass_intFloat64
scoring_settings_pts_allow_0Float64
scoring_settings_bonus_pass_yd_400Float64
scoring_settings_pass_2ptFloat64
scoring_settings_blk_kick_ret_ydFloat64
scoring_settings_st_tdFloat64
scoring_settings_sack_ydFloat64
scoring_settings_pr_tdFloat64
scoring_settings_rec_tdFloat64
scoring_settings_tkl_astFloat64
scoring_settings_fgm_30_39Float64
scoring_settings_kr_tdFloat64
scoring_settings_xpmissFloat64
scoring_settings_rush_tdFloat64
scoring_settings_fg_ret_ydFloat64
scoring_settings_idp_tklFloat64
scoring_settings_fgmFloat64
scoring_settings_idp_blkFloat64
scoring_settings_rec_2ptFloat64
scoring_settings_int_ret_ydFloat64
scoring_settings_idp_tkl_soloFloat64
scoring_settings_pass_attFloat64
scoring_settings_st_fum_recFloat64
scoring_settings_ffFloat64
scoring_settings_idp_intFloat64
scoring_settings_fgmiss_30_39Float64
scoring_settings_recFloat64
scoring_settings_idp_safeFloat64
scoring_settings_pts_allow_14_20Float64
scoring_settings_def_2ptFloat64
scoring_settings_fgm_0_19Float64
scoring_settings_intFloat64
scoring_settings_def_st_fum_recFloat64
scoring_settings_fum_lostFloat64
scoring_settings_pts_allow_1_6Float64
scoring_settings_kr_ydFloat64
scoring_settings_fgmiss_20_29Float64
scoring_settings_rush_attFloat64
scoring_settings_st_tkl_soloFloat64
scoring_settings_idp_sackFloat64
scoring_settings_fgm_20_29Float64
scoring_settings_pts_allow_21_27Float64
scoring_settings_bonus_pass_yd_300Float64
scoring_settings_xpmFloat64
scoring_settings_pass_sackFloat64
scoring_settings_fgmiss_0_19Float64
scoring_settings_pass_cmpFloat64
scoring_settings_tkl_lossFloat64
scoring_settings_rush_2ptFloat64
scoring_settings_def_pass_defFloat64
scoring_settings_fum_recFloat64
scoring_settings_idp_pass_defFloat64
scoring_settings_bonus_rec_yd_200Float64
scoring_settings_def_st_tdFloat64
scoring_settings_tklFloat64
scoring_settings_fgm_50pFloat64
scoring_settings_def_tdFloat64
scoring_settings_idp_fum_recFloat64
scoring_settings_bonus_rush_yd_200Float64
scoring_settings_safeFloat64
scoring_settings_pass_ydFloat64
scoring_settings_blk_kickFloat64
scoring_settings_pass_tdFloat64
scoring_settings_tkl_soloFloat64
scoring_settings_rush_ydFloat64
scoring_settings_pr_ydFloat64
scoring_settings_fumFloat64
scoring_settings_pts_allow_28_34Float64
scoring_settings_pts_allow_35pFloat64
scoring_settings_rec_ydFloat64
scoring_settings_fum_ret_ydFloat64
scoring_settings_def_st_ffFloat64
scoring_settings_pts_allow_7_13Float64
scoring_settings_idp_ffFloat64
scoring_settings_st_ffFloat64
scoring_settings_idp_tkl_astFloat64

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_league(league_id='289646328504385536')

sleeper_matchups​

Matchups for a week.

Endpoint URL: GET https://api.sleeper.app/v1/league/{league_id}/matchups/{week}

Valid URL: https://api.sleeper.app/v1/league/289646328504385536/matchups/1

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYleague_id path parameter.
weekweekYweek path parameter.

Returns​

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

col_nametypedescription
pointsFloat64Fantasy points the roster scored in the week under the league's scoring settings.
playersStringStringified list of Sleeper player ids on the roster for the week (starters and bench).
roster_idString
custom_pointsString
matchup_idString
startersString
starters_pointsString
players_pointsString

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_matchups(league_id='289646328504385536', week='1')

sleeper_players​

All NFL players (large; fetch at most once per day).

Endpoint URL: GET https://api.sleeper.app/v1/players/nfl

Valid URL: https://api.sleeper.app/v1/players/nfl

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
player_idStringPlayer id in the source's own namespace, as a string.
weightStringPlayer's weight as the source lists it (pounds for US sources).
birth_stateStringState or region of birth, where the source lists it.
birth_countryStringCountry of birth, where the source lists it.
team_abbrStringAbbreviation of the player's current team; null for a free agent or retired player.
rotoworld_idStringRotoworld player id, as a string.
news_updatedString
sportradar_idStringSportradar player id (a UUID).
team_changed_atString
teamStringCurrent team of the player as the source ships it (a nested team object, stringified, or a team code).
depth_chart_positionStringPosition slot on the team depth chart, where the source lists it.
swish_idStringSwish Analytics player id, as a string.
activeBooleanWhether the player record is active with the source (e.g. on a current roster).
last_nameStringPlayer's last name as the source lists it.
injury_body_partString
practice_participationString
injury_statusStringCurrent injury designation (e.g. 'Questionable', 'Out'); null when healthy or unknown.
collegeStringCollege the player attended, as the source lists it.
search_first_nameString
rotowire_idStringRotoWire player id, as a string.
injury_notesString
search_full_nameString
gsis_idStringNFL GSIS player id (e.g. '00-0033873'), the nflverse play-by-play key.
years_expInt64Years of professional experience.
statusStringPlayer status as the source lists it (e.g. 'Active', 'Inactive').
pandascore_idString
numberInt64Jersey number as the source lists it.
injury_start_dateString
metadataString
heightStringPlayer's height as the source encodes it (PFF uses feet and inches without a separator, 602 = 6'02"; others use inches or centimetres).
search_rankInt64
fantasy_data_idStringFantasyData player id, as a string.
espn_idStringESPN athlete id, as a string.
sportString
search_last_nameString
competitionsString
hashtagString
stats_idStringSTATS (Stats Perform) player id, as a string.
practice_descriptionString
oddsjam_idString
full_nameStringPlayer's full name as the source lists it.
fantasy_positionsString
ageInt64Player's age in years at capture (string), where the source lists it.
first_nameStringPlayer's first name as the source lists it.
player_shardString
positionStringPosition abbreviation as the source lists it (e.g. QB, WR).
high_schoolStringHigh school the player attended, with its state in parentheses where the source lists it (e.g. 'Killian (FL)').
birth_cityStringCity of birth, where the source lists it.
yahoo_idStringYahoo player id, as a string.
depth_chart_orderString
birth_dateStringPlayer's date of birth (YYYY-MM-DD), where the source lists it.
kalshi_idString
opta_idString

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_players()

sleeper_rosters​

Rosters in a league.

Endpoint URL: GET https://api.sleeper.app/v1/league/{league_id}/rosters

Valid URL: https://api.sleeper.app/v1/league/289646328504385536/rosters

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYleague_id path parameter.

Returns​

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

col_nametypedescription
co_ownersString
keepersString
league_idStringSleeper league id the roster belongs to, as a string.
metadataString
owner_idString
player_mapString
playersStringStringified list of Sleeper player ids on the roster (starters, bench and reserve).
reserveString
roster_idString
startersString
taxiString
settings_fptsInt64
settings_fpts_againstInt64
settings_fpts_against_decimalInt64
settings_fpts_decimalInt64
settings_lossesInt64
settings_pptsInt64
settings_ppts_decimalInt64
settings_tiesInt64
settings_total_movesInt64
settings_waiver_budget_usedInt64
settings_waiver_positionInt64
settings_winsInt64

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_rosters(league_id='289646328504385536')

sleeper_state​

Current NFL week and season state.

Endpoint URL: GET https://api.sleeper.app/v1/state/nfl

Valid URL: https://api.sleeper.app/v1/state/nfl

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
weekInt64Season week.
legInt64
seasonString4 digit number indicating to which season(s) the specified timeframe belongs to.
season_typeStringREG or POST indicating if the timeframe belongs to regular or post season.
league_seasonStringSeason the Sleeper league year currently points at, as a string (e.g. '2026').
previous_seasonString
season_start_dateStringFirst day of the current Sleeper season (YYYY-MM-DD).
display_weekInt64
league_create_seasonString
season_has_scoresBoolean

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_state()

sleeper_traded_picks​

Traded draft picks.

Endpoint URL: GET https://api.sleeper.app/v1/league/{league_id}/traded_picks

Valid URL: https://api.sleeper.app/v1/league/289646328504385536/traded_picks

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYleague_id path parameter.

Returns​

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

col_nametypedescription
roundInt64Draft round
seasonString4 digit number indicating to which season(s) the specified timeframe belongs to.
roster_idString
owner_idString
previous_owner_idString

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_traded_picks(league_id='289646328504385536')

sleeper_transactions​

Transactions for a week.

Endpoint URL: GET https://api.sleeper.app/v1/league/{league_id}/transactions/{week}

Valid URL: https://api.sleeper.app/v1/league/289646328504385536/transactions/1

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYleague_id path parameter.
weekweekYweek path parameter.

Returns​

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

col_nametypedescription
statusStringTransaction status (e.g. 'complete', 'failed').
typeStringTransaction type (e.g. 'waiver', 'free_agent', 'trade').
createdInt64
legInt64
draft_picksString
creatorString
transaction_idStringSleeper transaction id, as a string.
addsString
consenter_idsString
dropsStringThrows dropped
roster_idsString
status_updatedInt64
waiver_budgetString
metadata_notesString
settings_waiver_bidInt64
settings_priorityFloat64

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_transactions(league_id='289646328504385536', week='1')

Trending adds (lookback_hours, limit).

Endpoint URL: GET https://api.sleeper.app/v1/players/nfl/trending/add

Valid URL: https://api.sleeper.app/v1/players/nfl/trending/add

API ParameterPythonPatternRequiredNullableDescription
lookback_hourslookback_hoursYHours to look back (default 24).
limitlimitYNumber of players (default 25).

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

col_nametypedescription
countInt64Number of Sleeper leagues that added the player over the lookback window.
player_idStringPlayer ID (aka GSIS ID) as defined by nflreadr::load_rosters

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

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.
sleeper_trending_adds()

sleeper_user​

Look up a user by username or id.

Endpoint URL: GET https://api.sleeper.app/v1/user/{username}

Valid URL: https://api.sleeper.app/v1/user/457511950237696

API ParameterPythonPatternRequiredNullableDescription
usernameusernameYusername path parameter.

Returns​

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

col_nametypedescription
avatarString
cookiesString
createdString
currenciesString
data_updatedString
deletedString
display_nameStringFull name of player
emailString
is_botString
metadataString
notificationsString
pendingString
phoneString
real_nameString
solicitableString
summoner_nameString
summoner_regionString
tokenString
user_idString
usernameString
verificationString

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_user(username='457511950237696')

sleeper_user_leagues​

Leagues a user is in for a season.

Endpoint URL: GET https://api.sleeper.app/v1/user/{user_id}/leagues/nfl/{season}

Valid URL: https://api.sleeper.app/v1/user/457511950237696/leagues/nfl/2018

API ParameterPythonPatternRequiredNullableDescription
user_iduser_idYuser_id path parameter.
seasonseasonYseason path parameter.

Returns​

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

col_nametypedescription
last_pinned_message_idString
seasonString4 digit number indicating to which season(s) the specified timeframe belongs to.
group_idStringSleeper league-group id when the league belongs to a group; null otherwise.
loser_bracket_idString
last_author_display_nameString
total_rostersInt64
last_message_idString
draft_idStringSleeper draft id of the league's draft, as a string.
previous_league_idString
sportString
bracket_idString
bracket_overrides_idString
last_message_text_mapString
statusStringLeague status (e.g. 'pre_draft', 'drafting', 'in_season', 'complete').
last_message_attachmentString
display_orderInt64Position of the bracket slot within its round, controlling top-to-bottom rendering.
league_idStringSleeper league id, as a string.
last_author_is_botString
nameStringName, as reported by MFL but reordered into FirstName LastName instead of Last, First
company_idString
last_author_idString
roster_positionsString
last_message_timeInt64
last_read_idString
loser_bracket_overrides_idString
last_author_avatarString
last_transaction_idString
shardInt64
avatarString
season_typeStringREG or POST indicating if the timeframe belongs to regular or post season.
metadata_trophy_winnerString
metadata_trophy_winner_backgroundString
metadata_trophy_winner_banner_textString
settings_bench_lockInt64
settings_daily_waiversInt64
settings_daily_waivers_hourInt64
settings_draft_roundsInt64
settings_last_reportInt64
settings_last_scored_legInt64
settings_league_average_matchInt64
settings_legInt64
settings_max_keepersInt64
settings_num_teamsInt64
settings_offseason_addsInt64
settings_pick_tradingInt64
settings_playoff_teamsInt64
settings_playoff_week_startInt64
settings_reserve_allow_doubtfulInt64
settings_reserve_allow_outInt64
settings_reserve_allow_susInt64
settings_reserve_slotsInt64
settings_start_weekInt64
settings_taxi_allow_vetsInt64
settings_taxi_deadlineInt64
settings_taxi_slotsInt64
settings_taxi_yearsInt64
settings_trade_deadlineInt64
settings_trade_review_daysInt64
settings_typeInt64
settings_waiver_budgetInt64
settings_waiver_clear_daysInt64
settings_waiver_day_of_weekInt64
settings_waiver_typeInt64
settings_was_auto_archivedInt64
scoring_settings_sackFloat64
scoring_settings_fgm_40_49Float64
scoring_settings_bonus_rec_teFloat64
scoring_settings_fgm_ydsFloat64
scoring_settings_pass_intFloat64
scoring_settings_pts_allow_0Float64
scoring_settings_pass_2ptFloat64
scoring_settings_st_tdFloat64
scoring_settings_fgm_yds_over_30Float64
scoring_settings_rec_tdFloat64
scoring_settings_fgm_30_39Float64
scoring_settings_xpmissFloat64
scoring_settings_rush_tdFloat64
scoring_settings_fgmFloat64
scoring_settings_rec_2ptFloat64
scoring_settings_rush_fdFloat64
scoring_settings_st_fum_recFloat64
scoring_settings_fgmissFloat64
scoring_settings_ffFloat64
scoring_settings_fgmiss_30_39Float64
scoring_settings_recFloat64
scoring_settings_pts_allow_14_20Float64
scoring_settings_fgm_0_19Float64
scoring_settings_intFloat64
scoring_settings_def_st_fum_recFloat64
scoring_settings_fum_lostFloat64
scoring_settings_pts_allow_1_6Float64
scoring_settings_rec_fdFloat64
scoring_settings_fgmiss_20_29Float64
scoring_settings_fgm_20_29Float64
scoring_settings_pts_allow_21_27Float64
scoring_settings_bonus_rec_wrFloat64
scoring_settings_xpmFloat64
scoring_settings_fgmiss_0_19Float64
scoring_settings_rush_2ptFloat64
scoring_settings_fum_recFloat64
scoring_settings_def_st_tdFloat64
scoring_settings_fgm_50pFloat64
scoring_settings_def_tdFloat64
scoring_settings_safeFloat64
scoring_settings_pass_ydFloat64
scoring_settings_fgmiss_40_49Float64
scoring_settings_blk_kickFloat64
scoring_settings_pass_tdFloat64
scoring_settings_rush_ydFloat64
scoring_settings_fumFloat64
scoring_settings_pts_allow_28_34Float64
scoring_settings_pts_allow_35pFloat64
scoring_settings_rec_ydFloat64
scoring_settings_def_st_ffFloat64
scoring_settings_pts_allow_7_13Float64
scoring_settings_st_ffFloat64
metadata_trophy_loserString
metadata_trophy_loser_backgroundString
metadata_trophy_loser_banner_textString
settings_playoff_typeFloat64
scoring_settings_qb_hitFloat64
scoring_settings_bonus_rec_yd_100Float64
scoring_settings_bonus_rush_yd_100Float64
scoring_settings_bonus_pass_yd_400Float64
scoring_settings_blk_kick_ret_ydFloat64
scoring_settings_sack_ydFloat64
scoring_settings_pr_tdFloat64
scoring_settings_tkl_astFloat64
scoring_settings_kr_tdFloat64
scoring_settings_fg_ret_ydFloat64
scoring_settings_idp_tklFloat64
scoring_settings_idp_blkFloat64
scoring_settings_int_ret_ydFloat64
scoring_settings_idp_tkl_soloFloat64
scoring_settings_pass_attFloat64
scoring_settings_idp_intFloat64
scoring_settings_idp_safeFloat64
scoring_settings_def_2ptFloat64
scoring_settings_kr_ydFloat64
scoring_settings_rush_attFloat64
scoring_settings_st_tkl_soloFloat64
scoring_settings_idp_sackFloat64
scoring_settings_bonus_pass_yd_300Float64
scoring_settings_pass_sackFloat64
scoring_settings_pass_cmpFloat64
scoring_settings_tkl_lossFloat64
scoring_settings_def_pass_defFloat64
scoring_settings_idp_pass_defFloat64
scoring_settings_bonus_rec_yd_200Float64
scoring_settings_tklFloat64
scoring_settings_idp_fum_recFloat64
scoring_settings_bonus_rush_yd_200Float64
scoring_settings_tkl_soloFloat64
scoring_settings_pr_ydFloat64
scoring_settings_fum_ret_ydFloat64
scoring_settings_idp_ffFloat64
scoring_settings_idp_tkl_astFloat64
metadataFloat64

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_user_leagues(season='2018', user_id='457511950237696')

sleeper_users​

Users in a league.

Endpoint URL: GET https://api.sleeper.app/v1/league/{league_id}/users

Valid URL: https://api.sleeper.app/v1/league/289646328504385536/users

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYleague_id path parameter.

Returns​

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

col_nametypedescription
avatarString
display_nameStringFull name of player
is_botString
is_ownerBoolean
league_idStringSleeper league id the user belongs to, as a string.
settingsString
user_idString
metadata_allow_pnString
metadata_mascot_item_type_id_leg_16String
metadata_mascot_item_type_id_leg_17String
metadata_mention_pnString
metadata_player_nickname_updateString
metadata_team_nameString
metadata_team_name_updateString
metadata_transaction_commissionerString
metadata_transaction_free_agentString
metadata_transaction_tradeString
metadata_transaction_waiverString
metadata_user_message_pnString

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_users(league_id='289646328504385536')

sleeper_winners_bracket​

Playoff bracket.

Endpoint URL: GET https://api.sleeper.app/v1/league/{league_id}/winners_bracket

Valid URL: https://api.sleeper.app/v1/league/289646328504385536/winners_bracket

API ParameterPythonPatternRequiredNullableDescription
league_idleague_idYleague_id path parameter.

Returns​

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

col_nametypedescription
mInt64Matchup id within the bracket round.
rInt64Playoff round number of the bracket matchup (1 = first round).
lInt64Roster id of the matchup loser; null until played.
wInt64Roster id of the matchup winner; null until played.
t1Int64
t2Int64
t2_from_wFloat64

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The Sleeper API returned 404 (unknown user, league or draft id).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
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.

Example​

sleeper_winners_bracket(league_id='289646328504385536')