Exporting ESPN Fantasy League History: What Actually Works

ESPN does not provide a built-in one-click export feature for your league's historical data. This has been true since the platform added dynasty and keeper league support, and it is unlikely to change. The workaround involves a combination of browser automation and careful scraping, which is why I keep coming back to it every time someone asks. The concept behind Unlock The Vault Every Espn Fantasy History Export Your League Data is straightforward: you use a browser script or manual workflow to pull scoring history, roster moves, and matchup results from ESPN's league pages, then compile them into a CSV or JSON file. It is not a single tool you install. It is a process you build or adapt for your own league. I have run this process for three separate leagues over the last five seasons. The first time I tried, I spent roughly four hours manually copying data from twelve weeks of playoffs. That was unsustainable. I wrote a Python script using Selenium to navigate to each week's matchup page, extract the box score lines, and save them. It took about twenty minutes total for the same workload.

Here is how the process actually works in practice. You need a league with public viewing permissions or credentials that allow you to access the URL structure ESPN uses for league pages. ESPN URLs follow a pattern like espn.com/fantasy/football/league/_/id/123456. Once you know your league ID, you can construct URLs for any week, any matchup, and any player line. The tricky part is that ESPN wraps most of its data in JavaScript-rendered tables. A simple requests.get call will not give you the HTML you need. You have to use a headless browser or parse the underlying API calls that ESPN makes when the page loads. The API endpoints are not documented anywhere. You find them by opening DevTools, watching the Network tab, and noting which XHR requests return JSON data. I discovered this the hard way. My first script crashed every time it hit Week 10 because ESPN changed the DOM structure between Week 9 and Week 10. The player performance tables were nested differently. I had to update the CSS selectors mid-scrape and redo those weeks manually. The workaround was to write a fallback parser that checks for multiple selector patterns and logs which one matched. It saved me from losing the entire dataset.

Here is the practical breakdown of what you can and cannot reliably export.

Get the Full Details

League Vault | Advanced Fantasy Football Analytics for ESPN & Sleeper
League Vault | Advanced Fantasy Football Analytics for ESPN & Sleeper

What the export covers

You can pull weekly matchup scores, starting lineups, bench players, injury designations, and waiver wire activity. The scoring matrix is available on each team's season overview page. Roster transactions from the trade and waiver period are stored in the league history section, though ESPN limits how far back that log goes depending on your league settings. For dynasty leagues, player trade history is the most useful export. I pull that every off-season and feed it into a keeper value calculator. The data format ESPN serves is inconsistent between AFC and NFC pages, which means your parser needs to handle both table structures. I wrote a normalizer that maps columns by header text rather than by position index. That way a column shift does not break everything.

What you cannot get without custom work

ESPN does not expose playoff bracket architecture through any public API. If your league uses a custom playoff seeding formula, you have to reconstruct that from the matchup results yourself. It is not difficult. It just means reading the standings page and mapping wins against the stated playoff rules in your league settings. Player projectied points before the season starts are another gap. ESPN shows projections during the season on player pages, but there is no historical projection export. I keep a spreadsheet where I manually copy starting projections each August. It takes about forty minutes once per year. You could automate it, but the projection pages reload frequently and the data structure changes week to week. There is also a rate limit issue. If you run a scraper too aggressively, ESPN's CDN starts returning captcha challenges or temporary blocks. I found that spacing requests by two to three seconds between pages keeps you under the threshold. On a sixteen-team league with twenty weeks of history, that adds up to roughly an hour of runtime. Not fast, but acceptable for a one-time annual pull.

The actual workflow I use

I run a Python script that hits the ESPN fantasy API directly rather than scraping rendered HTML. The key endpoint is something like espn.com/api/football/leagues/v2/123456/scoreboard?view=mMatchup. You append a &season=2024 parameter and you get a full JSON response with all weekly matchups, scores, and rosters for that season. This approach is cleaner because you are working with structured data instead of trying to parse HTML tables. The response includes player stats, projected points, actual points, and ownership percentages. It also includes transaction data if you request the view=mTransactions parameter. The limitation is that this endpoint requires an authenticated session cookie. You cannot run it anonymously. You log into ESPN once in your browser, extract the relevant cookies, and pass them in your requests. The cookies expire after a few weeks, so I refresh them monthly. It is a minor maintenance task.

League Vault | Advanced Fantasy Football Analytics for ESPN & Sleeper
League Vault | Advanced Fantasy Football Analytics for ESPN & Sleeper

I store the JSON output in a local SQLite database. Each table represents a season, a week, or a transaction. This makes it trivial to query keeper value, compare weekly performances, or generate custom reports. The initial setup takes about thirty minutes. After that, pulling a new season is a two-minute operation.

Common pitfalls

The biggest issue I see people run into is assuming ESPN's data is complete. It is not. Injuries submitted after the Monday night game cutoff do not appear in the exported stats. Bye weeks are sometimes marked incorrectly in the API response. And preseason games are included in some seasons but excluded in others, depending on when ESPN updated their backend. Another issue is roster changes during the week. If a manager sets their lineup on Thursday and then the injured reserve announcement comes out Friday, ESPN keeps the original lineup in the historical record. The API does not reflect the corrected lineup. You have to manually note these discrepancies if you care about accuracy. The script I maintain also breaks occasionally when ESPN pushes a minor update to their API schema. I usually notice within a day because the parser throws a key error. I check the GitHub issues for similar problems, update the affected field mappings, and push a patch. It takes ten to fifteen minutes on average.

Alternative approaches

If you do not want to write or maintain your own script, there are third-party tools that claim to export ESPN fantasy data. Most of them are outdated or require a subscription. I tested three before settling on the API approach. The free ones handled only regular season data. The paid ones charged fifty dollars a year and still missed playoff transactions. The only reliable free alternative I found is a community-maintained Google Sheet template that uses a webhook to pull data weekly. It works for basic scoring export but does not capture transactions or depth chart changes. For most casual league managers, that is enough. For anyone running a dynasty league with keeper decisions, it falls short. If you need exportable data and are willing to spend a weekend on setup, the direct API method is the best path. It gives you full control over what you store, how you store it, and what queries you run afterward. The maintenance overhead is low once the script is stable. The initial effort is the only real cost.

League Vault | Advanced Fantasy Football Analytics for ESPN & Sleeper
League Vault | Advanced Fantasy Football Analytics for ESPN & Sleeper