Does anyone know if there is an API for the fantasy Premier league website? Found a few old posts but the links don't work anymore. There are a couple of apps on the app store so must be something ?
With fpl you can easily use the Fantasy Premier League API in all your Python scripts, exactly how you expect it to work.
Introduction to Fantasy Sports API¶Currently the APIs support retrieval of Fantasy Football, Baseball, Basketball, and Hockey data including game, league, team, and player information. The APIs are based on a RESTful model.
There is no indication or evidence of a security breach on the accounts of these FPL managers via fantasy.premierleague.com or the Premier League mobile app.
EDIT
It seems for the 2019/2020 season, they renamed the URLs from drf
to api
. Here are the new URLS:
All player/team data and more:
ORIGINAL
These are new ones that currently work:
EDIT: To find out about the links, you can check the APIs called by the fpl website client. On Chrome, go to view -> developer -> developer tools. Then click on the network tab. After that, click on a player info in your team, and check the call that is being made on the network tab (see pic below).
EDIT 2: You can see an example of implementation in Python here where you get interesting statistics about a certain league. You can use it as a starting point. https://github.com/spinach/FantasyPremierLeague-Api_Python
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With