API v2 Documentation

Endpoints Code Lookup

← All endpoints

players

primary,team All data services

A query to this endpoint without an id parameter will return a list of all players for the competition level with their id codes, plus current team if active. Passing an id parameter will return all metadata for the player and a list of seasons played. Passing an additional season parameter will return a players basic game performance data, season stats/rankings, and data insights.

Please note that this endpoint can be used synonymously as player.

All KBO Players
https://api.natstat.com/v1/players/KBO/?key=XXXX-XXXXXX&format=xml&id=330825 Download sample

Parameters

Path

NameRequiredTypeDescription
level required string The competition level to retrieve information for. A full glossary can be found in the Path Parameters section

Query

NameRequiredTypeDescription
key required string A valid API key in XXXX-XXXXXX format
format optional string The preferred data format: xml, json or php (presented as a SimpleXML object). The default is json
max optional number The number of results per page to return. The default value is 100, and the maximum allowed parameter value is 1000. This value is echoed back as Max_Results in the meta block
page optional number The pagination page number. This value is echoed back as Page in the meta block. The meta block also contains the Total_Results of the query. If there are further results, a fully-formed Next_Page URI containing a pre-filled &page=X value will be returned
id optional number A valid player ID code, which returns details for that player (A list of available players can be retrieved from this endpoint by not passing an ID code.)
season optional number A valid season ID code, formatted as the year that a season completes, in YYYY format. A list of available seasons can be retrieved from the seasons endpoint. Must be used in conjunction with id
search optional string For general search of endpoint contents. Queries of four characters or less will be ignored

Response

NameRequiredTypeDescription
ID number The unique identifier for the record
Name string The full name of the player
CareerStart number The season in which the player first appeared, in YYYY format
CareerEnd number The season in which the player most recently appeared, in YYYY format
Height string The height in feet/inches of the player, in X-XX format
Weight number The weight in pounds of the player, in XXX format
DateOfBirth date The player's date of birth, in YYYY-MM-DD format
Hometown string The city and state of the player's origin
Nation string The country where the player is from
Flag string The two-letter ISO code of the player's country
URL string The National Statistical page for the player
seasons object Statistics for the player, by season
Team string The teams name of the relevant team
TeamAbbrev string The teams abbreviation of the relevant team
TeamGames string The number of games the team has played
LastUpdated date The last updated date of this record
League string The abbreviation of the league (FC only)
LeagueName string The name of the league (FC only)
LeagueType string The type of league: Domestic, Cup, International (FC only)
LeagueNation string The country or scope of the league (FC only)
LeagueGender string The gender of the league: M,W (FC only)
LeagueFactor number The relative strength of the league from 0.0 to 1.0 (FC only)