Quickstart
Building a URI to query the National Statistical API begins with four main requirements.
⓵ All National Statistical API URI requests begin with this base URI:
https://api.natstat.com/v2/
⓶ Each valid API request requires an endpoint name. The available endpoints are league, season, team, player, game, performances, playbyplay, pitchfx, officials, venues, forecasts, elo, rpi, news, transactions and social. (Please note that not all sports return data for each endpoint.)
More information on endpoints and full methods can be found here.
https://api.natstat.com/v2/seasons/
⓷ Each valid API request requires either a level or sport path parameter passed after the API endpoint is called. More information and a glossary of codes can be found here.
https://api.natstat.com/v2/seasons/NBA/
⓸ Each valid API request requires the inclusion of a valid API key as a query parameter. 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 subsite.
https://api.natstat.com/v2/seasons/NBA/?key=XXXX-XXXXXX