Tutorial · 11 min · endpoints verified 2026-09-17
How to build a soccer fantasy app
Build a fantasy XI from one connected soccer surface: fixtures and standings for context, scorer tables for production, and xG for the big-five leagues.
API coverage and endpoint overview: Explore the soccer API
Why this is hard
A fantasy XI needs more than a goals table
The useful decision is not simply who scored most. You need playing time, chance quality, club context and a scoring rule that your users can inspect.
- Goals and assists are results; xG and xA explain whether that production is repeatable.
- A transferred player can have more than one club in a season row, so club labels need careful parsing.
- Not every competition has the same depth. Build from the coverage response instead of borrowing data from another league.
- Your scoring formula is a product decision. Keep every weight visible and versioned.
Path 1 · recommended
Have your AI agent build it
An agent can assemble fixtures and standings through MCP, then call the league leaderboards over REST.
1. Connect the MCP server
Add the server in your MCP client and sign in with your Big Balls account. Your client registers itself and handles the token exchange — there is no key to copy.
{
"mcpServers": {
"bigballs-sports-data": {
"url": "https://mcp.bigballsdata.com/mcp"
}
}
}2. Tools your agent gets
get_matchesLive, upcoming or historical matches for a sport or league.
get_standingsLeague table with wins, losses, win_pct, games_played.
get_coverageMachine-readable map of what we hold and what we do not.
3. Ask for what you want
Paste this at your agent. It is written to make the model check coverage before it designs anything, which is what stops it inventing a field we do not serve.
Build a soccer fantasy XI. Check football coverage first, pull the current standings and fixtures, then call the league top-scorers endpoint. For a big-five league, add xG and xA. Keep the scoring weights visible, do not invent unavailable players, and label every source field.What the agent cannot reach
The MCP server does not expose scorer or xG leaderboards. Use REST for those calls. xG is a big-five dataset, not a promise for every competition.
Path 2 · hand-coded
Build it yourself
Start with a transparent points model and add advanced data only where the chosen competition serves it.
- 01
Check the live coverage map first
Ask the coverage endpoint what is served before you make a field required in your interface. An unavailable field should produce an honest empty state, not a guessed value.
Verify soccer coveragebashcurl -s "https://api.bigballsdata.com/v1/coverage?sport=football" \ -H "x-api-key: $BBS_API_KEY" - 02
Load production leaders
Use the selected league slug. The response supplies goals, assists, minutes and matches for the ranking surface.
Top scorersbashcurl -s "https://api.bigballsdata.com/v1/leagues/epl/top-scorers?season=2026&limit=50" \ -H "x-api-key: $BBS_API_KEY" - 03
Add chance quality where it exists
For the big five, xG and xA separate repeatable chance generation from finishing variance. Use the same explicit season as the scorer table. This early-season example uses a 300-minute floor; raise it as the season grows.
Expected-goals leadersbashcurl -s "https://api.bigballsdata.com/v1/leagues/epl/xg-leaders?season=2026&stat=xg&min_minutes=300&limit=50" \ -H "x-api-key: $BBS_API_KEY" - 04
Score the XI transparently
Version the weights so a rule change never rewrites an old matchday without explanation.
A visible scoring ruletypescriptconst RULE_VERSION = 'fantasy-xi-v1'; const points = (p: { goals: number; assists: number; xg?: number; xa?: number }) => p.goals * 5 + p.assists * 3 + (p.xg ?? 0) + (p.xa ?? 0);
Reference
Every endpoint this tutorial uses
All on the gateway at api.bigballsdata.com. Verified against production on 2026-09-17.
| Method | Path | Returns | Why you need it | Plan |
|---|---|---|---|---|
| GET | /v1/coverage?sport=football | Measured sport and league coverage | Prevents the app from treating competition-specific depth as universal. | Free |
| GET | /v1/leagues/:id/top-scorers | Goals, assists, minutes and matches | The production spine of the fantasy ranking. | Free |
| GET | /v1/leagues/:id/xg-leaders | xG, xA, non-penalty xG and chance-creation fields | Adds repeatability context for supported big-five leagues. Learn how to interpret xG. | Solo |
| GET | /v1/players/:id/club-form | Per-club season production for a resolved player | Supports player detail when a stable player id is available. | Free |
Pricing, honestly
Where the free tier stops
Free proves the production leaderboard and scoring rule. Solo adds supported xG leaderboards, richer form context and player imagery.
Free key
Scorers, fixtures and standings.Solo
Supported xG leaderboards, player headshots, rolling form and projections where served.- Use Free to validate the calculation.
- Use Solo when the product needs player presentation and changing form.
- Never fill an unsupported league with another competition’s players.
More tutorials
Other build guides
- How to build a fantasy hockey app
- How to build a fantasy basketball app
- How to build a soccer xG app
- How to build a cricket app
- NFL fantasy football API tutorial
- How to build an NFL scouting tool
- How to build an NFL conditions analytics tool
- NFL betting model API tutorial
- NFL live game center API tutorial
- How to build an NCAAF scoreboard and live game center
- How to build college football rankings and conference standings
- How to build an NCAAF fantasy football app
- How to build a soccer betting model
- How to build a soccer live match center
- How to build a soccer scouting tool
- How to build an NCAAF betting model
- How to build an NCAAF conditions analytics tool
Known gaps
Coverage boundaries to preserve
A shared soccer tutorial still has competition-specific evidence boundaries.
- xG and xA are limited to supported big-five leagues.
- Player identity can be unresolved on source leaderboards; do not join on a convenient same-name result.
- Absence coverage varies by competition and is not a universal soccer injury feed.
Questions
- Is there one official soccer fantasy scoring system?
- No. The tutorial uses an explicit example formula so readers can replace it without confusing a product choice with an API field.
- Do all soccer leagues include xG?
- No. Use the coverage response and treat xG as an optional big-five enrichment.
- Should I create one tutorial per league?
- No. The requests and scoring workflow are sport-level; only the league slug and measured coverage change.
Related APIs
Other APIs you can build with: