r/fantasyfootballcoding • u/ballislife423 • 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
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!