Skip to main content

Read views

Every league read is a GET on the reads host with one or more view= parameters. Use this page to pick the right view and to learn which ones lie during a practice draft.

GET https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/{seasonId}/segments/0/leagues/{leagueId}?view=mRoster&view=mSettings&view=mTeam

buildLeagueReadUrl in espn_api.js builds this URL. The request carries the espn_s2 and SWID cookies from the browser context.

Which view returns what?​

ViewReturnsUsed byConfidence
mRosterteams[].roster.entries[]: playerId, lineupSlotId, playerPoolEntry.player.{fullName, defaultPositionId, injuryStatus}readRoster, readRostersConfirmed live
mSettingssettings.rosterSettings.lineupSlotCounts (the league's slot shape) and scoringPeriodIdreadRoster, fetchDraftTotalsConfirmed live, 08-11
mTeamteams[] with lineupLocked, rosterLocked and transactionCounterreadRoster, session checksConfirmed live
mPendingTransactionspendingTransactions[]. The key is missing when nothing is pending.readPendingTradesEmpty state confirmed live, 10-03. Populated shape unverified.
mTransactions2Executed history: transactions[] with type, status, relatedTransactionId, items[]readTradeHistoryConfirmed live, 10-03
draftInitFull player catalog with defaultPositionId, proTeamId, draftRanksByRankType.STANDARD.rank, ownership.percentOwnedfetchDraftPlayerPoolConfirmed live, works in practice drafts
mDraftDetaildraftDetail.picks[] with overallPickNumberreadDraftPicks, draft_sync.jsUnreliable for practice drafts (see below)
kona_league_communicationLeague activity feed and chat as topics[]readLeagueChatConfirmed live, 10-03
A missing key means empty

ESPN omits an empty array rather than returning []. Treat a missing pendingTransactions (or transactions) key as no rows. readPendingTrades reads both key names because the populated shape hasn't been seen yet.

Filtering with x-fantasy-filter​

Some views accept a JSON filter in the x-fantasy-filter request header. ESPN honored both of these live. The worker filters the response again anyway.

ViewFilter
mTransactions2{"transactions":{"filterType":{"value":["TRADE_PROPOSAL","TRADE_ACCEPT","TRADE_DECLINE","TRADE_VETO","TRADE_UPHOLD"]}}}
kona_league_communication{"topics":{"filterType":{"value":["CHAT_ALL_MEMBERS"]}, …}}

Without a scoringPeriodId query parameter, mTransactions2 appears scoped to the current scoring period. Pass &scoringPeriodId={n} to read an earlier week.

League chat without the iframe​

GET …/leagues/{leagueId}/communication/?view=kona_league_communication returns the activity feed as topics[].

TopicContains
ACTIVITY_TRANSACTIONSAdds, drops and trades
ACTIVITY_SETTINGSLeague settings changes
CHAT_ALL_MEMBERSLeague chat posts, with messages[].{author, date, for, to, messageTypeId}

ESPN's league-manager posts carry author: "LM" and content: null for templated cards. No member post had been seen when this was recorded, so the member-post shape is unconfirmed.

Why not read the chat iframe?
  • The clubhouse chat iframe (iframe.chat--container--iframe) exists only after you click the toggle span.chat--container--header--title.
  • It loads https://chat.espn.com/1/{leagueId}/{season}/0/directory, which is the room list, not a message feed. It renders about 1 s after the click.
  • Reading body.innerText straight after the click returns an empty string or the room list.

The REST feed avoids all of this, so trade_bot.js no longer navigates the clubhouse.

mDraftDetail is unreliable for practice drafts​

Confirmed live on 08-16 and 08-17: during a practice draft, mDraftDetail returned zero picks while the WebSocket confirmed every pick. After the draft, it returned an empty draftDetail. The cwendt94/espn-api maintainer reports the same thing: live drafts use a separate backend.

Unverified for real league drafts

Whether mDraftDetail works for a real, persisted league draft is still unverified.

  • draftInit and mSettings + mTeam kept working in the same rooms, because they read season data, not draft-instance state.
  • Once a practice draft ends, these reads return LEAGUE_NOT_FOUND_DELETED.
  • See Draft room for how the worker copes.

Other endpoints​

EndpointPurpose
…/leagues/{leagueId}/teams/{teamId}/draftSecurityPart of the draft room's bootstrap. 200 means the session may act for that team.
…/leaguedirectory/MOCKDRAFT_LOBBYPolled by the mock draft lobby while it waits to join a room.