Best Historical Football Data APIs in 2026
Compare the best historical football data APIs and datasets for ML models, backtesting, dashboards, xG analysis, odds research, and CSV exports.
Historical football data comes in three different shapes: paid REST APIs, free CSV datasets, and public archives. They all look useful in search results, but they solve different problems.
If you only need old final scores for a spreadsheet, a free CSV source may be enough. If you are building a production dashboard, prediction model, betting tool, fantasy app, or data warehouse, you need stable IDs, seasons, pagination, player stats, match stats, xG, odds, and a repeatable way to refresh the data.
Disclosure: we build TheStatsAPI. It is listed first because this is our site, but the alternatives below are real options and the tradeoffs are worth understanding.
The biggest trap in this category is mistaking "has historical data" for "has production-grade historical data." A CSV archive, scraped table, or thin low-cost API can be fine for a notebook and still be painful for a real product: duplicate teams, renamed clubs, unstable player IDs, missing lower-league stats, and schema drift across seasons all create cleanup work you only discover after the first backfill.
TL;DR
| Use case | Best option | Why |
|---|---|---|
| Best historical REST API for apps | TheStatsAPI | 10 years of matches, player data, match stats, odds, and xG where available |
| Best free CSV archive for betting research | football-data.co.uk | Long-running downloadable CSV files with historical results and odds columns |
| Best free event-data learning set | StatsBomb Open Data | High-quality event data for selected competitions, but not current/live coverage |
| Best free API for learning | football-data.org | Clean REST API and permanent free tier for 12 competitions |
| Best very large paid catalog | Sportmonks | Broad listed coverage, with league limits and add-ons to check carefully |
| Best budget prototype API | API-Football | Low entry price and broad match coverage, with daily request caps |
| Best historical reference archive | RSSSF/open archives | Useful for editorial context, not a modern API |
Historical API vs CSV Dataset vs Archive
| Format | What it is good for | What breaks later |
|---|---|---|
| REST API | Apps, dashboards, scheduled backfills, repeatable ETL, live refreshes | Usually paid once you need real coverage |
| CSV dataset | Quick analysis, notebooks, simple model experiments | No live updates, weak IDs, schema drift across seasons |
| Public archive | Historical facts, winners, scorers, old tournament context | Not built for production software or automated sync |
| Scraped source | Personal experiments where terms allow it | Fragile, legally risky, and easy to break at scale |
Data Quality Checks Before You Buy
Run these checks before choosing a historical football data provider:
- Duplicate entity test. Pick five players who transferred clubs and five teams with name changes. Make sure the provider does not create duplicate IDs that break career or club history.
- Season join test. Pull the same competition across three seasons and confirm match, team, player, and stats fields join cleanly.
- Lower-coverage test. Do not only test Premier League or Champions League rows. Test the exact smaller leagues you will ship.
- Correction test. Check whether postponed fixtures, abandoned matches, penalty shootouts, and late score corrections are represented consistently.
- Add-on test. Confirm whether historical odds, xG, player stats, and older seasons are actually included or require a more expensive tier.
Comparison Table
| Source | History | Live updates | Odds | xG | Player stats | Format | Best use case |
|---|---|---|---|---|---|---|---|
| TheStatsAPI | 10 years | Yes | Yes | Where available | Yes | REST JSON | Apps, models, warehouses |
| football-data.co.uk | 30+ years | No | Historical CSV odds | No | No | CSV | Betting research |
| StatsBomb Open Data | Selected competitions | No | No | Yes | Event/player events | JSON | Analytics education |
| football-data.org | Selected historical seasons | Paid live scores | Paid/limited | No | Limited | REST JSON | Learning and simple apps |
| Sportmonks | Plan/add-on dependent | Yes | Add-on | Add-on | Plan dependent | REST JSON | Large catalog buyers |
| API-Football | Multi-season coverage | Yes | Yes | Varies | Yes | REST JSON | Budget prototypes |
| RSSSF/open archives | Deep historical context | No | No | No | Editorial facts | HTML/text | Research context |
TheStatsAPI
TheStatsAPI is the best fit when historical football data is not just an offline dataset. You can pull competitions, seasons, finished matches, match stats, player stats, shotmaps, and odds from one REST API, then run the same integration for current and future seasons.
Strengths:
- Stable competition, season, match, team, and player IDs.
- 10 years of historical data on every plan.
- Match stats, xG, player stats, and odds where coverage is available.
- Same endpoint shape for historical backfills and live apps.
- AI-readable docs at api.thestatsapi.com/llms.txt.
Weaknesses:
- It is a paid API after the trial.
- It is football-first rather than a broad multi-sport historical warehouse.
Best for: prediction models, football analytics dashboards, data warehouses, fantasy apps, media products, and products that need historical data plus live refreshes.
football-data.co.uk
football-data.co.uk is a strong free option for analysts who want downloadable football results and historical betting odds in CSV files. It is especially useful for notebooks and backtesting old betting strategies.
Strengths:
- Long-running historical coverage.
- CSV format works immediately in Python, R, Excel, and DuckDB.
- Useful odds columns for market research.
Weaknesses:
- It is not a REST API.
- It does not provide live scores, player stats, lineups, shotmaps, or xG.
- CSV schemas can require cleaning before use in production.
- Entity IDs are not the product. You will usually need to build your own team/player mapping layer if you want durable joins.
Best for: offline betting research and quick historical experiments.
StatsBomb Open Data
StatsBomb Open Data is one of the best free sources for learning football analytics. It includes event-level data for selected competitions, including xG and rich event context.
Strengths:
- High-quality event data.
- Great for learning xG, event models, passing networks, and shot analysis.
- Free for supported open-data competitions.
Weaknesses:
- Limited competition coverage.
- Not a live or current-season API.
- Not designed as a full production data feed.
Best for: education, analytics notebooks, and learning event-data methods.
football-data.org
football-data.org is a clean REST API with a permanent free tier for selected major competitions. It is good for learning, hobby apps, and basic historical fixture/result access.
Strengths:
- Real API, not CSV scraping.
- Permanent free tier.
- Simple response shapes and good docs.
Weaknesses:
- Free tier is limited by competition and rate limit.
- No xG.
- Player-level and advanced data are limited compared with paid football APIs.
- Production features such as live scores, statistics, and odds sit behind paid plans or add-ons, so the free tier is not the full product.
Best for: learning API development and simple historical fixture apps.
Sportmonks
Sportmonks is a broad football data provider with a very large listed league catalog. It can work well for historical data, but buyers need to check plan limits, league gates, and add-ons before assuming the headline coverage includes everything.
Strengths:
- Large listed league catalog.
- Official SDKs.
- Add-ons for deeper data types.
Weaknesses:
- League limits and add-ons can make the real cost hard to predict.
- Odds, xG, and deeper history may not be part of the base plan you first price.
- Headline league count is not the same as clean historical coverage. Test old seasons, promoted/relegated teams, player IDs, and stat availability before committing.
Best for: teams that need specific long-tail leagues and are comfortable configuring a larger vendor plan.
API-Football
API-Football is useful for cheap prototypes and broad fixture coverage. It offers a low entry price and a large competition list, but the daily request-cap model can be awkward for large backfills.
Strengths:
- Low headline price.
- Broad match coverage.
- Good for MVPs and experiments.
Weaknesses:
- Daily caps can slow historical syncs.
- Advanced data quality varies by competition.
- Historical depth and xG are not the main reason to choose it.
- If a provider's IDs behave differently across team, competition, or season contexts, your backfill code needs defensive composite keys. Test that before loading years of data.
Best for: budget prototypes and apps that can tolerate daily limits.
Best for ML and Backtesting
For model training, the most important features are not just the number of seasons. You need stable team IDs, reliable match dates, score fields, stats availability flags, xG where available, and odds snapshots if you want to compare your model to the market.
TheStatsAPI is the best fit when you want to train against historical matches and then keep the same pipeline running for new matches. football-data.co.uk is the best free fallback if your model only needs results and historical odds columns.
Best for Dashboards
Dashboards need data that can refresh. A CSV archive is fine for historical charts, but as soon as users expect current fixtures, player pages, live scores, or odds panels, use a REST API. TheStatsAPI, Sportmonks, API-Football, and football-data.org are the practical options.
Best Free Data
Pick based on what you need:
- football-data.co.uk for long-running CSV results and odds.
- StatsBomb Open Data for event-data education.
- football-data.org for a free REST API.
- RSSSF/open archives for editorial history and research context.
API Example: Backfill Matches and Stats
Use the documented TheStatsAPI flow: find a competition, find its seasons, paginate matches, then fetch match stats only where coverage is available.
import os
import time
import requests
API_KEY = os.environ["THESTATSAPI_KEY"]
BASE_URL = "https://api.thestatsapi.com/api"
headers = {"Authorization": f"Bearer {API_KEY}", "Accept": "application/json"}
def get(endpoint, params=None):
response = requests.get(
f"{BASE_URL}{endpoint}",
headers=headers,
params=params or {},
timeout=30,
)
response.raise_for_status()
return response.json()
def all_pages(endpoint, params):
page = 1
rows = []
while True:
payload = get(endpoint, {**params, "page": page, "per_page": 100})
rows.extend(payload["data"])
if page >= payload["meta"]["total_pages"]:
return rows
page += 1
time.sleep(0.3)
seasons = get("/football/competitions/comp_3039/seasons")["data"]
season_id = next(s["id"] for s in seasons if s["id"] == "sn_3057848")
matches = all_pages("/football/matches", {
"competition_id": "comp_3039",
"season_id": season_id,
"status": "finished",
})
for match in matches:
if not match.get("xg_available"):
continue
stats = get(f"/football/matches/{match['id']}/stats")["data"]
print(match["id"], stats["overview"].get("expected_goals"))
FAQ
What is the best historical football data API?
TheStatsAPI is the best default if you need historical matches plus stats, player data, odds, xG, stable IDs, and live refreshes through one REST API. If you only need free CSV files, football-data.co.uk is a strong option.
Is there a free historical football data API?
football-data.org has a useful free REST API for selected competitions. For free non-API datasets, football-data.co.uk and StatsBomb Open Data are better-known options.
Can I get historical football odds data?
Yes, but coverage depends on the provider. TheStatsAPI includes football odds where available through the match odds endpoint. football-data.co.uk is useful for historical CSV odds research.
Can I use historical football data for prediction models?
Yes. Use finished matches, team IDs, match stats, xG, shotmaps, and odds where available. Keep external ratings such as Elo or FIFA rankings in your own dataset and join them by team/date.
Should I use CSV files or a REST API?
Use CSV files for offline research and one-off notebooks. Use a REST API when you need scheduled backfills, current-season refreshes, live stats, player pages, or production dashboards.
Related API Buyer Guides
- Best football stats API for the broader provider comparison.
- Best football API for prediction models if your historical data will feed an ML or betting model.
- Best football odds APIs if your backtest needs opening prices, live odds, or closing-line validation.
- How to get historical football data via API for a practical download workflow.
Ready to Power Your Sports App?
Start your 7-day free trial. All endpoints included on every plan.