API v3 Documentation

Endpoints Code Lookup

Quickstart

Building a URI to query the National Statistical API begins with four basic requirements.

⓵ All requests start with this base URI.

https://api3.natst.at/

⓶ The first path parameter is a valid API key. A key contains 11 characters (four alphanumeric characters, a dash, then six alphanumeric characters). The account's API key can be found on the National Statistical account page (requires login) in the NatStat API navigation tab, or under Analysis Tools > NatStat API > Query Builder on any of the 29 service subsites.

https://api3.natst.at/xxxx-xxxxxx/

⓷ The second path parameter is a valid endpoint. The available endpoints are boxscores, dataststus, elo, forecasts, games, glossary, lineups, moneyline, news, officials, overunder, pitchfx, playbyplay, playerperfs, players, pointspread, season, simulations, stats, teamperfs, teams, transactions, venues, winprob, teamcodes, leaguecodes. (Please note that not all sports return data for each endpoint.)

More information on endpoints and full methods can be found at the endpoint reference.

https://api3.natst.at/xxxx-xxxxxx/games/

⓸ The third path parameter is one of the 29 sport data service codes (case-insensitive). A glossary of codes can be found below.

https://api3.natst.at/xxxx-xxxxxx/games/nba/

⓹ The fourth (optional) path parameter is a "range" that limits the scope of returned data.

Season: The four-digit year of the date when the season ends. The default is the current season.

https://api3.natst.at/xxxx-xxxxxx/games/milb/2025

Date(s): In YYYY-MM-DD format. Supplying two dates will return an inclusive range of results.

https://api3.natst.at/xxxx-xxxxxx/pointspread/kbo/2025-04-12

Code: A non case-sensitive team, player or league code. A full list of team codes can be retrieved at the /teamcodes endpoint. A full list of team codes can be retrieved at the /leaguecodes endpoint. Player codes can be retrieved at the /players endpoint.

https://api3.natst.at/xxxx-xxxxxx/games/fc/eng-pre

Data Format: Data from the National Statistical API is available in three different formats. Users can specify which format to return with the format query parameter. If no data format is specified, the API will send JSON-formatted data by default.

https://api3.natst.at/xxxx-xxxxxx/venues/wnba/xml

The comma-separated and tab-separated (CSV/TSV) options were removed in API v2, as they are unable to handle multi-dimensional array objects. The Excel option was removed in API v2. If you require spreadsheet-formatted data, please review Analysis Tools > Data Exports from any of the 29 subsites' navigation menus.

jsonJavaScript Object Notation (default)
xmlExtensible Markup Language
phpPHP SimpleXML Object

Search Term: If a comma-separated value is not matched with any of the above data types, the API will assume that it is a search term. The system will only accept the first entry in a comma-separated string as a search term.

https://api3.natst.at/xxxx-xxxxxx/players/nba/curry

Values may be used in combination to further refine a search.

https://api3.natst.at/xxxx-xxxxxx/games/mlb/2024-05-09,2024-05-15,bos

⓺ A fifth (optional) path parameter is a paginated "offset" number for recordsets. The default is 0, the beginning of the recordset.

https://api3.natst.at/xxxx-xxxxxx/seasons/nba/_/100