Player Stats Data: Sources, Licensing, and How to Use It

Player stats data comes from league endpoints, commercial providers such as Sportradar, Genius Sports and Stats Perform, and open projects such as nflverse, Retrosheet and StatsBomb's open data. Choose the layer you need, box score, play-by-play or tracking, then check the licence, map player IDs across sources, and convert totals to rates before comparing.

Three granularities of player data

Player statistics come in three layers, and the layer decides what questions you can answer.

Box scores. One row per player per game: minutes, points, rebounds, passing yards, shots, saves. Every league publishes them, every provider carries them, and they are enough for season averages, game logs and most fantasy or prop baselines. What they cannot tell you is context: when in the game something happened, against whom, or with which teammates on the field.

Play-by-play. Every event in sequence with a game clock, score state and the players involved. From play-by-play you can rebuild box scores, but also lineups, on-off splits, leverage situations and per-possession rates. It is the layer most public modelling work is built on, because it carries game state without being enormous.

Tracking. Positions of every player, and often the ball, many times per second, from optical cameras or worn sensors. It measures speed, spacing and off-ball movement that events cannot. Raw tracking is mostly licensed to clubs, leagues and commercial partners; the public usually sees derived aggregates or small research releases. The tracking data overview covers what those files contain.

Pick the lowest layer that answers the question

Each step down multiplies storage, cleaning effort and licensing friction. If the question is a player's scoring trend, box scores suffice. If it is how that player performs with a specific teammate, you need play-by-play. Reach for tracking only when the question is about movement or space.

Where the data comes from

Sources fall into three groups, and each has a different relationship to reliability and permission.

League endpoints, official and unofficial

Some leagues expose JSON behind their own sites. MLB's Stats API at statsapi.mlb.com returns player and game data, and every response carries a copyright line pointing to MLB Advanced Media's terms, which permit "only individual, non-commercial, non-bulk use" without written authorisation. The NHL's site is backed by endpoints such as api-web.nhle.com that are public but undocumented. For the NBA, the open-source nba_api package wraps the endpoints behind NBA.com; its README notes the project is not affiliated with the league, that data remains subject to NBA.com's terms, and that the stats site throttles rapid requests and often ignores cloud IP ranges. None of these come with a service agreement, so formats and access can change without notice.

Commercial providers

Sportradar, Genius Sports and Stats Perform, which owns Opta, sell player statistics feeds under contract, and each holds official data agreements with various leagues. What you buy is the agreement as much as the data: a defined schema, an uptime commitment, a support contact, and a licence that states what you may display, store or redistribute. Coverage, latency and rights differ sharply by sport and tier, so evaluate against your own competitions rather than the provider's list. The sports data API checklist sets out how to test one.

Open and community sources

Open projects carry a lot of public analysis. nflverse publishes NFL play-by-play and player tables as automated GitHub releases, read through the nflreadr or nfl_data_py packages. Retrosheet offers free baseball event files on condition that users include its notice stating the information "was obtained free of charge from and is copyrighted by Retrosheet." StatsBomb's open-data repository releases event data for selected soccer competitions and asks that published work credit StatsBomb as the source. Reference sites such as Basketball-Reference are excellent for lookups but restrict automated access, as covered in the guide to sports statistics sites.

Licensing: read the terms before writing the scraper

Facts such as a final score are generally not copyrightable, but the compilation, the feed and the website delivering it are governed by terms you accept by using them. Three questions settle most cases.

Is the use personal or commercial? Many free sources allow personal research and prohibit commercial use, bulk download or redistribution. MLB's notice is explicit about all three.

Are you storing or republishing? Displaying a stat in a private notebook differs from republishing a database of them. Provider contracts usually distinguish display rights, storage duration and derived works.

Is attribution required? Retrosheet and StatsBomb both attach attribution conditions. Keep a file in the repository recording each source, the date retrieved and the terms that applied, because terms change and you will need to know which version covered which data.

If a product depends on the data, an unofficial endpoint is a risk you are carrying, not a free feed.

Normalising across sports and sources

Most work that combines sources fails at the joins, not the models.

Identifiers. Every source has its own player and team IDs. Build a crosswalk table once, keyed on a stable internal ID, with each source's ID as a column, and resolve names only as a last resort. Names collide, change and get transliterated differently.

Rate denominators. Totals mislead when opportunity differs. The natural unit varies by sport: per 36 minutes or per 100 possessions in basketball, per plate appearance in baseball, per 90 minutes in soccer, per 60 minutes of five-on-five time in hockey, per snap or route in football. Store the denominator next to the stat so rates can be recomputed.

Definitions. An assist, a tackle or a shot on target is coded by humans under rules that differ by provider and change over time. When two sources disagree on a total, the difference is usually definitional.

Time. Store timestamps in UTC with the league's local date as a separate field, record the season and game type (regular season, playoffs, play-in, cup), and flag games a player left injured, since partial games distort per-game averages.

A minimal schema

One table of players with the ID crosswalk, one of games with UTC start, season and type, and one long table of player-game stats with columns for source, stat name, value, denominator and retrieval date. Long format makes adding a new sport a matter of new rows rather than new tables.

Joining player stats to odds and results

Player data becomes most useful for modelling when it sits beside outcomes and prices on the same game and player keys. Parlay Ledger's REST API serves player statistics alongside real-time odds, historical odds and game results across sports and bookmakers in one unified format, which removes one crosswalk from the list above when the goal is testing a projection against the market. The broader discipline still applies: version your features, split by date rather than randomly, and treat any edge as a hypothesis to test, not a result.

Frequently asked questions

Where can you get player stats data for free?
League sites and their underlying endpoints, open projects such as nflverse for American football, Retrosheet for baseball and StatsBomb's open data for soccer, and reference sites for lookups. Free usually means personal or research use only. Check each source's terms on commercial use, bulk download and attribution before building anything on it.
What is the difference between box score, play-by-play and tracking data?
Box scores give one row per player per game. Play-by-play records every event in sequence with clock, score and players involved, so it supports lineups and situational splits. Tracking records player and ball positions many times per second, measuring speed and spacing. Each layer is larger, harder to clean and more restricted than the one above.
Is it legal to scrape player statistics?
Individual facts are generally not protected by copyright, but websites and feeds have terms of use that often prohibit automated collection, bulk storage or commercial reuse. Breaching those terms can get you blocked or create contractual risk. For anything commercial, use a source whose licence explicitly permits your intended use.
How do you compare player stats across different sports?
Convert totals to rates using each sport's natural denominator, such as possessions, plate appearances or minutes, then compare within sport using percentiles or z-scores rather than raw values. Direct comparisons across sports rarely mean much; standardised positions within each league's distribution are the defensible version.