The Football API Built for Fantasy Apps
Build your fantasy football app with TheStatsAPI. Access player stats for 84,000+ players, match events, team squads, and season data across 1,196 competitions.
Fantasy football apps live and die by data. If your player stats are incomplete, your scoring engine is unreliable. If your coverage stops at the top five leagues, you are leaving users behind. TheStatsAPI gives you the foundation to build a fantasy football platform that actually works - 84,000+ players, 1,196 competitions, 20+ years of history, and every endpoint available on every plan.
What Data Do Fantasy Apps Need?
Every fantasy football platform relies on the same core data points to calculate player scores and rankings:
- Goals and assists - the backbone of any scoring system
- Appearances and minutes played - for eligibility rules and consistency metrics
- Yellow and red cards - negative scoring events most platforms track
- Shots and shots on target - used in advanced scoring models
- Clean sheets - essential for defender and goalkeeper scoring
- Team squad data - to map players to clubs and handle transfers
TheStatsAPI delivers all of these through a clean REST API with consistent JSON responses. No feature gating, no hidden tiers. You get every data point on every plan.
Key Endpoints for Fantasy
Three endpoints do the heavy lifting for most fantasy football apps.
Player Season Stats
GET https://api.thestatsapi.com/api/football/players/{id}/stats
Returns a player's aggregated statistics for a season - goals, assists, appearances, minutes, cards, and more. This is your primary endpoint for scoring calculations and player rankings.
Sample response:
{
"data": {
"player_id": 1234,
"season": "2025-2026",
"appearances": 28,
"goals": 14,
"assists": 7,
"minutes_played": 2340,
"yellow_cards": 3,
"red_cards": 0,
"shots_on_target": 42,
"clean_sheets": 0
}
}
Match Events
GET https://api.thestatsapi.com/api/football/matches/{id}/events
Returns granular match events - goals, assists, substitutions, bookings, and penalties. Use this to award points per match and build live scoring updates after each fixture.
Team Squads
GET https://api.thestatsapi.com/api/football/teams/{id}/squad
Returns the full squad for a team, including player positions and shirt numbers. Use this to populate your player pool, assign positions, and track squad changes throughout the season.
Why TheStatsAPI for Fantasy
- 84,000+ players across 1,196 competitions. Your fantasy platform can cover far more than the Premier League. Liga MX, the A-League, K League - the data is there.
- 20+ years of historical data. Build pre-season projections and trend analysis using two decades of player and match statistics, not just last season.
- 1,196 competitions worldwide. Support niche leagues that other fantasy apps ignore. That is a differentiation opportunity, not a footnote.
- Clean REST JSON with flat pricing. Every endpoint is available on every plan. You will never discover mid-build that the data you need is locked behind a higher tier.
Code Example: Fetch Player Stats in Python
import requests
API_KEY = "your_api_key"
BASE_URL = "https://api.thestatsapi.com/api"
headers = {"Authorization": f"Bearer {API_KEY}"}
# Fetch stats for a specific player
player_id = 1234
response = requests.get(
f"{BASE_URL}/football/players/{player_id}/stats",
headers=headers
)
stats = response.json()["data"]
print(f"Goals: {stats['goals']}, Assists: {stats['assists']}")
print(f"Appearances: {stats['appearances']}, Minutes: {stats['minutes_played']}")
That is all it takes. No SDK required, no complex authentication flow. A single Bearer token and standard HTTP requests.
Pricing
Most fantasy football apps fit comfortably on the Starter plan at $50/month - 100,000 requests with 30 requests per minute. That is enough to sync player stats daily across dozens of leagues.
| Plan | Price | Requests/month | Rate Limit |
|---|---|---|---|
| Starter | $50/mo | 100,000 | 30/min |
| Growth | $129/mo | 500,000 | 60/min |
| Scale | $379/mo | 5,000,000 | 300/min |
Every plan includes a 7-day free trial and access to every endpoint. No feature gating.
If your fantasy app grows beyond 100k requests, the Growth plan at $129/month gives you 5x the volume. The Scale plan is there for platforms serving thousands of active users with frequent polling.
FAQ
Does the API include the player stats I need for fantasy scoring?
Yes. The /football/players/{id}/stats endpoint returns goals, assists, appearances, minutes played, yellow cards, red cards, shots on target, and clean sheets. These cover the scoring categories used by virtually every fantasy football platform.
How often is the data updated?
TheStatsAPI provides post-match data, typically available 1-2 hours after the final whistle. For fantasy apps, this is the standard update cadence - you calculate scores after matchdays, not during live play.
Which leagues and competitions are covered?
1,196 competitions across 100+ countries. That includes every major European league (Premier League, La Liga, Bundesliga, Serie A, Ligue 1), continental tournaments (Champions League, Europa League, Copa Libertadores), and hundreds of second-tier and regional leagues worldwide.
Can I use the data commercially in my fantasy app?
Yes. All plans support commercial use. There are no separate licensing fees or usage restrictions beyond your plan's request limits. Build your product and ship it.
Ready to Power Your Sports App?
Start your 7-day free trial. All endpoints included on every plan.