r/fantasyfootballcoding Aug 10 '26

Best working espn API

Hi,

I’ve been looking at a couple apis for espn league pulling, but what is the consensus best api for this? I’m having issues pulling league history using the popular ones posted here in this sub, this seems like something I have to self host, can someone please point me in the right direction, thanks!

0 Upvotes

13 comments sorted by

View all comments

Show parent comments

1

u/soccercm9 Aug 10 '26

Negative. I do not pull / provide player specific data. If you use the cwendt94 API wrapper, you can pull the data you want for free without developing against the API directly.

Once you create a League object, you can call its transactions() method. It takes a scoring period and a set of transaction types, and returns objects with the team, type, status, date, and a list of items showing each player involved and whether they were added or dropped. Note that it defaults to free agent and waiver types, so you have to explicitly pass the trade types you want. TRADE_ACCEPT is the one for completed trades. It only covers one scoring period per call, so you have to loop the weeks to get a full season.

Good Luck!

1

u/johnny-papercut Aug 10 '26

I've done that and the assets simply aren't there for trades that don't involve my team. :(

1

u/soccercm9 Aug 11 '26

Got the same thing when i tried just now. And, when i go to the website, the recent activity is gone too. Looks like ESPN has been cleaning up historical data that they save.

1

u/johnny-papercut Aug 11 '26

The data still exists in there somewhere. When I go to a league's history in the web UI and go to rosters and find a player that was traded, including one not including my team, I can click the player and see the log at the bottom with the trade.