NBA Push Draft Picks This endpoint retrieves pre-draft pick order with real-time pick selections during the draft.
Syntax
https://api.sportradar.com/draft/nba/{access_level}/stream/en/picks/subscribe?api_key={your_api_key} |
Parameters
Parameter | Description |
---|---|
access_level | Defines the access level of your API keyproduction , trial |
your_api_key | Your API key. |
Optional Query String Parameters
By default, a Push feed will provide all data available for all in progress games. If needed, you can filter the data returned by including query strings.
Optional query string parameters must be added after your API key with an ampersand (&
). If you are filtering for more than one result, separate the results with a comma (,
) and no spaces.
Parameter | Description |
---|---|
draft | Draft id Example: draft=sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1 |
Code Samples
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.sportradar.com/draft/nba/trial/stream/en/picks/subscribe?api_key={your_api_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
import requests
import json
r = requests.get("https://api.sportradar.com/draft/nba/trial/stream/en/picks/subscribe",
params = {'api_key': 'your_api_key'},
allow_redirects=False)
redirect_url = r.headers['Location']
r = requests.get(redirect_url, stream=True)
for line in r.iter_lines():
# filter out keep-alive new lines
if line:
decoded_line = line.decode('utf-8')
print(json.loads(decoded_line))
curl -L GET 'api.sportradar.us/draft/nba/trial/stream/en/picks/subscribe?api_key={your_api_key}'
Samples with Query String Params
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.sportradar.com/draft/nba/trial/stream/en/picks/subscribe?api_key={your_api_key}&draft=sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1&league=NBA")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
import requests
import json
r = requests.get("https://api.sportradar.com/draft/nba/trial/stream/en/picks/subscribe",
params = {'api_key': 'your_api_key', 'draft': 'sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1', 'league': 'NBA'},
allow_redirects=False)
redirect_url = r.headers['Location']
r = requests.get(redirect_url, stream=True)
for line in r.iter_lines():
# filter out keep-alive new lines
if line:
decoded_line = line.decode('utf-8')
print(json.loads(decoded_line)
curl -L GET 'api.sportradar.us/draft/nba/trial/stream/en/picks/subscribe?api_key={your_api_key}&draft=sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1&league=NBA'
Response Sample
The above commands return json like this.
Data Points
Draft Info:
Attribute | Parent Element | Type | Description |
---|---|---|---|
end_date | draft | Date | End date of a draft ex. 2022-06-23 |
id | draft | GUID | Unique ID of a draft ex. 01c63362-299c-48a0-b725-63fa18fca261 |
start_date | draft | Date | Start date of a draft ex. 2022-06-23 |
status | draft | String | Status of a draftscheduled , inprogress , complete , closed |
alias | pick - team | String | Draft team alias ex. DEN (Denver) |
id | pick - team | GUID | Unique ID of a draft team ex. 583ed102-fb46-11e1-82cb-f4ce4684ea4c |
market | pick - team | String | Draft team market name ex. Denver |
name | pick - team | String | Draft team name ex. Nuggets |
year | draft | Integer | Year of a draft |
Pick Info:
Attribute | Parent Element | Type | Description |
---|---|---|---|
id | pick | GUID | Unique ID of a draft pick ex. ca6b8dae-e835-49e4-9638-b30cdd3969a8 |
number | pick | Integer | Number of a draft pick within a round |
overall | pick | Integer | Overall number of a draft pick |
traded | pick | Boolean | Signifies a traded draft pick |
id | pick - trades | GUID | Unique ID of a trade ex. 3fc4ffa0-fe54-4d9a-bf53-e85df0e2cefd |
Round Info:
Attribute | Parent Element | Type | Description |
---|---|---|---|
end_date | round | Date | End date of a round ex. 2022-06-23 |
id | round | GUID | Unique ID of a round ex. 27b93f2c-95fb-4ba6-80ea-d50c95f7d1a4 |
number | round | Integer | Number of a round |
start_date | round | Date | Start date of a round ex. 2022-06-23 |
status | round | String | Status of a round ex. closed |
Broadcast:
Attribute | Parent Element | Type | Description |
---|---|---|---|
channel | broadcast | String | Name of the draft's broadcast channel |
network | broadcast | String | Name of the draft's broadcast network ex. ABC, ESPN |
League:
Attribute | Parent Element | Type | Description |
---|---|---|---|
alias | league | String | Alias of a league ex. NBA |
id | league | GUID | Unique ID of a league ex. 4353138d-4c22-4396-95d8-5f587d2df25c |
name | league | String | Name of a league ex. NBA |
Metadata:
Attribute | Parent Element | Type | Description |
---|---|---|---|
draft | metadata | GUID | Unique ID of a draft ex. sd:draft:e04e45a4-7a76-470c-a3ee-ed6bd56583f1 |
league | metadata | String | Alias of a league ex. NBA |
locale | metadata | String | Language code ex. en (English) |
operation | metadata | String | Operation of an updateupdate , delete |
version | metadata | String | Version of the API ex. v7 |
Prospects:
Attribute | Parent Element | Type | Description |
---|---|---|---|
birth_place | prospect | String | Birthplace of a prospect ex. Cedar Rapids, IA, USA |
experience | prospect | String | Experience of a college prospect ex. JR or SR |
first_name | prospect | String | First name of a prospect ex. Keegan |
height | prospect | Integer | Height in inches |
id | prospect | GUID | Unique prospect/draft ID of a player ex. 0245fbf2-e24f-41a7-8322-d39caf6d2b37 |
last_name | prospect | String | Last name of a prospect ex. Murray |
league_id | prospect | GUID | The NBA API ID of a player. This will appear once the player has been drafted and exported to the NBA API. Typically, it happens the day after they are drafted. ex. 7494fbb4-5ac7-43ee-b91a-8859532f548b |
name | prospect | String | Full name of a prospect ex. Keegan Murray |
position | prospect | String | Position of a prospect See our FAQ for a list of valid positions |
source_id | prospect | GUID | Unique player ID from a prospect's source (for example, the NCAA Men's Basketball API) ex. be83df8e-0fb6-4ee5-9c1c-4151a5223680 |
top_prospect | prospect | Boolean | Signifies a top prospect |
weight | prospect | Integer | Weight in lbs |
Team:
Attribute | Parent Element | Type | Description |
---|---|---|---|
alias | pick - team | String | Abbreviation of a team ex. SAC (Sacramento) |
id | pick - team | GUID | Unique ID of a team ex. 583ed0ac-fb46-11e1-82cb-f4ce4684ea4c |
market | pick - team | String | Market name of a team ex. Sacramento |
name | pick - team | String | Team name ex. Kings |