API v2 Documentation

Endpoints Code Lookup

Path Parameters

level

Most valid API requests require the inclusion of one of National Statistical's subsites, which each represent a level of competition in basketball, baseball or hockey, or for API purposes: a level parameter. An updated list can always be found at the glossary endpoint. The level parameter must be passed after the endpoint name in the URI in the following format:

https://api.natstat.com/v2/league/MLB/?key=XXXX-XXXXXX

AbbrevLeagueFull Data Back To
AsiaBBAsian professional basketball leagues2012
AmerBBNorth/South/Central American professional basketball leagues2012
CBBNCAA Division I College Baseball2012
EuroBBEuropean professional basketball leagues2012
FCNatStat FC (soccer)1908
GLNBA G League2010
KBOKorean Baseball Organization2010
KHLKontinental Hockey League2009
MHKNCAA Division I Men's Hockey2016
MLBMajor League Baseball2008
MiLBMinor League Baseball2012
MBBNCAA Men's Division I College Basketball2008
MB2NCAA Men's Division II College Basketball2012
MB3NCAA Men's Division III College Basketball2012
NBANational Basketball Association1991
MBIANAIA Men's Basketball2016
MBJCJunior College Men's Basketball2016
NHLNational Hockey League1990
NPBNippon Professional Baseball2010
WBBNCAA Women's Division I College Basketball 2012
WB2NCAA Women's Division II College Basketball2012
WB3NCAA Women's Division III College Basketball2012
WBIANAIA Women's Basketball2016
WBJCJunior College Women's Basketball2016
WNBAWomen's National Basketball Association2007
PFBPro Football2002
CFBCollege Football2002

Please note that the level parameter is not case sensitive (MiLB, MILB and milb will each work).

type

The glossary endpoint returns dictionaries of various meta information found in the API. The type parameter must be passed after the endpoint name and level in the URI in the following format:

https://api.natstat.com/v2/glossary/EuroBB/leagues/?key=XXXX-XXXXXX

stats
playerReturns statistics and rankings for players.
teamReturns statistics and rankings for teams.
glossary
statsNames, abbreviations and short descriptions of statistics found at the teams, players, playerperfs, playbyplay and pitch endpoints.
levelsID codes, names and metadata for competition levels.
nationsNames, abbreviations (ISO codes) and flag images of player origination countries found at the players endpoint.
sublevelsID codes, names, and active date ranges for sublevels (leagues and conferences).