NCAA Men's Basketball v4

Frequently Asked Questions
API API Version Data Entry Workflow XSD Schema
NCAA Men's Basketball v4 Data Entry Workflow Download
Note: Authentication is required for all API calls.
## NCAA Men's Basketball API Map To best utilize the NCAA Men's 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 a team's leader in assists for a given game: >
  1. Call the schedule or daily schedule and find the Game Id for the chosen game
  2. Call the Game Boxscore using the Game Id
  3. Find the Team Assists Leader statistics and locate the player full_name attribute
>The name of the team's leader in assists is displayed. >
    >To find a player's average points per game: >
    1. Call the season or series schedule and find id for the team the player is on
    2. Call the Team Profile using the Team ID
    3. Locate the Player ID for your chosen player and call the Player Profile.
    4. Find the average element with the points attribute
    >The players's average points are displayed. The primary feeds require only a date or season to call the endpoints. Those feeds provide Game, Team, or Player Ids which can be used to generate the game, team, and player feeds. All of the other feeds require no variables.
    Note: Tournament Ids are only listed in the Tournament List feed. Use the Tournament List to get the Ids required to access the Tournament Schedule and Tournament Summary.
    ## Coverage Levels We provide two different levels of detail to ensure maximum coverage. We combine coverage levels with the correct feeds to ensure you are getting the most comprehensive data offering in the most efficient manner possible. Full – We provide live play-by-play coverage for the entire game. We provide updated scores and time remaining as well as team and player level data in near real time. Full coverage is available for any game in which we have a reliable broadcast available and one or more participants are members of the following conferences: B10, Big East, Big 12, Pac-12, ACC, SEC, A10, MVC, WCC, AAC, MW. Extended Boxscore – We provide scores and time remaining, in a timely manner, as the game progresses. We provide team and player level data for the game within 120 minutes of the official results being posted. Extended Boxscore coverage is available for any game involving a Division I program, not covered via our full coverage offering.
    Note: All early season tournament games as well as all conference tournament games, available via a reliable broadcast, will be done via our full coverage offering.
    Note: Coverage levels may be adjusted up to the scheduled start time at the discretion of our data entry managers for such reasons as resource availability as well as possible broadcast and technical difficulties.
    ## March Madness Workflow and Samples Sportradar's data entry experts will have the entire field input within 2 hours of the announcements on Selection Sunday. Prior to the matchup announcements, the Tournament Schedule and Tournament Summary feeds will return 200 results with basic Regional bracket information included. To access these feeds, you must input the NCAA Men's Division I Basketball Tournament unique ID, found in the [Tournament List](https://developer.sportradar.com/docs/basketball/NCAA_Mens_Basketball_v7#tournament-list) feed. See below for sample data. Pre-Selection Sunday Tournament Schedule - Tournament Summary During the matchup announcements all available team and schedule data is added to each feed. See below for sample data. Selection Sunday - Top 4 Seeds Announced (Region Rank Included) Tournament Schedule - Tournament Summary Selection Sunday - Midway Through Announcement Tournament Schedule - Tournament Summary The below sample provides the behavior of the Schedule and Summary feeds after all Selection Sunday matchups have been announced and populated in our feeds. After Selection Sunday Tournament_Schedule - Tournament Summary Lastly, you can reference a completed Division I Tournament bracket here and here. ## Daily Change Log Provides IDs and timestamps for teams, players, game statistics, schedules, and standings that have been modified on a given date. To receive the data updates, use these unique IDs to pull relevant API feeds.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Game Data Point: Id Last Modified
    League Data Point: Alias
    Id
    Name Season Id
    Player Data Points: Full Name Id Last Modified
    Team Data Points: Id
    Last Modified
    Market Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/league/2017/10/30/changes.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", "/ncaamb/trial/v4/en/league/2017/10/30/changes.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/ncaamb/trial/v4/en/league/2017/10/30/changes.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Daily Change Log feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/league/`{year}`/`{month}`/`{day}`/changes.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `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 Change Log, use the following URL. https://feed.elasticstats.com/schema/basketball/changelog-v2.0.xsd Return to API map ## Daily Schedule Date, time, location, and other event details for every match-up taking place in the league-defined day.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Game Data Points: Away Team Alias
    Away Team Id
    Away Team Name
    Away Team Points
    Away Team Seed Number
    Broadcast - Cable
    Broadcast - Internet
    Broadcast - Network
    Broadcast - Radio
    Broadcast - Satellite
    Conference Game
    Daily Schedule Date
    Game Coverage
    Game Id
    Game Status
    Game Title
    Home Team Alias
    Home Team Id
    Home Team Name
    Home Team Points
    Home Team Seed Number
    Neutral Site
    Scheduled Date and Time
    League Data Points: League Alias League Id League Name
    Venue Data Points: Address
    Capacity
    City
    Country
    Description
    Name
    State
    Venue Id
    Zip
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/games/2017/11/10/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", "/ncaamb/trial/v4/en/games/2017/11/10/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/ncaamb/trial/v4/en/games/2017/11/10/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Daily Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/games/`{year}`/`{month}`/`{day}`/schedule.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `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 Schedule, use the following URL. https://feed.elasticstats.com/schema/basketball/schedule-v3.0.xsd Return to API map ## Game Boxscore Top-level team scores by half along with full statistics for each team’s leader in points, rebounds, and assists.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Boxscore Data Points: Attendance
    Away Team Bonus Flag
    Away Team Double Bonus Flag
    Away Team Game Score
    Away Team Half Score
    Away Team Id
    Away Team Market
    Away Team Name
    Away Team Overtime Score
    Away Team Rank
    Away Team Timeouts Remaining
    Half Number
    Half Sequence
    Home Team Bonus Flag
    Home Team Double Bonus Flag
    Home Team Flag
    Home Team Game Score
    Home Team Half Score
    Home Team Id
    Home Team Market
    Home Team Name
    Home Team Overtime Score
    Home Team Rank
    Home Team Timeouts Remaining
    Lead Changes
    Overtime Number
    Overtime Sequence
    Possession Arrow
    Team Assists Leader - Player Full Name
    Team Assists Leader - Player Id
    Team Points Leader - Player Full Name
    Team Points Leader - Player Id
    Team Rebounds Leader - Player Full Name
    Team Rebounds Leader - Player Id
    Times Tied
    Game Data Points: Away Team Id
    Conference Game
    Game Clock
    Game Coverage
    Game Half
    Game Id
    Game Status
    Game Title
    Home Team Id
    Neutral Site
    Scheduled Date And Time
    Player Game Statistics Data Points: Assists
    Assists To Turnover Ratio
    Blocked Attempts
    Blocked Shots
    Defensive Rebounds
    Double Double
    Effective Field Goal Percentage
    Efficiency
    Efficiency Game Score
    Ejections
    Field Goal Attempts
    Field Goal Percentage
    Field Goals Made
    Flagrant Fouls
    Fouls Drawn
    Free Throw Attempts
    Free Throw Percentage
    Free Throws Made
    Minutes Played
    Offensive Fouls
    Offensive Rebounds
    Personal Fouls
    Plus/Minus
    Points
    Points in the Paint
    Points in the Paint Attempts
    Points in the Paint Percentage
    Points in the Paint Made
    Points Off Turnovers
    Rebounds
    Second Chance Points
    Steals
    Technical Fouls
    Three Point Attempts
    Three Point Percentage
    Three Points Made
    Triple Double
    True Shooting Attempts
    True Shooting Percentage
    Turnovers
    Two Point Attempts
    Two Point Percentage
    Two Points Made
    Player Data Points: Full Name
    Id
    Jersey Number
    Position
    Primary Position
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/games/74807d64-3089-4421-a10a-8372bc683fea/boxscore.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", "/ncaamb/trial/v4/en/games/74807d64-3089-4421-a10a-8372bc683fea/boxscore.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/ncaamb/trial/v4/en/games/74807d64-3089-4421-a10a-8372bc683fea/boxscore.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Game Boxscore feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/games/`{game_id}`/boxscore.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `game_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 Game Boxscore, use the following URL. https://feed.elasticstats.com/schema/basketball/game-v3.0.xsd Return to API map ## Game Summary Top-level boxscore information along with detailed game stats at the team and player levels.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Boxscore Data Points: Attendance
    Away Team Bonus Flag
    Away Team Double Bonus Flag
    Away Team Game Score
    Away Team Half Score
    Away Team Id
    Away Team Market
    Away Team Name
    Away Team Overtime Score
    Away Team Rank
    Away Team Timeouts Remaining
    Half Number
    Half Sequence
    Home Team Bonus Flag
    Home Team Double Bonus Flag
    Home Team Flag
    Home Team Game Score
    Home Team Half Score
    Home Team Id
    Home Team Market
    Home Team Name
    Home Team Overtime Score
    Home Team Rank
    Home Team Timeouts Remaining
    Lead Changes
    Lineup Active for Game
    Lineup Ejected
    Lineup Fouled Out
    Lineup Played
    Lineup Started
    Overtime Number
    Overtime Sequence
    Possession Arrow
    Times Tied
    Game Data Points: Away Team Id
    Conference Game
    Entry Mode
    Game Clock
    Game Coverage
    Game Half
    Game Id
    Game Status
    Game Title
    Home Team Id
    Neutral Site
    Scheduled Date And Time
    Player Game Statistics Data Points: Assists
    Assists To Turnover Ratio
    Blocked Attempts
    Blocked Shots
    Defensive Rebounds
    Double Double
    Effective Field Goal Percentage
    Efficiency
    Efficiency Game Score
    Ejections
    Field Goal Attempts
    Field Goal Percentage
    Field Goals Made
    Flagrant Fouls
    Fouls Drawn
    Free Throw Attempts
    Free Throw Percentage
    Free Throws Made
    Minutes Played
    Offensive Fouls
    Offensive Rebounds
    Personal Fouls
    Plus/Minus
    Points
    Points in the Paint
    Points in the Paint Attempts
    Points in the Paint Percentage
    Points in the Paint Made
    Points Off Turnovers
    Rebounds
    Second Chance Points
    Steals
    Technical Fouls
    Three Point Attempts
    Three Point Percentage
    Three Points Made
    Triple Double
    True Shooting Attempts
    True Shooting Percentage
    Turnovers
    Two Point Attempts
    Two Point Percentage
    Two Points Made
    Team Game Statistics Data Points: Assists
    Assists To Turnover Ratio
    Bench Points
    Biggest Lead
    Blocked Attempts
    Blocked Shots
    Coach Technical Fouls
    Defensive Rebounds
    Effective Field Goal Percentage
    Efficiency
    Efficiency Game Score
    Ejections
    Fast Break Points
    Field Goal Attempts
    Field Goal Percentage
    Field Goals Made
    Flagrant Fouls
    Fouled Out
    Fouls Drawn
    Free Throw Attempts
    Free Throw Percentage
    Free Throws Made
    Minutes Played
    Most Unanswered - Own Score
    Most Unanswered - Opponent Score
    Most Unanswered - Points
    Offensive Fouls
    Offensive Rebounds
    Personal Fouls
    Plus/Minus
    Points
    Points Against
    Points in the Paint
    Points in the Paint Attempts
    Points in the Paint Percentage
    Points in the Paint Made
    Points off Turnovers
    Rebounds
    Second Chance Points
    Steals
    Team Rebounds
    Team Turnovers
    Technical Fouls
    Three Point Attempts
    Three Point Percentage
    Three Points Made
    Total Player Technical Fouls
    True Shooting Attempts
    True Shooting Percentage
    Turnovers
    Two Point Attempts
    Two Point Percentage
    Two Points Made
    Player Period Statistics Data Points: Assists
    Assists To Turnover Ratio
    Blocked Attempts
    Blocked Shots
    Defensive Rebounds
    Effective Field Goal Percentage
    Efficiency
    Efficiency Game Score
    Field Goal Attempts
    Field Goal Percentage
    Field Goals Made
    Flagrant Fouls
    Fouls Drawn
    Free Throw Attempts
    Free Throw Percentage
    Free Throws Made
    Id
    Minutes Played
    Number
    Offensive Fouls
    Offensive Rebounds
    Personal Fouls
    Plus/Minus
    Points
    Points in the Paint
    Points in the Paint Attempts
    Points in the Paint Percentage
    Points in the Paint Made
    Points Off Turnovers
    Rebounds
    Second Chance Points
    Sequence
    Steals
    Technical Fouls
    Three Point Attempts
    Three Point Percentage
    Three Points Made
    True Shooting Attempts
    True Shooting Percentage
    Turnovers
    Two Point Attempts
    Two Point Percentage
    Two Points Made
    Type
    Team Period Statistics Data Points: Assists
    Assists To Turnover Ratio
    Bench Points
    Biggest Lead
    Blocked Attempts
    Blocked Shots
    Coach Technical Fouls
    Defensive Rebounds
    Effective Field Goal Percentage
    Efficiency
    Efficiency Game Score
    Field Goal Attempts
    Field Goal Percentage
    Field Goals Made
    Flagrant Fouls
    Fouls Drawn
    Free Throw Attempts
    Free Throw Percentage
    Free Throws Made
    Id
    Minutes Played
    Number
    Offensive Fouls
    Offensive Rebounds
    Personal Fouls
    Plus/Minus
    Points
    Points Against
    Points in the Paint
    Points in the Paint Attempts
    Points in the Paint Percentage
    Points in the Paint Made
    Points off Turnovers
    Rebounds
    Second Chance Points
    Sequence
    Steals
    Team Rebounds
    Team Turnovers
    Technical Fouls
    Three Point Attempts
    Three Point Percentage
    Three Points Made
    Total Player Technical Fouls
    True Shooting Attempts
    True Shooting Percentage
    Turnovers
    Two Point Attempts
    Two Point Percentage
    Two Points Made
    Type
    Player Data Points: First Name
    Full Name
    Id
    Jersey Number
    Last Name
    Position
    Primary Position
    Venue Data Points: Address
    Capacity
    City
    Country
    Description
    Name
    State
    Venue Id
    Zip
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/games/200097f8-bb15-4607-983a-500d8fdef0c1/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", "/ncaamb/trial/v4/en/games/200097f8-bb15-4607-983a-500d8fdef0c1/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/ncaamb/trial/v4/en/games/200097f8-bb15-4607-983a-500d8fdef0c1/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Game Summary feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/games/`{game_id}`/summary.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `game_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 Game Summary, use the following URL. https://feed.elasticstats.com/schema/basketball/game-v3.0.xsd Return to API map ## League Hierarchy League, conference, division, and team identification and association information.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    League Data Points: Conference Alias
    Conference Id
    Conference Name
    Division Alias
    Division Id
    Division Name
    League Alias
    League Id
    League Name
    Team Data Points: Alias
    Id
    Market Name
    Venue Data Points: Address
    Capacity
    City
    Country
    Description
    Name
    State
    Venue Id
    Zip
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/league/hierarchy.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", "/ncaamb/trial/v4/en/league/hierarchy.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/ncaamb/trial/v4/en/league/hierarchy.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the League Hierarchy feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/league/hierarchy.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for League Hierarchy, use the following URL. https://feed.elasticstats.com/schema/basketball/ncaam/hierarchy-v2.0.xsd Return to API map ## League Leaders NCAA leader information for various offensive and defensive categories including full player seasonal statistics for each player in each category.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    League Data Points: Season Id Season Type Season Year
    League Leaders Data Points: Assists
    Assists Per Game
    Blocked Shots
    Blocked Shots Per Game
    Category Name
    Category Type
    Field Goal Percentage
    Free Throw Percentage
    Minutes Played
    Minutes Played Per Game
    Offensive Rebounds
    Personal Fouls
    Personal Fouls Per Game
    Player Rank
    Points
    Points Per Game
    Rebounds
    Rebounds Per Game
    Stat Category
    Steals
    Steals Per Game
    Three Point Percentage
    Tied Flag
    Turnovers
    Turnovers Per Game
    Two Point Percentage
    Player Data Points: First Name
    Full Name
    Id
    Jersey Number
    Last Name
    Position
    Primary Position
    Player Season Statistics Data Points: Assists
    Assists Per Game
    Assists to Turnover Ratio
    Blocked Attempts
    Blocked Attempts Per Game
    Blocked Shots
    Blocked Shots Per Game
    Defensive Rebounds
    Defensive Rebounds Per Game
    Efficiency
    Efficiency Per Game
    Ejections
    Field Goal Attempts
    Field Goal Attempts Per Game
    Field Goal Percentage
    Field Goals Made
    Field Goals Made Per Game
    Flagrant Fouls
    Flagrant Fouls Per Game
    Foul Outs
    Free Throw Attempts
    Free Throw Attempts Per Game
    Free Throw Percentage
    Free Throws Made
    Free Throws Made Per Game
    Games Played
    Games Started
    Minutes Played
    Minutes Played Per Game
    Offensive Rebounds
    Offensive Rebounds Per Game
    Personal Fouls
    Personal Fouls Per Game
    Points
    Points Per Game
    Rebounds
    Rebounds Per Game
    Steals
    Steals Per Game
    Technical Fouls
    Three Point Attempts
    Three Point Attempts Per Game
    Three Point Percentage
    Three Points Made
    Three Points Made Per Game
    True Shooting Attempts
    True Shooting Attempts Per Game
    True Shooting Percentage
    Turnovers
    Turnovers Per Game
    Two Point Attempts
    Two Point Attempts Per Game
    Two Point Percentage
    Two Points Made
    Two Points Made Per Game
    Team Data Points: Id Market Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/seasons/2016/REG/a30fe8ff-82d2-4521-bc8d-e08e6a9dbb52/leaders.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", "/ncaamb/trial/v4/en/seasons/2016/REG/a30fe8ff-82d2-4521-bc8d-e08e6a9dbb52/leaders.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/ncaamb/trial/v4/en/seasons/2016/REG/a30fe8ff-82d2-4521-bc8d-e08e6a9dbb52/leaders.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the League Leaders feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_year}`/`{ncaamb_season}`/`{division/conference}`/leaders.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `season_year` | Year in 4 digit format (YYYY). | | `ncaamb_season` | Preseason (PRE), Regular Season (REG), or Postseason (PST). | | `division/conference` | ID for a given division or conference. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for League Leaders, use the following URL. https://feed.elasticstats.com/schema/basketball/statistics-v2.0.xsd Return to API map ## Play-By-Play Detailed, real-time information on every team possession and game event.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Boxscore Data Points: Attendance
    Away Team Bonus Flag
    Away Team Double Bonus Flag
    Away Team Game Score
    Away Team Half Score
    Away Team Id
    Away Team Market
    Away Team Name
    Away Team Overtime Score
    Away Team Rank
    Away Team Timeouts Remaining
    Half Number
    Half Sequence
    Home Team Bonus Flag
    Home Team Double Bonus Flag
    Home Team Flag
    Home Team Game Score
    Home Team Half Score
    Home Team Id
    Home Team Market
    Home Team Name
    Home Team Overtime Score
    Home Team Rank
    Home Team Timeouts Remaining
    Lead Changes
    Overtime Number
    Overtime Sequence
    Possession Arrow
    Times Tied
    Game Data Points: Away Team Id
    Conference Game
    Game Clock
    Game Coverage
    Game Half
    Game Id
    Game Status
    Game Title
    Home Team Id
    Neutral Site
    Scheduled Date And Time
    Play-By-Play Data Points: Attributed Basket Team is Attacking
    Attributed Team Id
    Attributed Team Market
    Attributed Team Name
    Event Attempt
    Event Clock
    Event Description
    Event Id
    Event Location X Coordinate
    Event Location Y Coordinate
    Event Participants Player Full Name
    Event Participants Player Id
    Event Participants Player Jersey Number
    Event Participants Team Id
    Event Participants Team Market
    Event Participants Team Name
    Event Turnover Type
    Event Type
    Event Updated
    Fieldgoal Made Flag
    Fieldgoal Points
    Fieldgoal Shot Type
    Fieldgoal Shot Type Description
    Fieldgoal Three Point Shot
    Freethrow Made Flag
    Freethrow Free Throw Type
    Half Id
    Half Number
    Half Sequence
    On Court Participants Player Full Name
    On Court Participants Player Id
    On Court Participants Player Jersey Number
    On Court Participants Player Reference
    On Court Participants Team Id
    On Court Participants Team Market
    On Court Participants Team Name
    On Court Participants Team Reference
    Possession Team Id
    Possession Team Market
    Possession Team Name
    Rebound Rebound Type
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/games/200097f8-bb15-4607-983a-500d8fdef0c1/pbp.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", "/ncaamb/trial/v4/en/games/200097f8-bb15-4607-983a-500d8fdef0c1/pbp.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/ncaamb/trial/v4/en/games/200097f8-bb15-4607-983a-500d8fdef0c1/pbp.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Play-By-Play feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/games/`{game_id}`/pbp.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `game_id` | ID for a given game. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Play-By-Play, use the following URL. https://feed.elasticstats.com/schema/basketball/pbp-v3.0.xsd Return to API map ## Player Profile Provides player biographical information and seasonal statistics.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    League Data Points: League Alias
    League Id
    League Name
    Season Id
    Season Type
    Season Year
    Player Data Points: Abbreviated Name
    Birth Place
    Experience
    First Name
    Full Name
    Height (in)
    Id
    Jersey Number
    Last Name
    Position
    Primary Position
    Status
    Updated
    Weight (lbs)
    Player Season Statistics Data Points: Assists
    Assists Per Game
    Assists to Turnover Ratio
    Blocked Attempts
    Blocked Attempts Per Game
    Blocked Shots
    Blocked Shots Per Game
    Defensive Rebounds
    Defensive Rebounds Per Game
    Efficiency
    Efficiency Per Game
    Ejections
    Field Goal Attempts
    Field Goal Attempts Per Game
    Field Goal Percentage
    Field Goals Made
    Field Goals Made Per Game
    Flagrant Fouls
    Flagrant Fouls Per Game
    Foul Outs
    Free Throw Attempts
    Free Throw Attempts Per Game
    Free Throw Percentage
    Free Throws Made
    Free Throws Made Per Game
    Games Played
    Games Started
    Minutes Played
    Minutes Played Per Game
    Offensive Rebounds
    Offensive Rebounds Per Game
    Personal Fouls
    Personal Fouls Per Game
    Points
    Points Per Game
    Rebounds
    Rebounds Per Game
    Steals
    Steals Per Game
    Technical Fouls
    Three Point Attempts
    Three Point Attempts Per Game
    Three Point Percentage
    Three Points Made
    Three Points Made Per Game
    True Shooting Attempts
    True Shooting Attempts Per Game
    True Shooting Percentage
    Turnovers
    Turnovers Per Game
    Two Point Attempts
    Two Point Attempts Per Game
    Two Point Percentage
    Two Points Made
    Two Points Made Per Game
    Team Data Points: Alias
    Id
    Market Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/players/15b40697-5e19-4976-8dc6-d0f1778270fd/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", "/ncaamb/trial/v4/en/players/15b40697-5e19-4976-8dc6-d0f1778270fd/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/ncaamb/trial/v4/en/players/15b40697-5e19-4976-8dc6-d0f1778270fd/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Player Profile feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/players/`{player_id}`/profile.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `player_id` | ID for a given player. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Player Profile, use the following URL. https://feed.elasticstats.com/schema/basketball/profile-v3.0.xsd Return to API map ## Rankings (Current Week) List of current Associated Press and USA Today rankings, including those teams not ranked but receiving votes.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Rankings Data Points: Effective Time
    First Place Votes
    Overall - Losses
    Overall - Wins
    Poll Alias
    Poll Id
    Poll Name
    Poll Points
    Poll Rank
    Previous API Rank
    Votes
    Week
    Year
    Team Data Points: Id Market Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/polls/ap/2016/rankings.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", "/ncaamb/trial/v4/en/polls/ap/2016/rankings.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/ncaamb/trial/v4/en/polls/ap/2016/rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Rankings feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/polls/`{poll_name}`/`{season_year}`/rankings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `poll_name` | Abbreviated 2 letter name of the poll: Associated Press (AP), USA Today (US). | | `season_year` | Year in 4 digit format (YYYY). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Rankings, use the following URL. https://feed.elasticstats.com/schema/basketball/ranking-v2.0.xsd Return to API map ## Rankings (By Week) List by week of Associated Press and USA Today rankings, including those teams not ranked but receiving votes.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Rankings Data Points: Effective Time
    First Place Votes
    Overall - Losses
    Overall - Wins
    Poll Alias
    Poll Id
    Poll Name
    Poll Points
    Poll Rank
    Previous API Rank
    Votes
    Week
    Year
    Team Data Points: Id Market Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/polls/ap/2016/w2/rankings.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", "/ncaamb/trial/v4/en/polls/ap/2016/w2/rankings.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/ncaamb/trial/v4/en/polls/ap/2016/w2/rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured for AP., or US. Access the Rankings By Week feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/polls/`{poll_name}`/`{season_year}`/`{ncaamb_week}`/rankings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `poll_name` | Abbreviated 2 letter name of the poll: Associated Press (AP), USA Today (US). | | `season_year` | Year in 4 digit format (YYYY). | | `ncaamb_week` | Week number in 1-2 digit format after a W (W14). Alternatively, PRE can be used for Pre-season, PST for Post-season, or PSTF Post-season final (USA Today only). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for weekly Rankings, use the following URL. https://api.sportradar.us/ncaamb-`{access_level}{version}`/schema/rankings-v2.0.xsd?api_key=`{your_api_key}` Return to API map ## RPI Rankings RPI information including rating, strength of schedule, ranking, and records based on the Sportradar’s RPI calculations.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    League Data Points: Season Id Season Type Season Year
    Rankings Data Points: Adjusted Winning Pct
    Away Losses
    Away Wins
    Current API Rank
    Home Losses
    Home Wins
    Neutral Site Losses
    Neutral Site Wins
    Opponent’s Losses
    Opponent’s Wins
    Opponent’s Opponent’s Winning Pct
    Opponent’s Winning Pct
    Opponent’s Ranked 1-25 – Losses
    Opponent’s Ranked 1-25 – Wins
    Opponent’s Ranked 1-50 – Losses
    Opponent’s Ranked 1-50 – Wins
    Opponent’s Ranked 101-150 – Losses
    Opponent’s Ranked 101-150 – Wins
    Opponent’s Ranked 151+ – Losses
    Opponent’s Ranked 151+ – Wins
    Opponent’s Ranked 26-50 – Losses
    Opponent’s Ranked 26-50 – Wins
    Opponent’s Ranked 51-100 – Losses
    Opponent’s Ranked 51-100 – Wins
    Opponent’s RPI Rank (Range)
    Overall - Losses
    Overall - Wins
    Previous RPI Rank
    RPI Rating
    Strength of Schedule
    Team Data Points: Id Market Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/rpi/2016/rankings.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", "/ncaamb/trial/v4/en/rpi/2016/rankings.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/ncaamb/trial/v4/en/rpi/2016/rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the RPI Rankings feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/rpi/`{season_year}`/rankings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `season_year` | Year in 4 digit format (YYYY). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for daily RPI Rankings, use the following URL. https://feed.elasticstats.com/schema/basketball/rpi-ranking-v2.0.xsd Return to API map ## Schedule Date, time, location, and other event details for every match-up taking place in the full league season.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Game Data Points: Away Team Alias
    Away Team Id
    Away Team Name
    Away Team Points
    Away Team Seed Number
    Broadcast - Cable
    Broadcast - Internet
    Broadcast - Network
    Broadcast - Radio
    Broadcast - Satellite
    Conference Game
    Game Coverage
    Game Id
    Game Status
    Game Title
    Home Team Alias
    Home Team Id
    Home Team Name
    Home Team Points
    Home Team Seed Number
    Neutral Site
    Scheduled Date and Time
    League Data Points: League Alias
    League Id
    League Name
    Season Id
    Season Type
    Season Year
    Venue Data Points: Address
    Capacity
    City
    Country
    Description
    Name
    State
    Venue Id
    Zip
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/games/2016/reg/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", "/ncaamb/trial/v4/en/games/2016/reg/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/ncaamb/trial/v4/en/games/2016/reg/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/games/`{season_year}`/`{ncaamb_season}`/schedule.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `season_year` | Year in 4 digit format (YYYY). | | `ncaamb_season` | Conference Tournament (CT), Regular Season (REG), or Postseason (PST). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Schedule, use the following URL. https://feed.elasticstats.com/schema/basketball/schedule-v3.0.xsd Return to API map ## Seasonal Statistics (Season To Date) Detailed team and player statistics for the defined season.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    League Data Points: Season Id Season Type Season Year
    Player Data Points: First Name
    Full Name
    Id
    Jersey Number
    Last Name
    Position
    Primary Position
    Opponent Season Statistics Data Points: Assists
    Assists Per Game
    Assists To Turnover Ratio
    Blocked Attempts
    Blocked Attempts Per Game
    Blocked Shots
    Blocked Shots Per Game
    Defensive Rebounds
    Defensive Rebounds Per Game
    Efficiency
    Efficiency Per Game
    Ejections
    Fast Break Points
    Fast Break Points Per Game
    Field Goal Attempts
    Field Goal Attempts Per Game
    Field Goal Percentage
    Field Goals Made
    Field Goals Made Per Game
    Flagrant Fouls
    Flagrant Fouls Per Game
    Foul Outs
    Free Throw Attempts
    Free Throw Attempts Per Game
    Free Throw Percentage
    Free Throws Made
    Free Throws Made Per Game
    Games Played
    Minutes Played
    Minutes Played Per Game
    Offensive Rebounds
    Offensive Rebounds Per Game
    Personal Fouls
    Personal Fouls Per Game
    Points
    Points In the Paint
    Points in the Paint Per Game
    Points off Turnovers
    Points off Turnovers Per Game
    Points Per Game
    Rebounds
    Rebounds Per Game
    Second Chance Points
    Second Chance Points per Game
    Steals
    Steals Per Game
    Technical Fouls
    Three Point Attempts
    Three Point Attempts Per Game
    Three Point Percentage
    Three Points Made
    Three Points Made Per Game
    True Shooting Attempts
    True Shooting Attempts Per Game
    True Shooting Percentage
    Turnovers
    Turnovers Per Game
    Two Point Attempts
    Two Point Attempts Per Game
    Two Point Percentage
    Two Points Made
    Two Points Made Per Game
    Player Season Statistics Data Points: Assists
    Assists Per Game
    Assists to Turnover Ratio
    Blocked Attempts
    Blocked Attempts Per Game
    Blocked Shots
    Blocked Shots Per Game
    Defensive Rebounds
    Defensive Rebounds Per Game
    Efficiency
    Efficiency Per Game
    Ejections
    Field Goal Attempts
    Field Goal Attempts Per Game
    Field Goal Percentage
    Field Goals Made
    Field Goals Made Per Game
    Flagrant Fouls
    Flagrant Fouls Per Game
    Foul Outs
    Free Throw Attempts
    Free Throw Attempts Per Game
    Free Throw Percentage
    Free Throws Made
    Free Throws Made Per Game
    Games Played
    Games Started
    Minutes Played
    Minutes Played Per Game
    Offensive Rebounds
    Offensive Rebounds Per Game
    Personal Fouls
    Personal Fouls Per Game
    Points
    Points Per Game
    Rebounds
    Rebounds Per Game
    Steals
    Steals Per Game
    Technical Fouls
    Three Point Attempts
    Three Point Attempts Per Game
    Three Point Percentage
    Three Points Made
    Three Points Made Per Game
    True Shooting Attempts
    True Shooting Attempts Per Game
    True Shooting Percentage
    Turnovers
    Turnovers Per Game
    Two Point Attempts
    Two Point Attempts Per Game
    Two Point Percentage
    Two Points Made
    Two Points Made Per Game
    Team Season Statistics Data Points: Assists
    Assists Per Game
    Assists To Turnover Ratio
    Blocked Attempts
    Blocked Attempts Per Game
    Blocked Shots
    Blocked Shots Per Game
    Defensive Rebounds
    Defensive Rebounds Per Game
    Efficiency
    Efficiency Per Game
    Ejections
    Fast Break Points
    Fast Break Points Per Game
    Field Goal Attempts
    Field Goal Attempts Per Game
    Field Goal Percentage
    Field Goals Made
    Field Goals Made Per Game
    Flagrant Fouls
    Flagrant Fouls Per Game
    Foul Outs
    Free Throw Attempts
    Free Throw Attempts Per Game
    Free Throw Percentage
    Free Throws Made
    Free Throws Made Per Game
    Games Played
    Minutes Played
    Minutes Played Per Game
    Offensive Rebounds
    Offensive Rebounds Per Game
    Personal Fouls
    Personal Fouls Per Game
    Points
    Points In the Paint
    Points in the Paint Per Game
    Points off Turnovers
    Points off Turnovers Per Game
    Points Per Game
    Rebounds
    Rebounds Per Game
    Second Chance Points
    Second Chance Points per Game
    Steals
    Steals Per Game
    Technical Fouls
    Three Point Attempts
    Three Point Attempts Per Game
    Three Point Percentage
    Three Points Made
    Three Points Made Per Game
    True Shooting Attempts
    True Shooting Attempts Per Game
    True Shooting Percentage
    Turnovers
    Turnovers Per Game
    Two Point Attempts
    Two Point Attempts Per Game
    Two Point Percentage
    Two Points Made
    Two Points Made Per Game
    Team Data Points: Id Market Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/seasons/2016/reg/teams/2f4d21f8-6d5f-48a5-abca-52a30583871a/statistics.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", "/ncaamb/trial/v4/en/seasons/2016/reg/teams/2f4d21f8-6d5f-48a5-abca-52a30583871a/statistics.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/ncaamb/trial/v4/en/seasons/2016/reg/teams/2f4d21f8-6d5f-48a5-abca-52a30583871a/statistics.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Seasonal Statistics feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_year}`/`{ncaamb_season}`/teams/`{team_id}`/statistics.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `season_year` | Year in 4 digit format (YYYY). | | `ncaamb_season` | Conference Tournament (CT), Regular Season (REG), or Postseason (PST). | | `team_id` | ID for a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Seasonal Statistics, use the following URL. https://feed.elasticstats.com/schema/basketball/statistics-v3.0.xsd Return to API map ## Standings Detailed team records across various views including, overall, conference, and division information.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    League Data Points: Conference Alias
    Conference Id
    Conference Name
    League Alias
    League Id
    League Name
    Season Id
    Season Type
    Season Year
    Standings Data Points: Games Behind Conference
    Overall - Conference Points Against
    Overall - Conference Points For
    Overall - Conference Rank
    Overall Losses
    Overall Point Differential
    Overall Points Against
    Overall Points For
    Overall - Postseason Ineligible
    Overall - Strength of Schedule Rank
    Overall - Subdivision Rank
    Overall Winning Percentage
    Overall Wins
    Records Record Type
    Records Wins
    Records Losses
    Records Win Percentage
    Streak
    Subdivision
    Team Data Points: Id Market Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/seasons/2016/reg/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", "/ncaamb/trial/v4/en/seasons/2016/reg/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/ncaamb/trial/v4/en/seasons/2016/reg/standings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Standings feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_year}`/`{ncaamb_season}`/standings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `season_year` | Year in 4 digit format (YYYY). | | `ncaamb_season` | Conference Tournament (CT), Regular Season (REG), or Postseason (PST). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Standings, use the following URL. https://feed.elasticstats.com/schema/basketball/ncaam/standings-v3.0.xsd Return to API map ## Team Profile (Rosters) Provides top-level team information and a full roster of active players.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    League Data Points: Conference Alias
    Conference Id
    Conference Name
    Division Alias
    Division Id
    Division Name
    League Alias
    League Id
    League Name
    Player Data Points: Abbreviated Name
    Birth Place
    Experience
    First Name
    Full Name
    Height (in)
    Jersey Number
    Last Name
    Player Id
    Position
    Primary Position
    Status
    Updated
    Weight (lbs)
    Team Data Points: Alias
    Coach Experience
    Coach First Name
    Coach Full Name
    Coach Id
    Coach Last Name
    Coach Position
    Id
    Market
    Name
    Venue Data Points: Address
    Capacity
    City
    Country
    Description
    Name
    State
    Venue Id
    Zip
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/teams/9b166a3f-e64b-4825-bb6b-92c6f0418263/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", "/ncaamb/trial/v4/en/teams/9b166a3f-e64b-4825-bb6b-92c6f0418263/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/ncaamb/trial/v4/en/teams/9b166a3f-e64b-4825-bb6b-92c6f0418263/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Team Profile feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/teams/`{team_id}`/profile.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `team_id` | ID for 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. https://feed.elasticstats.com/schema/basketball/team-v2.0.xsd Return to API map ## Tournament List Summarized list of all tournaments scheduled for the given season including tournament name, location, start date, and end date.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    League Data Points: League Alias
    League Id
    League Name
    Season Id
    Season Type
    Season Year
    Tournament Data Points: End Date
    Start Date
    Status
    Tournament Id
    Tournament Location
    Tournament Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/tournaments/2016/reg/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", "/ncaamb/trial/v4/en/tournaments/2016/reg/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/ncaamb/trial/v4/en/tournaments/2016/reg/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament List feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/tournaments/`{season_year}`/`{ncaamb_season}`/schedule.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `season_year` | Year in 4 digit format (YYYY). | | `ncaamb_season` | Conference Tournament (CT), Regular Season (REG), or Postseason (PST). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Tournaments List, use the following URL. https://feed.elasticstats.com/schema/basketball/schedule-v3.0.xsd Return to API map ## Tournament Schedule Date, time, location, and other event details for every match-up taking place for a given tournament.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Game Data Points: Away Team Previous Tournament Game Away Team
    Away Team Previous Tournament Game Coverage
    Away Team Previous Tournament Game Home Team
    Away Team Previous Tournament Game Id
    Away Team Previous Tournament Game Outcome
    Away Team Previous Tournament Game Scheduled Date and Time
    Away Team Previous Tournament Game Status
    Away Team Previous Tournament Game Title
    Away Team Alias
    Away Team Id
    Away Team Name
    Away Team Points
    Away Team Seed Number
    Broadcast Cable
    Broadcast Internet
    Broadcast Network
    Broadcast Radio
    Broadcast Satellite
    Conference Game
    Game Coverage
    Game Id
    Game Status
    Game Title
    Home Team Previous Tournament Game Away Team
    Home Team Previous Tournament Game Coverage
    Home Team Previous Tournament Game Home Team
    Home Team Previous Tournament Game Id
    Home Team Previous Tournament Game Outcome
    Home Team Previous Tournament Game Scheduled Date and Time
    Home Team Previous Tournament Game Status
    Home Team Previous Tournament Game Title
    Home Team Alias
    Home Team Id
    Home Team Name
    Home Team Points
    Home Team Seed Number
    Neutral Site
    Scheduled Date and Time
    League Data Points: League Alias League Id League Name
    Tournament Data Points: Bracket Id
    Bracket Location
    Bracket Name
    Round Id
    Round Name
    Round Sequence
    Tournament Status
    Tournament Id
    Tournament Location
    Tournament Name
    Venue Data Points: Address
    Capacity
    City
    Country
    Description
    Name
    State
    Venue Id
    Zip
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/tournaments/03433979-9bfc-401f-a6f1-a9f7878041dc/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", "/ncaamb/trial/v4/en/tournaments/03433979-9bfc-401f-a6f1-a9f7878041dc/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/ncaamb/trial/v4/en/tournaments/03433979-9bfc-401f-a6f1-a9f7878041dc/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/tournaments/`{tournament_id}`/schedule.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `tournament_id` | ID for a given tournament. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Tournaments Schedule, use the following URL. https://feed.elasticstats.com/schema/basketball/schedule-v3.0.xsd Return to API map ## Tournament Statistics (Tournament To Date) Detailed team and player statistics for the defined tournament.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Tournament Data Points: Tournament Status
    Tournament Id
    Tournament Location Tournament Name
    Player Data Points: First Name
    Full Name
    Id
    Jersey Number
    Last Name
    Position
    Primary Position
    Opponent Season Statistics Data Points: Assists
    Assists Per Game
    Assists To Turnover Ratio
    Blocked Attempts
    Blocked Attempts Per Game
    Blocked Shots
    Blocked Shots Per Game
    Defensive Rebounds
    Defensive Rebounds Per Game
    Efficiency
    Efficiency Per Game
    Ejections
    Fast Break Points
    Fast Break Points Per Game
    Field Goal Attempts
    Field Goal Attempts Per Game
    Field Goal Percentage
    Field Goals Made
    Field Goals Made Per Game
    Flagrant Fouls
    Flagrant Fouls Per Game
    Foul Outs
    Free Throw Attempts
    Free Throw Attempts Per Game
    Free Throw Percentage
    Free Throws Made
    Free Throws Made Per Game
    Games Played
    Minutes Played
    Minutes Played Per Game
    Offensive Rebounds
    Offensive Rebounds Per Game
    Personal Fouls
    Personal Fouls Per Game
    Points
    Points In the Paint
    Points in the Paint Per Game
    Points off Turnovers
    Points off Turnovers Per Game
    Points Per Game
    Rebounds
    Rebounds Per Game
    Second Chance Points
    Second Chance Points per Game
    Steals
    Steals Per Game
    Technical Fouls
    Three Point Attempts
    Three Point Attempts Per Game
    Three Point Percentage
    Three Points Made
    Three Points Made Per Game
    True Shooting Attempts
    True Shooting Attempts Per Game
    True Shooting Percentage
    Turnovers
    Turnovers Per Game
    Two Point Attempts
    Two Point Attempts Per Game
    Two Point Percentage
    Two Points Made
    Two Points Made Per Game
    Player Season Statistics Data Points: Assists
    Assists Per Game
    Assists to Turnover Ratio
    Blocked Attempts
    Blocked Attempts Per Game
    Blocked Shots
    Blocked Shots Per Game
    Defensive Rebounds
    Defensive Rebounds Per Game
    Efficiency
    Efficiency Per Game
    Ejections
    Field Goal Attempts
    Field Goal Attempts Per Game
    Field Goal Percentage
    Field Goals Made
    Field Goals Made Per Game
    Flagrant Fouls
    Flagrant Fouls Per Game
    Foul Outs
    Free Throw Attempts
    Free Throw Attempts Per Game
    Free Throw Percentage
    Free Throws Made
    Free Throws Made Per Game
    Games Played
    Games Started
    Minutes Played
    Minutes Played Per Game
    Offensive Rebounds
    Offensive Rebounds Per Game
    Personal Fouls
    Personal Fouls Per Game
    Points
    Points Per Game
    Rebounds
    Rebounds Per Game
    Steals
    Steals Per Game
    Technical Fouls
    Three Point Attempts
    Three Point Attempts Per Game
    Three Point Percentage
    Three Points Made
    Three Points Made Per Game
    True Shooting Attempts
    True Shooting Attempts Per Game
    True Shooting Percentage
    Turnovers
    Turnovers Per Game
    Two Point Attempts
    Two Point Attempts Per Game
    Two Point Percentage
    Two Points Made
    Two Points Made Per Game
    Team Season Statistics Data Points: Assists
    Assists Per Game
    Assists To Turnover Ratio
    Blocked Attempts
    Blocked Attempts Per Game
    Blocked Shots
    Blocked Shots Per Game
    Defensive Rebounds
    Defensive Rebounds Per Game
    Efficiency
    Efficiency Per Game
    Ejections
    Fast Break Points
    Fast Break Points Per Game
    Field Goal Attempts
    Field Goal Attempts Per Game
    Field Goal Percentage
    Field Goals Made
    Field Goals Made Per Game
    Flagrant Fouls
    Flagrant Fouls Per Game
    Foul Outs
    Free Throw Attempts
    Free Throw Attempts Per Game
    Free Throw Percentage
    Free Throws Made
    Free Throws Made Per Game
    Games Played
    Minutes Played
    Minutes Played Per Game
    Offensive Rebounds
    Offensive Rebounds Per Game
    Personal Fouls
    Personal Fouls Per Game
    Points
    Points In the Paint
    Points in the Paint Per Game
    Points off Turnovers
    Points off Turnovers Per Game
    Points Per Game
    Rebounds
    Rebounds Per Game
    Second Chance Points
    Second Chance Points per Game
    Steals
    Steals Per Game
    Technical Fouls
    Three Point Attempts
    Three Point Attempts Per Game
    Three Point Percentage
    Three Points Made
    Three Points Made Per Game
    True Shooting Attempts
    True Shooting Attempts Per Game
    True Shooting Percentage
    Turnovers
    Turnovers Per Game
    Two Point Attempts
    Two Point Attempts Per Game
    Two Point Percentage
    Two Points Made
    Two Points Made Per Game
    Team Data Points: Id Market Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/tournaments/03433979-9bfc-401f-a6f1-a9f7878041dc/teams/68a3227f-677f-43b0-9a3a-cad79d0df9e2/statistics.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", "/ncaamb/trial/v4/en/tournaments/03433979-9bfc-401f-a6f1-a9f7878041dc/teams/68a3227f-677f-43b0-9a3a-cad79d0df9e2/statistics.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/ncaamb/trial/v4/en/tournaments/03433979-9bfc-401f-a6f1-a9f7878041dc/teams/68a3227f-677f-43b0-9a3a-cad79d0df9e2/statistics.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Statistics feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/tournaments/`{tournament_id}`/teams/`{team_id}`/statistics.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `tournament_id` | ID for a given tournament. | | `team_id` | ID for a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Tournament Statistics, use the following URL. https://feed.elasticstats.com/schema/basketball/statistics-v3.0.xsd Return to API map ## Tournament Summary (Seeded Tournaments Only) Tournament information including location, status, start date, end date, set up and participants.
    Update Frequency: As Necessary
    Content Type: XML or JSON
    Team Information Data Points: Id
    Market
    Name Seed
    Tournament Data Points: Bracket Id
    Bracket Location
    Bracket Name
    End Date
    Start Date
    Status
    Tournament Id
    Tournament Location
    Tournament Name
    ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/v4/en/tournaments/03433979-9bfc-401f-a6f1-a9f7878041dc/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", "/ncaamb/trial/v4/en/tournaments/03433979-9bfc-401f-a6f1-a9f7878041dc/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/ncaamb/trial/v4/en/tournaments/03433979-9bfc-401f-a6f1-a9f7878041dc/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Summary feed by replacing the parameters in the following URL: https://api.sportradar.us/ncaamb/`{access_level}`/`{version}`/`{language_code}`/tournaments/`{tournament_id}`/summary.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v4). | | `language_code` | 2 letter code for supported language: en (English). | | `tournament_id` | ID for a given tournament. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Tournaments Summary, use the following URL. https://feed.elasticstats.com/schema/basketball/tournament-v2.0.xsd Return to API map ## Push Feeds >To best utilize Push feeds, we have included code samples in Ruby, Java and Python which provide an example of a way you can consume the feeds. Using these samples will output the feeds content to STDOUT.
    For Java, we have also provided a Stream Client to assist your integration.

    Note: In the provided Java sample, replace "URL GOES HERE" with the desired Push feed URL. ```ruby require 'httpclient' module Sportradar module HTTP module Stream class Client attr_reader :url, :logger def initialize(url, publisher, logger) @url = url @logger = logger @publisher = publisher @client = ::HTTPClient.new(:agent_name => 'SportsData/1.0') end def start @thread ||= Thread.new do logger.debug "Starting loop" @client.get_content(url, :follow_redirect => true) do |chunk| @publisher.publish(::JSON.parse(chunk)) if @publisher end logger.debug "finished loop" end end def stop @thread.terminate if @thread end end end end end ``` ```java package com.sportradar.http.stream.client; import org.junit.After; import org.junit.Before; import org.junit.Test; public class StreamClientTest { private StreamClient client; private static String SERVICE_URL = ""; @Before public void setup() { client = new StreamClient(); } @After public void cleanup() { client.terminate(); } @Test public void testStream() throws Exception { Handler handler = new ConsoleHandler(); client.stream(SERVICE_URL, handler); System.out.println("Connecting...."); Thread.sleep(1 * 60 * 1000); System.out.println("Disconnecting...."); } } ``` Some of our APIs include Push feeds that allow you to get updates as soon as they are available. Push API feeds automatically send JSON payload to you via a push service, and can dramatically reduce the number of calls you need to make to our RESTful API feeds. The structure of the Push feeds are similar to the structure of the corresponding RESTful API feed (i.e. Push Events, and Push Statistics). The push service ensures reliable and efficient delivery of the most up to date information. Our Push services are based on a HTTP publish/subscribe model. When making a call to the Push APIs, you "subscribe" to various data feeds provided by our service; whenever new content is available on one of those feeds, the server pushes that information out to your client. When no new information is available on the feed, a heartbeat message is sent every 5 seconds to keep the connection active. If you want to filter the results of the feeds, there are several optional query string parameters that can be applied to the API call. If left unfiltered, than all data for the feed is displayed (i.e. all games, events, or statistics). For your applications to accept data from our Push feeds, ensure that your application can: * Can follow a HTTP redirect or use the location provided in the feeds header within one minute of your initial request. * Can accept HTTP data transfer encoded as chunked. Our Push service does not provide a "stateful session", there is no memory of what data has been sent previously. If you are disconnected from the Push session, you can use the RESTful API to catch up or recover from the disconnection. Syntax for using our Push feeds and examples of the JSON payloads can be found below. ## Push Events ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/stream/en/events/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 ``` ```python import requests import json r = requests.get("https://api.sportradar.com/ncaamb/trial/stream/en/events/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)) ``` ```shell curl -L GET 'api.sportradar.us/ncaamb/trial/stream/en/events/subscribe?api_key={your_api_key}' ``` >The above command returns json like this. This endpoint retrieves detailed, real-time information on every game event. https://api.sportradar.us/ncaamb/`{access_level}`/stream/`{language_code}`/events/subscribe?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 (production) or Trial (trial). | | `language_code` | Optional code for supported languages: en (English) or translations (Any other language translations. See optional query string parameters for locale.) | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters: ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/stream/en/events/subscribe?api_key={your_api_key}&status=inprogress&match=sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc") 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 requests import json r = requests.get("https://api.sportradar.com/ncaamb/trial/stream/en/events/subscribe", params = {'api_key': 'your_api_key', 'status': 'inprogress', 'match': 'sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc'}, 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)) ``` ```shell curl -L GET 'api.sportradar.us/ncaamb/trial/stream/en/events/subscribe?api_key={your_api_key}&status=inprogress&match=sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc' ``` In addition to the URL parameters listed above, you can filter the Events information with one or more of the following optional query string parameters.
    Note: 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.
    Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `event_category` | Event category expressed as: {event_category}.
    Example: event_category=shot | | `event_type` | Event type expressed as: {event_type}.
    Example: event_type=stoppage | | `locale` | Locale expressed as 2 letter code: locale={language_code}
    Example: locale:en | | `match` | Match id expressed as: sd:match:{match_id}.
    Example: sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc | | `status` | Status type expressed as: inprogress or created.
    Example: status=inprogress | | `team` | Team id expressed as: sd:team:{team_id}.
    Example: sd:team:2ed86226-3fff-4083-90fa-6b02307e6f73 | Return to API map ## Push Statistics ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/stream/en/statistics/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 ``` ```python import requests import json r = requests.get("https://api.sportradar.com/ncaamb/trial/stream/en/statistics/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)) ``` ```shell curl -L GET 'api.sportradar.us/ncaamb/trial/stream/en/statistics/subscribe?api_key={your_api_key}' ``` > The above command returns json like this. This endpoint retrieves detailed, real-time game stats at the team and player level for all live games. https://api.sportradar.us/ncaamb/`{access_level}`/stream/`{language_code}`/statistics/subscribe?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 (production) or Trial (trial). | | `language_code` | Optional code for supported languages: en (English) or translations (Any other language translations. See optional query string parameters for locale.) | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters: ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/ncaamb/trial/stream/en/statistics/subscribe?api_key={your_api_key}&status=inprogress&match=sd:match:71225e0b-8477-408b-a424-edeff07a81b4") 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 requests import json r = requests.get("https://api.sportradar.com/ncaamb/trial/stream/en/statistics/subscribe", params = {'api_key': 'your_api_key', 'status': 'inprogress', 'match': 'sd:match:71225e0b-8477-408b-a424-edeff07a81b4'}, 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)) ``` ```shell curl -L GET 'api.sportradar.us/ncaamb/trial/stream/en/statistics/subscribe?api_key={your_api_key}&status=inprogress&match=sd:match:71225e0b-8477-408b-a424-edeff07a81b4' ``` In addition to the URL parameters listed above, you can filter the Statistics information with one or more of the following optional query string parameters.
    Note: 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.
    Replace placeholders with the following query parameters: | Parameters | Description | | ---------- | ----------- | | `locale` | Locale expressed as 2 letter code: locale={language_code}
    Example: locale:en | | `match` | Match id expressed as: sd:match:{match_id}.
    Example: sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc | | `player` | Player id expressed as: sd:player:{player_id}.
    Example: sd:player:15b40697-5e19-4976-8dc6-d0f1778270fd | | `status` | Status type expressed as: inprogress or created.
    Example: status=inprogress | | `stats_type` | Stat type expressed as {stats_type}. Example: stats_type=player | | `team` | Team id expressed as: sd:team:{team_id}.
    Example: sd:team:2ed86226-3fff-4083-90fa-6b02307e6f73 | Return to API map ## Frequently Asked Questions

    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 game statuses can I expect to see in the feeds and what are their definitions?

    A: Here is a list of the valid game statuses you can expect to see, and their definitions.

    • scheduled - The game is scheduled to occur.
    • created – The game has been created and we have begun logging information.
    • inprogress – The game is in progress.
    • halftime - The game is currently at halftime.
    • complete – The game is over, but stat validation is not complete.
    • closed – The game is over and the stats have been validated.
    • cancelled – The game has been cancelled. No makeup game will be played as a result.
    • delayed – The start of the game is currently delayed or the game has gone from in progress to delayed for some reason.
    • postponed – The game has been postponed, to be made up at another day and time. Once the makeup game is announced, a new game and ID will be created and scheduled on the announced makeup date. You should request the scheduled feed(s) regularly to identify the re-scheduled makeup game(s).
    • time-tbd – The game has been scheduled, but a time has yet to be announced.
    • if-necessary – The game will be scheduled if it is required.
    • unnecessary – The series game was scheduled to occur, but will not take place due to one team clinching the series early.

    Q: Are on-court players available for play-by-play events?

    A: On-court player data is only available for selected full coverage games:

    • Selected Associated Press Top 25 regular season games
    • Selected conference tournament games
    • All March Madness games

    If “track_on_court” has a value of “true,” on-court player data will be available for that game.

    Q: Do full coverage games and extended boxscore games contain the same set of statistics?

    A: No. We do not support the following statistics for extended boxscore games:

    • Biggest Lead
    • Coach Technical Fouls
    • Fouls Drawn
    • Most Unanswered Points
    • Most Unanswered Points Own Score
    • Most Unanswered Points Opponent Score
    • Offensive Fouls
    • Points in the Paint Attempts
    • Points in the Paint Made
    • Points in the Paint Percentage
    • Team Technical Fouls

    Q: What are the Period Types I can expect to see in the feeds?

    A: Here is a list of the valid period types you can expect to see:

    • half
    • overtime
    • quarter

    Q: What are the player experience values I can expect to see in the feeds?

    A: Here is a list of the valid player experience values and their definitions:

    • FR – Freshman
    • SO – Sophomore
    • JR – Junior
    • SR – Senior
    • GR – Graduate Student

    Q: What player positions can I expect to see in the feeds?

    A: Here is a list of the valid player positions you can expect to see.

    • NA
    • C
    • C-F
    • F
    • F-C
    • F-G
    • G
    • G-F

    Q: What player primary positions can I expect to see in the feeds?

    A: Here is a list of the valid player primary positions you can expect to see.

    • NA
    • C
    • PF
    • PG
    • SF
    • SG

    Q: Are game statistics available for all teams during the regular season?

    A: Game statistics are available for all Division I teams, regardless of the coverage level on the game. However, game statistics will only be available for non-Division I teams if the game is covered via our full coverage offering.

    Q: Are seasonal statistics available for all teams during the regular season?

    A: Seasonal statistics are available for all Division I teams.

    Q: What player statuses can I expect to see in the feeds?

    A: Here is a list of the valid player statuses you can expect to see.

    • ACT – The player is on the team’s active roster
    • NWT – The player is no longer with the team
    • SUS – The player is suspended
    • DUP – Duplicate player profile

    Q: What are the valid season types?

    A: Here is a list of the valid season types and their definition:

    • reg – Regular season
    • ct – Conference tournaments
    • pst – Post-season

    Q: What post-season national tournaments do you cover?

    A: We will be covering the NCAA National Tournament (March Madness), the CBI, and the NIT. Here are the planned coverage levels for these tournaments:

    • March Madness – All games will be covered live via full coverage.
    • CBI – All games covered live, via Extended Boxscore coverage.
    • NIT – All games covered live, via Extended Boxscore coverage.
    • CIT – All games covered live, via Extended Boxscore coverage.

    Q: How are you covering the new experimental rules for the 2016-17 NIT (National Invitational Tournament)?

    A: When a team reaches the double bonus during a half, a "double bonus" attribute appears in the Play-By-Play, Game Summary, and Game Boxscore feeds with a value of "true." When the fouls reset at halftime or at the 10:00 mark of the half, the double bonus attribute is removed from these feeds. If a team reaches the double bonus again, the double bonus attribute will reappear with a value of true.

    During the 2016-17 NIT, the “bonus” attribute will not be used.

    Q: How do you plan to cover the conference tournaments games?

    A: All conference tournament games, available via a reliable broadcast, will be done via our full coverage offering.

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

    A: The court we use is 1128 by 600. The scale is in inches. Here is a layout of the court:

    0 X 1128
    Y
    600

    Q: Why does the team_basket attribution in the play-by-play feed not match the basket orientation (left vs. right) in the broadcast or game tracking that I'm viewing?

    A: Our team_basket attribution is set to match the orientation of the local television broadcast, which is on the opposite side of the scorer's table. The team_basket attribution may not match the orientation used by the particular broadcast or game tracker that you are viewing.

    If you want to provide a perspective from the scorer's table, you will have to map the coordinates so that the coordinates attributed to left side of the court are attributed to the right side of the court on your end (and vice versa).

    Q: What are the valid events types tracked in the play by play feed?

    A: Here is a list of the valid event types you can expect to see.

    • clearpathfoul - <charged_to> clear path foul (<drawn_by> draws the foul)
    • deadball - <given_to> rebound (deadball)
    • defensivethreeseconds - <charged_to> defensive 3 seconds violation
    • delay - <charged_to> delay of game violation
    • ejection - <given_to> ejected from the game
    • endperiod - End of <nth period/half>
    • flagrantone - <charged_to> flagrant 1 (<drawn_by> draws the foul)
    • flagranttwo - <charged_to> flagrant 2 (<drawn_by> draws the foul)
    • freethrowmade - <taken_by> makes <free_throw_type> free throw <attempt>
    • freethrowmiss - <taken_by> misses <free_throw_type> free throw <attempt> (<charged_to> lane_violation)
    • jumpball - Jump ball <reason>. <possessor> vs <challenger> (<possession> gains possession)
    • kickball - <charged_to> kicked ball violation
    • minortechnicalfoul - <player_name> technical foul
    • offensivefoul - <charged_to> offensive foul (<drawn_by> draws the foul)
    • officialtimeout - Official timeout
    • openinbound - Open inbound <team_name>
    • opentip - <home> vs <away> (<possession> gains possession)
    • personalfoul - <charged_to> personal foul (<drawn_by> draws the foul)
    • possession - <possession> gain possession
    • rebound - <given_to> <offensive/defensive> rebound
    • review - Play review (<reason>, <outcome>)
    • shootingfoul - <charged_to> shooting foul (<drawn_by> draws the foul)
    • teamtimeout - <team_name> <duration> second timeout
    • technicalfoul - <charged_to> technical foul (<foul_type_desc>)
    • threepointmade - <taken_by> makes three point <shot_type_desc> <shot_type> (<assisted_by> assists)
    • threepointmiss - <taken_by> misses three point <shot_type_desc> <shot_type>> or <blocked_by> blocks <taken_by> three point <shot_type_desc> <shot_type>
    • turnover - <charged_to> turnover (turnover_type_desc>)
    • tvtimeout - TV Timeout
    • twopointmade - <taken_by> makes two point <shot_type_desc> <shot_type> (<assisted_by> assists)
    • twopointmiss - <taken_by> misses two point <shot_type_desc> <shot_type> or <blocked_by> blocks <taken_by> two point <shot_type_desc> <shot_type>
    • warning

    Q: When will the NCAA Tournament schedule be available?

    A: The initial release of the NCAA Tournament schedule will be released within 2 hours of the completion of the Selection Sunday telecast. More information can be found here.

    Q: When are scores added to the schedule feeds?

    A: Final scores are added to the schedule feeds when the game status changes to completed.

    Q: What are the possible values for record type?

    A: Any conference alias can be used as a record type for win/loss records. In addition, we track the following record types:

    • Below 500 - Win/Loss record against teams with a winning percentage below .500
    • Conference - Win/Loss record against team’s own conference
    • Home - Win/Loss record for team’s home games
    • Last 10 - Win/Loss record in team’s last 10 games
    • Last 10 Home - Win/Loss record in team’s last 10 home games
    • Last 10 Away - Win/Loss record in team’s last 10 away games
    • Over 500 - Win/Loss record against teams with a winning percentage above .500
    • Overtime - Win/Loss record for overtime games
    • Road - Win/Loss record for team’s road games
    • Ten Points - Win/Loss record for games decided by 10 or less points
    • Three Points – Win/Loss record for games decided by 3 or less points
    • Top 25 - Win/Loss record against teams who were in Associated Press Top 25 when the game took place

    Q: What formulas are used to calculate efficiency and efficiency game score?

    A: Here are the formulas we use:

    Efficiency: (Points + Rebounds + Assists + Steals + Blocks − Missed Field Goal Attempts − Missed Free Throw Attempts - Turnovers)

    Efficiency Game Score: (Points) + (0.4*Field Goals Made) - (0.7*Field Goals Attempted) - (0.4*Free Throws Missed) + (0.7*Offensive Rebounds) + (0.3*Defensive Rebounds) + (Steals) + (0.7*Assists) + (0.7*Blocks) – (0.4*Personal Fouls) – (Turnovers)

    Note: For this team efficiency calculations, statistics attributed to the team rather than a player are not counted (i.e. team rebounds, team turnovers, team fouls, etc.).

    Q: How are home/away team designations determined for neutral-site games, and are those designations consistent across Sportradar products?

    A: In the NCAAMB API, there are no "official" home/away designations for neutral-site games. For neutral-site games, we set the neutral-site value to "true".

    As a result, this game will count towards Washington's and Colorado's neutral-site record and not their respective home and away records. In the NCAAMB API, we use the home/away team designations present when we initially ingest the schedules. We will not change the home/away designations after the schedule is initially published. This does not apply to games that have been changed from a neutral-site game to a traditional home/away game, we may change home/away team designations in these cases. Since other Sportradar products may publish schedules at different times and use different fixture management workflows, they may (for neutral-site games) display different home/away team designations.

    Q: What shot type descriptions can I expect to see in the feeds?

    A: Here is a list of the valid shot types with the descriptions you can expect to see for each shot type.

    Jump Shot (This is the only shot type for 3-point attempts)

    • bank
    • driving
    • driving bank
    • driving floating
    • driving floating bank
    • turnaround
    • turnaround bank
    • turnaround fadeaway
    • turnaround fadeaway bank
    • floating
    • fadeaway
    • fadeaway bank
    • stepback
    • stepback bank
    • pullup
    • pullup bank
    • running
    • running pullup

    Layup

    • alley-oop
    • cutting
    • cutting finger roll
    • driving
    • driving reverse
    • driving finger roll
    • finger roll
    • putback
    • reverse
    • running
    • running reverse
    • running finger roll
    • running alley-oop
    • tip

    Dunk

    • alley-oop
    • tip
    • driving
    • driving reverse
    • putback
    • running
    • reverse
    • running reverse
    • running alley-oop
    • cutting

    Tip Shot

    Hook

    • bank
    • driving
    • driving bank
    • turnaround
    • turnaround bank

    Q: How do you handle forfeit games?

    A: We mark a forfeit game with a status of closed. The final score is input as 2-0 in favor of the team not forfeiting.

    Return to top

    Docs Navigation