Our requests to FPL
FPL Edge reads the public Fantasy Premier League API, from servers in London. This page says what it asks for, how often, and how it holds itself back. If you run FPL's servers and want it to ask less, or not at all, write to us and it will.
How to recognise it
Every request FPL Edge sends to FPL carries these headers:
User-Agent: Mozilla/5.0 (compatible; FPLEdge/<version>; +https://fplgambit.app/bot) Accept-Language: en-GB From: viraj.vaitha@gamemindlabs.com
The User-Agent is in the form search engines' crawlers use: “compatible” marks an automated client rather than a browser, and the link leads here. It asks for British English because that is what its readers read. It sends no Referer, since it arrives from no page of FPL's, and logs in to nothing: it reads only what FPL publishes to everyone.
What it fetches, and how often
Everything is cached and shared by every visitor, so what one person looks at is not fetched again for the next. How long a copy is kept before it is asked for again depends on the stage of the gameweek:
- Event status (
/api/event-status/): once a minute, from a scheduled job. It is the payload that says a match has started. - Players, clubs and gameweeks (
/api/bootstrap-static/) and live scores (/api/event/<gw>/live/): every 30 seconds at most while matches are being played, every 5 to 30 minutes otherwise, hourly before the season. - Fixtures (
/api/fixtures/): every minute during matches, up to hourly otherwise. - A team (
/api/entry/<id>/) when someone enters its ID, and a league's table (/api/leagues-classic/<id>/standings/) when someone opens it: private leagues only, and at most its first four pages. Each is kept for between a minute and an hour, depending on the gameweek's stage. - Squads (
/api/entry/<id>/event/<gw>/picks/): one for each manager a view of a league compares, in private leagues of up to 200. A squad fetched after the deadline cannot change and is never asked for again. For leagues opened in the last fortnight, the scheduled job fetches the gameweek's squads in the background from 45 minutes after the deadline, about fifty a minute at most, so that they are not all asked for at once when someone next looks.
A team, league or squad FPL says does not exist is remembered for ten minutes, so an unknown ID costs FPL one request, not one per visitor.
How much it asks at most
Every request to FPL, from every one of our servers, draws on one shared budget, kept in our database:
- At most 20 at once, refilled at 2 a second: a sustained 120 a minute across the whole site.
- Within that, at most 30 league table pages and 90 squads a minute, so no single kind of request can use it all.
- At most four requests in flight at a time from each server.
- The background job takes from the budget only while more than half of it is left, so it never adds to a busy minute.
Each visitor is also limited: ten new team IDs in ten minutes, one forced refresh of a view every two minutes, and three leagues nobody has opened lately in a day.
When FPL says no
- A 403 or 429 stops every request from every one of our servers for 60 seconds, doubling with each further refusal up to 15 minutes, and back to 60 after an hour without one. A 429's Retry-After is honoured. Visitors are shown the last copy we have instead.
- A refused request is never retried.
- A 502, 503 or 504, or a dropped connection, is retried once, after a short random delay; a request that timed out is not.
Asking us to slow down or stop
Write to viraj.vaitha@gamemindlabs.com. We will honour a request from FPL to slow down or to stop altogether, promptly and without argument, and confirm when it is done. We would rather ask less than be turned away.
Stopping takes a switch, not a new release: within a minute of it, none of our servers asks FPL for anything, and the site shows only what it has already saved.