API v3 Documentation

Endpoints Code Lookup

← All endpoints

players

primary,team All data services

A query to this endpoint without an numeric player code parameter will return a list of all players for the competition level with their player codes, plus current team if active. Passing a player code 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.

MLB Players
https://api3.natst.at/xxxx-xxxxxx/players/mlb Download sample

Parameters

Range

NameRequiredTypeDescription
dataformat optional range Controls the data format by which query results are returned. Acceptable values are xml, json or php. The default value is json. Example: https://api3.natst.at/xxxx-xxxxxx/players/nba/xml
season optional range A valid season code (the year when a particular season completes) in YYYY format. A list of available values can be retrieved from the seasons endpoint. Example: https://api3.natst.at/xxxx-xxxxxx/players/nba/2025
teamcode optional range A two to eight-character code for a team. A list of available values can be retrieved from the /teamcodes endpoint or the lookup below. Example: https://api3.natst.at/xxxx-xxxxxx/players/nba/XXX
leaguecode optional range A two to eight-character code for a league. A list of available values can be retrieved from the /leaguecodes endpoint or the lookup below. Example: https://api3.natst.at/xxxx-xxxxxx/players/eurobb/XXX
playercode optional range A numeric code for a player. A list of available values can be retrieved from the /players endpoint. Example: https://api3.natst.at/xxxx-xxxxxx/players/nba/XXX
search optional range If a comma-separated value is none of the above, the API will assume it is a search term. The system will only accept the first entry in a string as a search term. Example: https://api3.natst.at/xxxx-xxxxxx/players/nba/XXX

Query

NameRequiredTypeDescription
key required path A valid API key in xxxx-xxxxxx format. This must be the first path parameter. Example: https://api3.natst.at/xxxx-xxxxxx/...

Path

NameRequiredTypeDescription
endpoint required path The API endpoint to query. This must be the second path parameter. Example: https://api3.natst.at/xxxx-xxxxxx/players/...
level required path One of 30 NatStat data services to query. A full list can be found in the documentation. This must be the third path parameter. Example: https://api3.natst.at/xxxx-xxxxxx/players/nhl/...