mormanski / fpl-lib
PHP Library to access the undocumented https://fantasy.premierleague.com API
1.0.0
2026-10-10 17:49 UTC
Requires
- php: >=7.2.5
- symfony/http-client: ^5.4 || ^6.0 || ^7.0
Requires (Dev)
- phpunit/phpunit: ^9.5 || ^10.0 || ^11.0
- symfony/polyfill-mbstring: ^1.20
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
PHP Library to access the undocumented https://fantasy.premierleague.com API
Installation
Using composer
composer require mormanski/fpl-lib
Using github repository
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/mormanski/fpl-lib"
}
],
"require": {
"mormasnki/fpl-lib": "master"
}
}
Using the library
use Mormanski\FplLib\FplLib;
$fpl = new FplLib();
API Endpoints
https://fantasy.premierleague.com/api/bootstrap-static
$bootstrapStatic = $fpl->bootstrapStatic();
https://fantasy.premierleague.com/api/leagues-classic-standings/{leagueId}
$leaguesClassicStandings = $fpl->leaguesClassicStandings(123123);
https://fantasy.premierleague.com/api/entry/{entryId}
$entry = $fpl->entry(1234567);
https://fantasy.premierleague.com/api/entry/{entryId}/history
$entryHistory = $fpl->entryHistory(1234567);
https://fantasy.premierleague.com/api/entry/{id}/event/{eventId}/picks
$data = $fpl->entryPicks($entryId, $eventId);
https://fantasy.premierleague.com/api/element-summary/{elementId}
$elementSummary = $fpl->elementSummary(123);
Terminology
- An entry is equivalent to a contestant in the competition
- An element is equivalent to a player
- An event is equivalent to a game week, for instance eventId => 2 denotes game week 2.