SD

20 free sources · 7 sports

Free sports data, APIs and datasets

Free sports data for your own analysis, in one list: APIs for current fixtures, results and standings, open datasets with event, play-by-play and ball-by-ball data going back decades, and R and Python libraries that fetch and clean it for you. Most

Free sports data APIs

5

Request current fixtures, results, standings and player stats from your own code. Some need a free API key.

  • football-data.orgfootball-data.orgFree REST API for fixtures, results and tables across major competitions.FootballAPIFree
  • NHL API Referencegithub.comCommunity docs for the NHL's public stats API — build your own datasets.HockeyAPIFree
  • nba_apigithub.comPython client for NBA.com stats — pull game logs and play-by-play in bulk.BasketballAPIFree
  • MLB-StatsAPIgithub.comPython wrapper for MLB's free official Stats API: schedules, standings, box scores and player stats.BaseballAPIFree
  • CollegeFootballDatacollegefootballdata.comCollege football data and API: schedules, box scores, play-by-play, team metrics and win probability.American FootballAPICollege

Open sports datasets

10

Download complete files: event and play-by-play data, ball-by-ball records, tracking data and results going back decades.

  • StatsBomb Open Datagithub.comFree event-level data from selected competitions for building your own models.FootballDatasetFree
  • openfootballgithub.comOpen public-domain fixtures and results for leagues and tournaments.FootballDatasetFree
  • engsoccerdatagithub.comR package with English and European league results going back to 1888.FootballDatasetFree
  • MoneyPuck Datamoneypuck.comFree shot-level and game-level datasets with xG back to 2007.HockeyCSVFree
  • Match Charting Project Datagithub.comRaw shot-by-shot data for thousands of charted pro matches.TennisDatasetFree
  • Retrosheetretrosheet.orgFree play-by-play for every AL and NL season since 1908, plus box scores and game logs.BaseballPlay-by-playFree
  • Lahman Databasesabr.orgSeason stats for every MLB player and team since 1871, in CSV and SQL formats.BaseballDatasetFree
  • nflversegithub.comFree NFL play-by-play back to 1999 with EPA and win probability, plus rosters and stats, for R and Python.American FootballPlay-by-playFree
  • NFL Big Data Bowloperations.nfl.comThe NFL's annual analytics competition, which releases real player-tracking data.American FootballTrackingDataset
  • Cricsheetcricsheet.orgFree ball-by-ball data for over 20,000 matches: Tests, ODIs, T20Is and leagues such as the IPL.CricketBall-by-ballDatasetFree

Code libraries for R and Python

5

Packages that fetch and clean the data for you, ready for analysis in R or Python.

  • Hockey-Scrapergithub.comPython package to scrape NHL play-by-play and shifts data.HockeyCodeFree
  • hoopRgithub.comR package for NBA and college play-by-play and box score data.BasketballCodeFree
  • pybaseballgithub.comPython package that downloads Statcast, FanGraphs and Baseball-Reference data.BaseballCodeFree
  • baseballrbillpetti.github.ioR package for MLB, Statcast and college baseball data, with functions for wOBA, FIP and more.BaseballCodeFree
  • cricketdata (R package)github.comDownloads ESPNcricinfo and Cricsheet data into R, ready for analysis.CricketCodeFree

How to pick a free data source

Current season or history?

For this season's fixtures, results and standings, start with an API: football-data.org for European football, the NHL's stats API (see NHL API Reference), MLB-StatsAPI or nba_api. For long histories, Retrosheet has play-by-play for every MLB season since 1908, the Lahman Database goes back to 1871 and engsoccerdata to 1888.

Data for your own models

Event-level data is what xG, EPA and win probability models are built on. StatsBomb Open Data covers selected football competitions, nflverse has NFL play-by-play back to 1999, MoneyPuck Data has hockey shots with xG back to 2007, and Cricsheet has ball-by-ball data for over 20,000 matches.

Before you publish

Free to download doesn't always mean free to reuse. Many sources ask you to credit them, some allow non-commercial use only, and competition data such as the NFL Big Data Bowl comes with its own rules. Read each source's licence or terms before you publish charts or build an app on the data.

How can all this data be free, and who pays for it? Read Where free sports data comes from.