Global Basketball v1

Frequently Asked Questions
API API Version
Global Basketball v1
Note: Authentication is required for all API calls.
## Global Basketball API Map To best utilize the Global Basketball API, you will need several parameters to create your API calls. The map below illustrates how you can obtain the parameters you need. >

Examples:

>To find the probability of a home team win for a given game: >
  1. Call the daily schedule and find the match id for the chosen match
  2. Call the match probabilties using the match id
  3. Find the home team and locate the outcome probability
>The probability of a home team win is displayed. >
    >To find a player's date of birth: >
    1. Call the daily schedule, results, or tournament list and find the match id for a match that the player played in
    2. Call the match summary or match timeline using the match id and locate the player id
    3. Call the player profile and find the player element and locate the date_of_birth attribute
    >The player's date of birth is displayed. The primary feeds require only a date or human-readable parameters to call the endpoints. Those feeds provide Match Ids, Competitor Ids, or Tournament Ids which can be used to generate the match, team, and tournament feeds.
    Note: Season Ids provided in the feeds can be used interchangably with Tournament Ids to look at schedules and statistics for the season.
    ## Daily Results
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Match Info Data Points: Away Score
    Home Score
    Match Id
    Period Number
    Period Type
    Scheduled Date/Time
    Sport Event Status Away Score
    Sport Event Status Home Score
    Sport Event Status
    Sport Event Status Match Status
    Sport Event Status Winner Id
    Start Time to be Determined
    Team Qualifier
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/schedules/2017-12-14/results.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/schedules/2017-12-14/results.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/schedules/2017-12-14/results.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Daily Results. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/schedules/`{year}`-`{month}`-`{day}`/results.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day in 2 digit format (DD). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Daily Results use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/results.xsd Return to API map ## Daily Schedule
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Match Info Data Points: Match Id
    Scheduled Date/Time
    Sport Event Status
    Sport Event Status Match Status
    Team Qualifier
    Start Time to be Determined
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/schedules/2017-12-14/schedule.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/schedules/2017-12-14/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/schedules/2017-12-14/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. To access the Daily Schedule feed use the following URL: https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/schedules/`{year}`-`{month}`-`{day}`/schedule.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day in 2 digit format (DD). | | `live` | Optional: Replace the date with "live" for a live schedule. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Daily Schedule use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/schedule.xsd Return to API map ## Head To Head
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Match Info Data Points: Away Score
    Home Score
    Match Id
    Period Number
    Period Type
    Scheduled Date/Time
    Sport Event Status Away Score
    Sport Event Status Home Score
    Sport Event Status
    Sport Event Status Match Status
    Sport Event Status Winner Id
    Start Time to be Determined
    Team Qualifier
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/teams/sr:competitor:3419/versus/sr:competitor:3418/matches.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/teams/sr:competitor:3419/versus/sr:competitor:3418/matches.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/teams/sr:competitor:3419/versus/sr:competitor:3418/matches.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Head To Head information. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/teams/`{team_id}`/versus/`{team_id2}`/matches.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `team_id` | Id of a given team. | | `team_id2` | Id of a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Head To Head use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/team_versus_matches.xsd Return to API map ## Match Probabilities
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Probability Info Data Points: Away/Home Team Win Probability Market Name Outcome Name
    Match Info Data Points: Match Id
    Scheduled Date/Time
    Start Time to be Determined
    Team Qualifier
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/matches/sr:match:10314573/probabilities.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/matches/sr:match:10314573/probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/matches/sr:match:10314573/probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Match Probabilities information for a specific match. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/matches/`{match_id}`/probabilities.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `match_id` | ID for a given game. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Match Probabilities use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/match_probabilities.xsd Return to API map ## Match Summary
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Player Info Data Points: Id Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Match Info Data Points: Away Score
    Home Score
    Match Id
    Period Number
    Period Type
    Scheduled Date/Time
    Sport Event Conditions Attendance
    Sport Event Status Away Score
    Sport Event Status Home Score
    Sport Event Status
    Sport Event Status Match Status
    Sport Event Status Winner Id
    Start Time to be Determined
    Team Qualifier
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    Team Match Statistics Data Points: Assists
    Ball Possession
    Biggest Lead
    Fouls
    Free Throw Attempts Successful
    Free Throw Attempts Total
    Misses
    Rebounds
    Shots Blocked
    Steals
    Team Leads
    Three Point Attempts Successful
    Three Point Attempts Total
    Time Spent In Lead
    Timeouts
    Turnovers
    Two Point Attempts Successful
    Two Point Attempts Total
    Player Match Statistics Data Points: Assists
    Blocked Shots
    Blocks Against
    Defensive Rebounds
    Efficiency
    Fouls On
    Free Throws
    Free Throws Attempts
    Offensive Rebounds
    Personal Fouls
    Points
    Three Pointers
    Three Pointers Attempts
    Total Rebounds
    Turnovers
    Two Pointers
    Two Pointers Attempts
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/matches/sr:match:10314573/summary.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/matches/sr:match:10314573/summary.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/matches/sr:match:10314573/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Match Summary. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/matches/`{match_id}`/summary.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `match_id` | ID for a given game. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Match Summary use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/match_summary.xsd Return to API map ## Match Timeline
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Player Info Data Points: Id Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Match Info Data Points: Away Score
    Home Score
    Match Id
    Period Number
    Period Type
    Scheduled Date/Time
    Sport Event Conditions Attendance
    Sport Event Status Away Score
    Sport Event Status Home Score
    Sport Event Status
    Sport Event Status Match Status
    Sport Event Status Winner Id
    Start Time to be Determined
    Team Qualifier
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    Timeline Info Data Points: Assist Player Id
    Assist Player Name
    Assist Type
    Event Away Score
    Event Home Score
    Event Id
    Event Match Time
    Event Period
    Event Period Name
    Event Points
    Event Stoppage Time
    Event Team
    Event Time
    Event Type
    Event Value
    Event X Coordinate
    Event Y Coordinate
    Goal Scorer Id
    Goal Scorer Name
    Team Match Statistics Data Points: Assists
    Ball Possession
    Biggest Lead
    Fouls
    Free Throw Attempts Successful
    Free Throw Attempts Total
    Misses
    Rebounds
    Shots Blocked
    Steals
    Team Leads
    Three Point Attempts Successful
    Three Point Attempts Total
    Time Spent In Lead
    Timeouts
    Turnovers
    Two Point Attempts Successful
    Two Point Attempts Total
    Player Match Statistics Data Points: Assists
    Blocked Shots
    Blocks Against
    Defensive Rebounds
    Efficiency
    Fouls On
    Free Throws
    Free Throws Attempts
    Offensive Rebounds
    Personal Fouls
    Points
    Three Pointers
    Three Pointers Attempts
    Total Rebounds
    Turnovers
    Two Pointers
    Two Pointers Attempts
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/matches/sr:match:10314573/timeline.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/matches/sr:match:10314573/timeline.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/matches/sr:match:10314573/timeline.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Match Timeline. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/matches/`{match_id}`/timeline.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `match_id` | ID for a given game. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Match Timeline use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/match_timeline.xsd Return to API map ## Player Profile
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Player Info Data Points: Active
    Country Code
    Date Of Birth
    End Date
    Height
    Id
    Jersey Number
    Nationality
    Name
    Position
    Role Type / Position
    Start Date
    Weight
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/players/sr:player:608172/profile.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/players/sr:player:608172/profile.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/players/sr:player:608172/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Player Profile. https://api.sportradar.com/basketball-`{access_level}{version}`/`{lanuage_code}`/players/`{player_id}`/profile.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `player_id` | ID of a given player. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Player Profiles use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/player_profile.xsd Return to API map ## Seasons
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/seasons.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/tournaments/sr:tournament:138/seasons.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/seasons.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves Seasons Information. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/seasons.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `tournament_id or season_id` | ID of a given tournament or season. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Seasons use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/tournament_seasons.xsd Return to API map ## Team Profile
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Team Info Data Points: Jersey Base Color
    Jersey Horizontal Stripes
    Jersey Number Color
    Jersey Shirt Type
    Jersey Sleeve Color
    Jersey Split
    Jersey Squares
    Jersey Stripes
    Jersey Type
    Manager Country Code
    Manager Id
    Manager Name
    Manager Nationality
    Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Player Information Data Points: Country Code
    Date Of Birth
    Gender
    Height
    Id
    Jersey Number
    Nationality
    Name
    Position
    Weight
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/teams/sr:competitor:3426/profile.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/teams/sr:competitor:3426/profile.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/teams/sr:competitor:3426/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Team Profile. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/teams/`{team_id}`/profile.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `team_id` | Id of a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Team Profile use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/team_profile.xsd Return to API map ## Team Results
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Match Info Data Points: Away Score
    Home Score
    Match Id
    Period Number
    Period Type
    Scheduled Date/Time
    Sport Event Status Away Score
    Sport Event Status Home Score
    Sport Event Status
    Sport Event Status Match Status
    Sport Event Status Winner Id
    Start Time to be Determined
    Team Qualifier
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/teams/sr:competitor:34621/results.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/teams/sr:competitor:34621/results.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/teams/sr:competitor:34621/results.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves Team Results. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/teams/`{team_id}`/results.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `team_id` | Id of a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Team Results use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/team_results.xsd Return to API map ## Team Schedule
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Match Info Data Points: Match Id
    Scheduled Date/Time
    Sport Event Status
    Start Time to be Determined
    Team Qualifier
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/teams/sr:competitor:34621/schedule.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/teams/sr:competitor:34621/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/teams/sr:competitor:34621/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Team Schedule. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/teams/`{team_id}`/schedule.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `team_id` | Id of a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Team Schedule use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/team_schedule.xsd Return to API map ## Tournament Info
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Coverage Includes
    Coverage Information
    Coverage Level Abbreviation
    Coverage Level Name
    Coverage Tournament Name
    Coverage Type Abbreviation
    Coverage Type Name
    Current Season End Date
    Current Season Id
    Current Season Name
    Current Season Start Date
    Current Season Year
    Group Name
    Round Number
    Round Type
    Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/info.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/tournaments/sr:tournament:138/info.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/info.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Tournament Info. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/info.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `tournament_id or season_id` | ID of a given tournament or season. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Tournament Info use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/tournament_info.xsd Return to API map ## Tournament List
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Current Season End Date
    Current Season Id
    Current Season Name
    Current Season Start Date
    Current Season Year
    Tournament Id
    Tournament Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/tournaments.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/tournaments.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/tournaments.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Tournament List. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/tournaments.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Tournament List use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/tournaments.xsd Return to API map ## Tournament Live Standings
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Current Season End Date
    Current Season Id
    Current Season Name
    Current Season Start Date
    Current Season Year
    Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Id Team Name
    Standings Info Data Points: Change
    Current Outcome
    Games Behind
    Group Group Name
    Group Id
    Group Name
    Group Parent
    Group Type
    Losses
    Losses Conference
    Losses Division
    Played
    Points Against
    Points For
    Rank
    Standings Tie Break Rule
    Standings Type
    Streak
    Wins
    Wins Conference
    Wins Division
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/live_standings.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/tournaments/sr:tournament:138/live_standings.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/live_standings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Tournament Live Standings. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/live_standings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `tournament_id or season_id` | ID of a given tournament or season. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Tournament Live Standings use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/tournaments.xsd Return to API map ## Tournament Results
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Match Info Data Points: Away Score
    Home Score
    Match Id
    Period Number
    Period Type
    Scheduled Date/Time
    Sport Event Status Away Score
    Sport Event Status Home Score
    Sport Event Status
    Sport Event Status Match Status
    Sport Event Status Winner Id
    Start Time to be Determined
    Team Qualifier
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/results.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/tournaments/sr:tournament:138/results.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/results.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Tournament Results. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/results.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `tournament_id or season_id` | ID of a given tournament or season. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Tournament Results use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/tournament_results.xsd Return to API map ## Tournament Schedule
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Abbreviation
    Team Country
    Team Country Code
    Team Id
    Team Name
    Venue Info Data Points: Capacity
    City
    Country Code
    Country Name
    Id
    Map Coordinates
    Name
    Match Info Data Points: Match Id
    Scheduled Date/Time
    Sport Event Status
    Start Time to be Determined
    Team Qualifier
    Tournament Round Group
    Tournament Round Match Number
    Tournament Round Matches
    Tournament Round Name
    Tournament Round Number
    Tournament Round Other Match Id
    Tournament Round Type
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/schedule.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/tournaments/sr:tournament:138/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Tournament Schedule. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/schedule.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `tournament_id or season_id` | ID of a given tournament or season. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Tournament Schedule use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/tournament_schedule.xsd Return to API map ## Tournament Standings
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Category & Sport Info Data Points: Category Country Code
    Category Id
    Category Name
    Sport Id
    Sport Name
    Tournament Info Data Points: Current Season End Date
    Current Season Id
    Current Season Name
    Current Season Start Date
    Current Season Year
    Season End Date
    Season Id
    Season Name
    Season Start Date
    Season Year
    Tournament Id
    Tournament Name
    Team Info Data Points: Team Id Team Name
    Standings Info Data Points: Change
    Current Outcome
    Games Behind
    Group Group Name
    Group Id
    Group Name
    Group Parent
    Group Type
    Losses
    Losses Conference
    Losses Division
    Played
    Points Against
    Points For
    Rank
    Standings Tie Break Rule
    Standings Type
    Streak
    Wins
    Wins Conference
    Wins Division
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/standings.xml?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 ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/basketball-t1/en/tournaments/sr:tournament:138/standings.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/basketball-t1/en/tournaments/sr:tournament:138/standings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Tournament Standings. https://api.sportradar.com/basketball-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/standings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `tournament_id or season_id` | ID of a given tournament or season. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Tournament Standings use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/basketball/tournament_standings.xsd Return to API map ## Frequently Asked Questions

    Q: What leagues or tournaments do you cover for Basketball?

    A: A full list of the tournaments covered in this API can be found in the /tournaments/ endpoint. It can also be viewed online here: https://www.sportradar.com/wp-content/uploads/sites/5/2014/12/Sportradar_Coverage.pdf The elements and attributes in the /tournaments/{tournamentID}/info represents a data view of the above PDF information on a per-tournament basis.

    Q: What format are date fields presented in?

    A: When we present date only values we present these in the ISO 8601 standard format.
    ex: 2013-04-03
    We use these for attributes that have date and no time (such as birthdate). For more information: https://en.wikipedia.org/wiki/ISO_8601

    Q: What format are the date/time fields presented in?

    A: All of our Date/Time attributes are in UTC, presented in the ISO 8601 standard format.
    ex: 2013-04-03T18:15:00+00:00
    For more information: https://en.wikipedia.org/wiki/ISO_8601

    Q: What are the valid match status values?

    A: Here are the valid match status values and their definitions:

    • not_started – The match is scheduled to be played
    • live – The match is currently in progress
    • postponed – The match has been postponed to a future date
    • delayed – The match has been temporarily delayed and will be continued
    • canceled – The match has been canceled and will not be played
    • ended – The match is over
    • closed – The match results have been confirmed

    Q: How do I access past seasons’ result and stats?

    A: TournamentID and SeasonID are interchangeable. To access a previous season, first interrogate the tournaments/[tournamentID]/seasons endpoint to ascertain the required seasonID, then use that seasonID in place of the tournamentID for any of the following endpoints:

    • Tournaments/seasonID/results
    • Tournaments/seasonID/schedule
    • Tournaments/seasonID/teams/teamID/statistics
    • Tournaments/seasonID/standings

    Q: What are the valid outcomes for probabilities?

    A: Here are the valid outcome probabilities:

    • home_team_winner
    • away_team_winner

    Q: How do I find out the coverage for a particular match?

    A: Find the node called: coverage_info. The attribute live_coverage reports whether Sportradar has live coverage of the match or not. At a tournament level, the coverage is described in the tournament_info endpoint.

    Q: Why do different groups have coverage information for a tournament?

    A: The notion of “groups” is versatile and is used to distinguish between playoffs, and our tournaments structures and is therefore necessary to describe coverage at a group level for consistency. Generally, however, within a tournament in Basketball, there will be no difference between tournament coverage between conferences.

    Q: What are the point event possible values?

    A: Here are the possible values for an event:

    • match_started
    • period_start
    • ball_possession
    • miss
    • rebound
    • score_change
    • foul
    • free_throw
    • ball_turnover
    • ball_steal
    • ball_block
    • break_start
    • timeout
    • period_score
    • match_ended

    Q: What are the valid tournament types?

    A: Here are the valid tournament types:

    • group
    • playoff
    • cup

    Q: What are markets and what are the different markets?

    A: Markets is something you can bet on that we provide probabilities for. Over time we intend to provide more and more markets in the API. Currently the only market we provide is 3-way (will the home team win? Or the away team? Or will it be a draw?).

    Q: What are the possible outcomes?

    A: Different markets have different outcomes. The available markets are currently:

    • home_team_winner
    • away_team_winner
    • draw

    Q: Why am I not seeing player statistics for a given match?

    A: Currently, only the NBA competition displays player stats for a match.

    Q: What is the scale of the X Y coordinates?

    A: The court we use is 100 by 100. Here is a layout of the court:

    0 X 100
    Y
    100
    Return to top