API
The MFL API gives read access to the data behind the MFL app: players, clubs, competitions, matches and the marketplace. Use it to build scouting tools, dashboards, Discord bots and anything else for the community.
- Base URL:
https://api.playmfl.com - Token: recommended. Send your MFL API token in the
X-MFL-Api-Tokenheader. See API Token to get one. - Format: JSON, UTF-8.
Play fair: read the rate limits below, send a User-Agent that names your tool, and keep your token on your server.
The reference below is generated from our OpenAPI document. For the codes and values the API returns (countries, positions, formations, statuses…), see Resources.
Rate limits
The API is shared by the MFL app and every community tool, so calls are rate limited. When you go over the limit, the API answers 429 Too Many Requests: stop, wait, then retry with a growing delay (for example 5 s, 10 s, 30 s, 1 min). Retrying immediately keeps you blocked for longer.
Limits apply per IP address, with or without a token. Tools hosted on a shared platform, such as Cloudflare Workers, share their IP address with other tools, and their limit too.
A 429 sent from a browser doesn't carry CORS headers: the browser reports it as a network error, not as a 429.
To stay well under the limits:
- Bulk data: download the players export instead of paging through
GET /players. - Cache: keep what you fetched, and fetch it again only when it can have changed. Player stats change once a day after training, a finished match never changes, and the reference data (countries, positions, formations…) only with a new season.
- Spread your calls: no more than 5 requests in parallel, and about 1 request per second on average for a long job. Avoid running every job at the top of the hour.
- Don't poll faster than the data changes: for recent results, poll
GET /matches/feedevery few minutes instead of fetching each match.
If your tool needs more, request a token and tell us what you call and how often: we can adjust its limits.
Building with an AI assistant? Point it to guide.playmfl.com/llms.txt.
