SportsDataIO Help Center Historical Data Integration Guide
SportsDataIO maintains a database of event and betting data for the US sports market covering over 10 years. The coverage and total number of historical years available vary slightly by league and typically correspond to the year SportsDataIO started tracking each league.
Vault Access specifically enables access to Prior Season’s Team/Player/Game data. Clients can determine what the prior season year is by checking the Timelines and Current Season endpoints from the Utility Endpoint category in the integration guide for each league.
SportsDataIO Odds data will move to the Vault slightly earlier than the league data mentioned above. Please see “Other Important Points” below for more detail.
All historical data is available through SportsDataIO Vault:
What's Included:
How to Access:
Clients can use our existing API documentation to seamlessly integrate historical sports data into your workflow.
- Competition Feeds, Event Feeds, Fantasy Feeds, Game Lines (from betting feeds), and and Matchups/Trends/Splits (from betting feeds) for ALL leagues can be accessed via the same production API Key and Endpoints as your in season and live access.
- Following the same steps outlined in our Season Parameter Process Guide, customers can enter the desired year of data they wish to call within our existing endpoint catalogue and receive that year’s data delivered.
- Props and Futures Betting Feeds for the NFL, NBA, MLB, NHL, CFB, and Men’s College Basketball do have a different access point and API key. Please see the Historical Odds section below for more information.
What to know about the historical data:
The data structure for our historical data will match the same data structure and payload as you see while calling the in-season data.
- Once data is considered historical (out of season) it WILL NOT change. Please do not set up recurring jobs to pull historical data as that data will be the same for each call and should be stored locally in your own saved locations.
- If at any point you are having difficulties accessing this historical data, please contact support@sportsdata.io
- We do not collect historical data retroactively. We record data live, as part of our ongoing coverage, and we retain everything we record. Past live coverage is what becomes the historical archive: yesterday's live data is today's historical data.
These facts follow from this:
- The archive reflects our coverage history. A dataset exists back to the point we began covering it.
- The archive stores outcomes, not revision trails. Records carry an Updated timestamp showing when they last changed. We do not retain prior versions, correction logs, or point-in-time snapshots, and there is no as-of-time query.
- If you require reconstruction of exactly what was known at a past moment - including states later overwritten by corrections - the archive does not support that.
- Historical odds and line movement: One important exception is betting line movement. Because of the nature of betting, prices and lines change constantly. We do record those changes. Opening and closing lines have full history between them, so that you can track betting odds as they moved over time. See below for more details.
How corrections work
- Games carry a Status field and an IsClosed flag. IsClosed is set roughly 5–10 minutes after game end, once results are verified.
- Stat corrections can still occur after closure, driven by league announcements. See the FAQ: "Once a game is Final, can changes still happen?"
- For betting market resulting, correction-driven changes are checked for 72 hours after each game.
- Integrations should re-sync the past 3–4 days of box scores nightly to capture corrections. See the Historical Data Integration Guide.
- As mentioned, the historical data set contains the last revision and not intermediate changes.
Specific datasets
Event Feeds: Any changes or corrections will not be marked in the API beyond the simple Updated field. For example, we will indicate if a penalty was awarded in an NFL game after a play completed, but we will not record the play that was overturned, as it had no statistical bearing on the game.
Players Feeds > Injuries: Historical injury data lives inside box scores, as a snapshot of each player's status at game start. Status changes between games (practice reports, mid-week designations) are not retained historically. Current injury status is a separate live feed and does contain that granular information as it occurs.
Players Feeds > Depth charts: Depth charts are current-state only. Historical depth charts are not available.
Betting splits: Betting splits indicate closing lines only and no intermediate step.
Game delay identifiers: There is no point-in-time game delay identifiers. GameID behavior across postponed, suspended, canceled, and rescheduled games is documented in the FAQ, including MLB's RescheduledGameID and RescheduledFromGameID fields.
A note on Replay
Replay is a developer tool for testing live-data integrations: it re-streams archived games through the API in real time so that live workflows can be tested out of season. It is not a historical-data product and not a revision archive. Historical data is delivered through the datasets described above.
Historical Odds:
For the most part Betting Feeds will all operate the same. When referencing the chart below - Anything with an “X” can still be accessed via the same productions API and Endpoints you are using for in season Betting Feeds.
- While working pulling data in a category/league market with X please refer to our dedicated guides listed below:
Anything with “A” should reference the instructions below to access Props and Futures Betting Feeds for the NFL, NBA, MLB, NHL, CFB, and Men’s College Basketball. This data now lives in our Betting Data Archive and requires a new API key and Endpoints. For Access to this historical betting data please contact sales@sportsdata.io.
Why are the sports marked “A” in a different location?
While expanding our Sportsbook and Betting Market coverage in 2024 we ended up with 500% more betting market coverage. To maintain best performance and speed for in season odds all Props and Futures older than 30 days (for the leagues indicated with “A” above) are moved to our data warehouse.
- This allows us to streamline our production data tables to ensure that live odds get to you, the user, as quickly as possible.
- All you need to do is make a call to a different endpoint with a new API key for historical data indicated with “A” above.
- This is currently in place for the Big Six Game Props, Team Props, Player Props League Futures, and Player Futures (NFL, MLB, NBA, NHL, CFB, CBB)
- Historical odds for Soccer, Golf, MMA, WNBA, and NASCAR remain in the production API.
How Do I Access this historical odds archive mentioned above?
Our Historical Odds endpoints connect directly to a new Data Warehouse.
- Our Historical Odds endpoints live in our Data Warehouse.
- Data Warehouse API callers will need to pass 3 parameters:
Season(e.g.2024)BettingMarketIdSportsbookGroup(see this guide for how Sportsbook Group endpoints work if you are unfamiliar.)-
Season(e.g.2024) -
BettingMarketId -
SportsbookGroup(see this guide for how Sportsbook Group endpoints work if you are unfamiliar.)
-
For all Props, you can call the Props endpoint with the BettingMarketId of your choice:
- NFL: https://api.sportsdata.io/v3/nfl/archive/json/BettingPropsArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- NBA: https://api.sportsdata.io/v3/nba/archive/json/BettingPropsArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- NHL: https://api.sportsdata.io/v3/nhl/archive/json/BettingPropsArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- MLB: https://api.sportsdata.io/v3/mlb/archive/json/BettingPropsArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- CFB: https://api.sportsdata.io/v3/cfb/archive/json/BettingPropsArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- CBB: https://api.sportsdata.io/v3/cbb/archive/json/BettingPropsArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
For Futures, a dedicated endpoint exists with the same parameter requirements:
- NFL:https://api.sportsdata.io/v3/nfl/archive/json/BettingFuturesArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- NBA:https://api.sportsdata.io/v3/nba/archive/json/BettingFuturesArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- NHL:https://api.sportsdata.io/v3/nhl/archive/json/BettingFuturesArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- MLB:https://api.sportsdata.io/v3/mlb/archive/json/BettingFuturesArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- CFB:https://api.sportsdata.io/v3/cfb/archive/json/BettingFuturesArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
- CBB:https://api.sportsdata.io/v3/cbb/archive/json/BettingFuturesArchive/{season}/{bettingMarketId}/{sportsbookGrouping}
Here is a sample workflow for getting the BettingMarketId:
- Examine StartDate on a BettingEvent to see if it’s over 30 days oldhttps://sportsdata.io/developers/api-documentation/ncaa-football#/endpoint/betting-events-by-season
- Assemble
BettingMarketIDlist for any markets you are interested in:https://sportsdata.io/developers/api-documentation/ncaa-football#/endpoint/betting-markets-by-eventYou can also use theArchiveLocationfield, which returns the exact URL; just substitute{SportsbookGroupId}with an ID of your choice and{ApiKey}with your API key for the SportsDataIO Historical API product. - Determine which
SportsbookGroup(s) for which you want to retrieve historical outcomes (see your My Account section for a list of available groups and ensure you are looking at your SportsDataIO API Historical product. - Loop BettingMarketID and SportsbookGroup, call endpoint and store datahttps://sportsdata.io/developers/api-documentation/ncaa-football#/endpoint/betting-props-by-season-by-sportsbook-group-archive
Data Structure
- Data warehouse API responses have the exact same schema/shape as the production BettingMarket (“line movement”) endpoints.See for example https://sportsdata.io/developers/api-documentation/mlb#betting-market with any BettingMarketId (e.g. 4010995) for exactly how this will look.You should be able to take your existing production code and use it for accessing the data warehouse as it is completely identical in its response format.Per the above, only the call parameters differ.
- Per the above, only the call parameters differ. All calls start at the betting_market AND will deliver the betting_outcomes plus line movement since the data is static and will no longer change moving forward.
Other Important Points
- By "30 days old", we mean the StartDate on BettingEvent must be <= 30 days ago.
- The full archive has all available historical data, even older than 365 days.
- For Game type BettingEvents (for aggregated odds like Props, Futures, Game Lines etc.) this is easy: it means the date the game started.
- For Futures, however, this usually means the odds will be historical 30 days after the season ends, since the market StartDate can vary based on a variety of factors.
- If in doubt, check the live endpoints first; if they are not present, they are in the Historical endpoints.
- Our Team Roster’s endpoints are overwritten each season. If you’d like to access historical Roster data, use the Player Stats endpoints to identify which team’s players recorded those stats on.
- Historical data coverage varies by year and data point; some metrics may be missing for certain time periods. Certain historical records may be incomplete or partially populated.
- Note: Access to previous seasons for non-odds historical Vault data and enabling historical betting lines endpoints is managed by SportsDataIO staff within your account's settings.
- Please contact sales@sportsdata.io to discuss access if you would like to enable access.
- Note: Access to previous seasons for non-odds historical Vault data and enabling historical betting lines endpoints is managed by SportsDataIO staff within your account's settings.