espnfantasy_league_history
Retrieve historical ESPN fantasy league seasons, including pre-2018 data. Returns an array for a single season or all seasons after checking league history availability.
Instructions
Pre-2018 seasons and cross-season history via the leagueHistory path. Only works for leagues that HAVE history — check espnfantasy_status.status.previousSeasons first; an empty list there means this returns 404. Returns a single-element ARRAY, not an object.
Returns: [{id, seasonId, settings, teams, status, …}] — ARRAY wrapper; index [0] for a single seasonId. 404 when the league has no leagueHistory record (verified: public league 1234 reports status.previousSeasons == [] and 404s here) — fall back to the seasons path.
Example: A 2017 season for a long-running league {"game": "ffl", "leagueId": 1234, "seasonId": 2017}
Auth: works without a key; ESPN_FANTASY_COOKIE unlocks more if set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| game | No | Fantasy game code. One of: ffl, flb, fba, fhl, wfba. | ffl |
| view | No | Same view vocabulary as the seasons path. | |
| leagueId | Yes | League id. Required — part of the URL path. | |
| seasonId | No | Season year to read. Omit to get every season the league has history for. |