API v2 Documentation

Endpoints Code Lookup

← All endpoints

transactions

team,player NBA,GL,WNBA,NHL,MLB,MiLB,MBB

A query to this endpoint without an id parameter will return all transactions in reverse chronological order. Results can be filtered by team, date, date range (start-end; last), and search. Posting an id parameter will return all metadata for a transaction.

All NBA Transactions
https://api.natstat.com/v1/transactions/NBA/?key=f813-1b6d2d&format=xml 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 string 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 string 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
team optional string A valid team ID code. A list of teams can be retrieved from the teams endpoint
date optional string The date to limit matched results to. The API will attempt to translate the date, but YYYYMMDD or YYYY-MM-DD are preferred
start optional string The start date from which to include matched results (inclusive). The API will attempt to translate the date, but YYYYMMDD or YYYY-MM-DD are preferred
end optional string The end date to which to include matched results (inclusive). The API will attempt to translate the date, but YYYYMMDD or YYYY-MM-DD are preferred

Response

NameRequiredTypeDescription
Team_ID number The teams ID of the relevant team
TeamSecondary_ID string The teams ID of the secondary team involved in the transaction
Transaction string A text description of the transaction
Published date The publication date of the transaction
team object Includes teams metadata about the relevant team
Name string The full name of the team that made the transaction
Abbrev string The two to seven-letter team abbreviation, available via the teams endpoint