Getting FPL Data - efemkay/fpl_analytics GitHub Wiki

Original Article: https://www.oddsonfpl.com/how-to-get-data-from-the-fantasy-premier-league-api/

Some of you may not know that FPL provides an API which is available for free to developers to use (or people like me who feign knowledge of web development).

First and foremost I’ll provide you with the URLs for their API:

There are a number of other sub URLs which can be used with appending the link onto the base URL below:

Base URL: https://fantasy.premierleague.com/drf/

Relative links:

  • /bootstrap (more data if authenticated)
  • /bootstrap-static
  • /bootstrap-dynamic
  • /events
  • /elements
  • /element-types
  • /fixtures
  • /teams
  • /region
  • /transfers (requires auth)
  • /entry/{entryId}
  • /entries (doesn’t work in pre-season?)
  • /my-team/{teamId} (requires auth)
  • /leagues-entered/{teamId} (requires auth)
  • /leagues-classic/{leagueId} (must be a member)
  • /leagues-classic-standings/{leagueId}
  • /leagues-h2h/{leagueId} (must be a member)
  • /leagues-h2h-standings/{leagueId}

While I understand a lot of these URLs may be useless to you, we’ll be using two of them to pull data from players from the previous season. Originally we will be using the /bootstrap-static data. From clicking the link you can firstly see a section called “phases”, which from looking at the text following relates to sections of the season: