Global Baseball v2

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

Example:

>To find the probability of a home team win for a given game: >
  1. Call the Daily Schedule for the day the sport event takes place and find the Season Id for the chosen sport event
  2. Make note of the Sport Event Id for the given sport event
  3. Call the Season Probabilities using the Season Id
  4. Find Sport Event Id within the results locate the home team and the outcome probability
>The probability of a home team win is displayed. The primary feeds require only a date or human-readable parameters to call the endpoints. Those feeds provide Sport Event Ids, Competitor Ids, or Season Ids which can be used to generate the match, team, and tournament feeds. * - Available only with the probabilities plan within the Global Baseball v2 package. See FAQ for details. ## Competition Info Provides the name, id, and parent id for a given competition.
Update Frequency: As Necessary
Content Type: XML or JSON
Competition Info Data Points: Id Name Parent Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/competitions/sr:competition:657/info.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball/trial/v2/en/competitions/sr:competition:657/info.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball/trial/v2/en/competitions/sr:competition:657/info.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Competition Info feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/competitions/`{competition_id}`/info.`{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: v2). | | `language_code` | Supported Locales | | `competition_id` | Id of a given competition. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Competition Seasons Provides historical season information for a given competition. Valid competition IDs can be found in the Competitions feed.
Update Frequency: As Necessary
Content Type: XML or JSON
Competition Info Data Points: Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/competitions/sr:competition:109/seasons.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball/trial/v2/en/competitions/sr:competition:109/seasons.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball/trial/v2/en/competitions/sr:competition:109/seasons.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Competition Seasons feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/competitions/`{competition_id}`/seasons.`{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: v2). | | `language_code` | Supported Locales | | `competition_id` | Id of a given competition. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Competitions Provides a list of all available baseball competitions.
Update Frequency: As Necessary
Content Type: XML or JSON
Competition Info Data Points: Id Name Parent Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/competitions.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", "/baseball/trial/v2/en/competitions.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/baseball/trial/v2/en/competitions.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Competitions feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/competitions.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Competitor Mappings Provides team id mapping between the Global Baseball API and the MLB API.
Update Frequency: As Necessary
Content Type: XML or JSON
Mapping Info Data Points: External Id Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/competitors/mappings.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", "/baseball/trial/v2/en/competitors/mappings.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/baseball/trial/v2/en/competitors/mappings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Competitor Mappings feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/competitors/mappings.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("http://api.sportradar.us/baseball/trial/v2/en/competitors/mappings.xml?api_key={your_api_key}&start=0&limit=75")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.sportradar.us")

conn.request("GET", "/baseball/trial/v2/en/competitors/mappings.xml?api_key={your_api_key}&start=0&limit=75")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl -L GET 'api.sportradar.us/baseball/trial/v2/en/competitors/mappings.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the response with one or more of the following optional query string parameters. By default the limit is set to 1000.
Note: Optional query string parameters must be added after your API key with an ampersand (&).
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 1000.
Example: limit=75 | Return to API map ## Competitor Profile Provides top-level information for a given team, including the full team roster, manager, home venue, and team colors.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competitor Info Data Points: Competitor Abbreviation
Competitor Country
Competitor Country Code
Competitor Id
Competitor Name
Jersey Base Color
Jersey Horizontal Stripes
Jersey Number Color
Jersey Shirt Type
Jersey Sleeve Color
Jersey Sleeve Detail
Jersey Split
Jersey Squares
Jersey Stripes
Jersey Type
Manager Country Code
Manager Date of Birth
Manager Gender
Manager Id
Manager Name
Manager Nationality
Player Info Data Points: Country Code
Date of Birth
Gender
Height
Id
Jersey Number
Nationality
Name
Position
Weight
Venue Info Data Points: Capacity
City
Country Code
Country Name
Id
Map Coordinates
Name
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/competitors/sr:competitor:3637/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", "/baseball/trial/v2/en/competitors/sr:competitor:3637/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/baseball/trial/v2/en/competitors/sr:competitor:3637/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Competitor Profile feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/competitors/`{competitor_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: v2). | | `language_code` | Supported Locales | | `competitor_id` | Id of a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Competitor Summaries Provides previous and upcoming game information for a given team, including statistics for past games and scheduling info for upcoming games.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/competitors/sr:competitor:419265/summaries.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", "/baseball/trial/v2/en/competitors/sr:competitor:419265/summaries.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/baseball/trial/v2/en/competitors/sr:competitor:419265/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Competitor Summaries feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/competitors/`{competitor_id}`/summaries.`{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: v2). | | `language_code` | Supported Locales | | `competitor_id` | ID for a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Competitor vs Competitor Provides previous and upcoming matches between two teams, including scoring information.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/competitors/sr:competitor:419265/versus/sr:competitor:419263/summaries.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", "/baseball/trial/v2/en/competitors/sr:competitor:419265/versus/sr:competitor:419263/summaries.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/baseball/trial/v2/en/competitors/sr:competitor:419265/versus/sr:competitor:419263/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Competitor vs Competitor feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/competitors/`{competitor_id}`/versus/`{competitor2_id}`/summaries.`{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: v2). | | `language_code` | Supported Locales | | `competitor_id` | ID for a given competitor. | | `competitor2_id` | ID for a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Daily Summaries Provides game information for a given day, including scoring information.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/schedules/2019-04-24/summaries.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", "/baseball/trial/v2/en/schedules/2019-04-24/summaries.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/baseball/trial/v2/en/schedules/2019-04-24/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Daily Summaries feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/schedules/`{year}`-`{month}`-`{day}`/summaries.`{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: v2). | | `language_code` | Supported Locales | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day in 2 digit format (DD). | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("http://api.sportradar.us/baseball/trial/v2/en/schedules/2019-04-24/summaries.xml?api_key={your_api_key}&start=0&limit=75")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.sportradar.us")

conn.request("GET", "/baseball/trial/v2/en/schedules/2019-04-24/summaries.xml?api_key={your_api_key}&start=0&limit=75")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl -L GET 'api.sportradar.us/baseball/trial/v2/en/schedules/2019-04-24/summaries.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the response with one or more of the following optional query string parameters. By default the limit is set to 200.
Note: Optional query string parameters must be added after your API key with an ampersand (&).
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, suggested maximum value is 75.
Example: limit=75 | Return to API map ## Live Summaries Provides game information for all currently live games, including team scoring. This feed updates in real time as games are played.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/schedules/live/summaries.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", "/baseball/trial/v2/en/schedules/live/summaries.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/baseball/trial/v2/en/schedules/live/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Live Summaries feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/competitors/`{competitor_id}`/summaries.`{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: v2). | | `language_code` | Supported Locales | | `competitor_id` | ID for a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Live Timelines Provides a play-by-play event timeline for currently live games.
Update Frequency: As Necessary
Content Type: XML or JSON
Match Info Data Points: Period Score Away Score
Period Score Home Score
Period Score Number
Period Score Type
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
Sport Event Timeline Id
Sport Event Timeline Start Time
Timeline Info Data Points: Away Score
Break Name
Competitor
Home Score
Id
Period
Period Name
Time
Type
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/schedules/live/timelines.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", "/baseball/trial/v2/en/schedules/live/timelines.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/baseball/trial/v2/en/schedules/live/timelines.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Live Timelines feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/schedules/live/timelines.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Match Timeline use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/baseball/match_timeline.xsd Return to API map ## Live Timelines Delta Provides a 10 second live delta of game information, including scoring and a play-by-play event timeline.
Update Frequency: As Necessary
Content Type: XML or JSON
Match Info Data Points: Period Score Away Score
Period Score Home Score
Period Score Number
Period Score Type
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
Sport Event Timeline Id
Sport Event Timeline Start Time
Timeline Info Data Points: Away Score
Break Name
Competitor
Home Score
Id
Period
Period Name
Time
Type
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/schedules/live/timelines_delta.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", "/baseball/trial/v2/en/schedules/live/timelines_delta.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/baseball/trial/v2/en/schedules/live/timelines_delta.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Live Timelines Delta feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/schedules/live/timelines_delta.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Player Mappings Provides player id mapping between the Global Baseball API and the MLB API.
Update Frequency: As Necessary
Content Type: XML or JSON
Mapping Info Data Points: External Id Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/players/mappings.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", "/baseball/trial/v2/en/players/mappings.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/baseball/trial/v2/en/players/mappings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Player Mappings feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/players/mappings.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("http://api.sportradar.us/baseball/trial/v2/en/players/mappings.xml?api_key={your_api_key}&start=0&limit=75")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.sportradar.us")

conn.request("GET", "/baseball/trial/v2/en/players/mappings.xml?api_key={your_api_key}&start=0&limit=75")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl -L GET 'api.sportradar.us/baseball/trial/v2/en/players/mappings.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the response with one or more of the following optional query string parameters. By default the limit is set to 1000.
Note: Optional query string parameters must be added after your API key with an ampersand (&).
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 1000.
Example: limit=75 | Return to API map ## Player Merge Mappings Provides valid ids for players who have had their profiles merged. While Sportradar always strives to provide one unique player id, it is a possibility for two ids to be created. This feed provides the correct id once profiles have been merged.
Update Frequency: As Necessary
Content Type: XML or JSON
Mapping Info Data Points: Merged Id Name Retained Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/players/merge_mappings.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", "/baseball/trial/v2/en/players/merge_mappings.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/baseball/trial/v2/en/players/merge_mappings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Player Merge Mappings feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/players/merge_mappings.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("http://api.sportradar.us/baseball/trial/v2/en/players/merge_mappings.xml?api_key={your_api_key}&start=0&limit=75")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.sportradar.us")

conn.request("GET", "/baseball/trial/v2/en/players/merge_mappings.xml?api_key={your_api_key}&start=0&limit=75")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl -L GET 'api.sportradar.us/baseball/trial/v2/en/players/merge_mappings.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the response with one or more of the following optional query string parameters. By default the limit is set to 1000.
Note: Optional query string parameters must be added after your API key with an ampersand (&).
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 1000.
Example: limit=75 | Return to API map ## Player Profile Provides player biographical information, including current team.
Update Frequency: As Necessary
Content Type: XML or JSON
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Player Info Data Points: Active
Country Code
Date Of Birth
End Date
Gender
Height
Id
Jersey Number
Nationality
Name
Position
Role Type / Position
Start Date
Weight
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/players/sr:player:841933/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", "/baseball/trial/v2/en/players/sr:player:841933/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/baseball/trial/v2/en/players/sr:player:841933/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.com/baseball/`{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: v2). | | `language_code` | Supported Locales | | `player_id` | ID of a given player. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Player Summaries Provides game info and results for the past 10 games in which a given player participated.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/players/sr:player:841933/summaries.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", "/baseball/trial/v2/en/players/sr:player:841933/summaries.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/baseball/trial/v2/en/players/sr:player:841933/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Player Summaries feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/players/`{player_id}`/summaries.`{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: v2). | | `language_code` | Supported Locales | | `player_id` | ID of a given player. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Competitors Provides a list of teams participating for a given season.
Update Frequency: As Necessary
Content Type: XML or JSON
Competitor Info Data Points: Abbreviation
Id
Name Short Name
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/competitors.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", "/baseball/trial/v2/en/seasons/sr:season:61503/competitors.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/baseball/trial/v2/en/seasons/sr:season:61503/competitors.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Competitors feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/competitors.`{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: v2). | | `language_code` | Supported Locales | | `season_id` | ID of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Info Provides detailed information for a given season, including participating teams and league structure.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Group - Group Name
Group Id
Group Max Rounds
Group Name
Info Competition Status
Info Venue Reduced Capacity
Info Venue Reduced Capacity Max
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/info.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball/trial/v2/en/seasons/sr:season:61503/info.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/info.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Info feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/info.`{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: v2). | | `language_code` | Supported Locales | | `season_id` | ID of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Links Provides information about linked cup rounds for a given season. This feed can be used to compile playoff brackets for relevant seasons.
Update Frequency: As Necessary
Content Type: XML or JSON
Competition Info Data Points: Cup Round Id
Cup Round Name
Cup Round Type
Group - Group Name
Group Id
Stage End Date
Stage Phase
Stage Start Date
Stage Type
Stage Year
Match Info Data Points: Sport Event Id Start Time Start Time Confirmed
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/stages_groups_cup_rounds.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", "/baseball/trial/v2/en/seasons/sr:season:61503/stages_groups_cup_rounds.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/baseball/trial/v2/en/seasons/sr:season:61503/stages_groups_cup_rounds.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Links feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/stages_groups_cup_rounds.`{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: v2). | | `language_code` | Supported Locales | | `season_id` | ID of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Mappings Provides season id mapping between the Global Baseball API and the MLB API.
Update Frequency: As Necessary
Content Type: XML or JSON
Mapping Info Data Points: External Id Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/seasons/mappings.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", "/baseball/trial/v2/en/seasons/mappings.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/baseball/trial/v2/en/seasons/mappings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Mappings feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/seasons/mappings.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("http://api.sportradar.us/baseball/trial/v2/en/seasons/mappings.xml?api_key={your_api_key}&start=0&limit=75")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.sportradar.us")

conn.request("GET", "/baseball/trial/v2/en/seasons/mappings.xml?api_key={your_api_key}&start=0&limit=75")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl -L GET 'api.sportradar.us/baseball/trial/v2/en/seasons/mappings.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the response with one or more of the following optional query string parameters. By default the limit is set to 1000.
Note: Optional query string parameters must be added after your API key with an ampersand (&).
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 1000.
Example: limit=75 | Return to API map ## Season Players Provides names and ids for all participating players for a given season.
Update Frequency: As Necessary
Content Type: XML or JSON
Player Info Data Points: Display First Name
Display Last Name
First Name
Id
Last Name
Name
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/players.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", "/baseball/trial/v2/en/seasons/sr:season:61503/players.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/baseball/trial/v2/en/seasons/sr:season:61503/players.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Players feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/players.`{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: v2). | | `language_code` | Supported Locales | | `season_id` | ID of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Probabilities Provides 2-way win probabilities (home team win, away team win) for all games for a given season.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Probability Info Data Points: Away Team Win Probability
Home Team Win Probability
Market Name Outcome Name
Match Info Data Points: Competitor Qualifier
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/probabilities.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball/trial/v2/en/seasons/sr:season:61503/probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Probabilities feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/probabilities.`{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: v2). | | `language_code` | Supported Locales | | `season_id` | Id of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Standings Provides detailed standings info for a given season.
Update Frequency: As Necessary
Content Type: XML or JSON
Competition Info Data Points: Group - Group Name
Group Live
Group Id
Group Name
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Standings Info Data Points: Current Outcome
Draw
Games Behind
Group - Group Name
Group Id
Group Live
Group Name
Losses
Played
Points
Runs Against
Runs Difference
Runs For
Rank
Season Standings Tie Break Rule
Season Standings Type Winning Percentage
Wins
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/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", "/baseball/trial/v2/en/seasons/sr:season:61503/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/baseball/trial/v2/en/seasons/sr:season:61503/standings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Standings feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/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: v2). | | `language_code` | Supported Locales | | `season_id` | ID of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Summaries Provides schedule information and scoring for all matches from a given season.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/summaries.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", "/baseball/trial/v2/en/seasons/sr:season:61503/summaries.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/baseball/trial/v2/en/seasons/sr:season:61503/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Summaries feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/summaries.`{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: v2). | | `language_code` | Supported Locales | | `season_id` | ID of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("http://api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/summaries.xml?api_key={your_api_key}&start=0&limit=75")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.sportradar.us")

conn.request("GET", "/baseball/trial/v2/en/seasons/sr:season:61503/summaries.xml?api_key={your_api_key}&start=0&limit=75")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl -L GET 'api.sportradar.us/baseball/trial/v2/en/seasons/sr:season:61503/summaries.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the response 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 (&).
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, suggested maximum value is 75.
Example: limit=75 | Return to API map ## Seasons Provides a complete list of historical season information for all supported competitions in the API.
Update Frequency: As Necessary
Content Type: XML or JSON
Competition Info Data Points: Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/seasons.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball/trial/v2/en/seasons.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball/trial/v2/en/seasons.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Seasons feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/seasons.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Sport Event Mappings Provides game id mapping between the Global Baseball API and the MLB API.
Update Frequency: As Necessary
Content Type: XML or JSON
Mapping Info Data Points: External Id Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/sport_events/mappings.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", "/baseball/trial/v2/en/sport_events/mappings.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/baseball/trial/v2/en/sport_events/mappings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Mappings feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/sport_events/mappings.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("http://api.sportradar.us/baseball/trial/v2/en/sport_events/mappings.xml?api_key={your_api_key}&start=0&limit=75")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.sportradar.us")

conn.request("GET", "/baseball/trial/v2/en/sport_events/mappings.xml?api_key={your_api_key}&start=0&limit=75")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl -L GET 'api.sportradar.us/baseball/trial/v2/en/sport_events/mappings.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the response with one or more of the following optional query string parameters. By default the limit is set to 1000.
Note: Optional query string parameters must be added after your API key with an ampersand (&).
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 1000.
Example: limit=75 | Return to API map ## Sport Event Summary Provides real-time scoring for a given game. Please note that data returned is determined by coverage level.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/sport_events/sr:sport_event:17433095/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", "/baseball/trial/v2/en/sport_events/sr:sport_event:17433095/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/baseball/trial/v2/en/sport_events/sr:sport_event:17433095/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Event Summary feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{match_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: v2). | | `language_code` | Supported Locales | | `match_id` | ID of a given match. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Sport Event Timeline Provides real-time scoring and a play-by-play event timeline for a given game. Please note that data returned is determined by coverage level.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
Timeline Info Data Points: Away Score
Break Name
Competitor
Home Score
Id
Period
Period Name
Time
Type
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/sport_events/sr:sport_event:17433095/timeline.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball/trial/v2/en/sport_events/sr:sport_event:17433095/timeline.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball/trial/v2/en/sport_events/sr:sport_event:17433095/timeline.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Event Timeline feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{sport_event_id}`/timeline.`{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: v2). | | `language_code` | Supported Locales | | `sport_event_id` | ID of a given sport event. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Sport Events Removed Provides ids for sport events that have been removed or deleted.
Update Frequency: As Necessary
Content Type: XML or JSON
Match Info Data Points: Sport Event Removed Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/sport_events/removed.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", "/baseball/trial/v2/en/sport_events/removed.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/baseball/trial/v2/en/sport_events/removed.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Events Removed feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/sport_events/removed.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Sport Events Updated Provides ids for sport events that have been updated in the last 24 hours.
Update Frequency: As Necessary
Content Type: XML or JSON
Match Info Data Points: Id Updated At
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball/trial/v2/en/sport_events/updated.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", "/baseball/trial/v2/en/sport_events/updated.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/baseball/trial/v2/en/sport_events/updated.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Events Updated feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball/`{access_level}`/`{version}`/`{language_code}`/sport_events/updated.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("http://api.sportradar.us/baseball/trial/v2/en/sport_events/updated.xml?api_key={your_api_key}&start=0&limit=75")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("api.sportradar.us")

conn.request("GET", "/baseball/trial/v2/en/sport_events/updated.xml?api_key={your_api_key}&start=0&limit=75")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl -L GET 'api.sportradar.us/baseball/trial/v2/en/sport_events/updated.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the response with one or more of the following optional query string parameters. By default the limit is set to 1000.
Note: Optional query string parameters must be added after your API key with an ampersand (&).
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `start` | Number to start the list of results from.
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 1000.
Example: limit=75 | Return to API map ## Probabilities Feeds This collection of probability feeds is available for licensing as an add-on feature. They are an extension of the Season Probabilities feed in the main package which provides pre-match probabilities for the sport event winner market.
For media use only: Use of this API is prohibited for betting clients.
The main features of the Probabilities extension (where coverage applies) are:
  • Live Probabilities that update throughout game
  • Season Outright Probabilities for the Tournament Winner market
  • Live Probabilities Coverage indicator for the next 24 hours
For more information or to request a Trial of this feature, please contact a Sportradar Sales representative. The Open API specification and Syntax for using our Probabilities feeds, including examples of the payloads can be found below. ## Live Probabilities Provides top-level information for live games. If probabilities are available for a game, pre-match and live probabilities will be displayed.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Probability Info Data Points: Away Team Win Probability
Home Team Win Probability
Market Away Score
Market Home Score
Market Last Updated
Market Live
Market Name
Market Removed
Outcome Name
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball-probabilities/trial/v2/en/schedules/live/probabilities.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball-probabilities/trial/v2/en/schedules/live/probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball-probabilities/trial/v2/en/schedules/live/probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Live Probabilities feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball-probabilities/`{access_level}`/`{version}`/`{language_code}`/schedules/live/probabilities.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Outright Probabilities Provides a list of outright probabilities for each team from a given season.
Update Frequency: As Necessary
Content Type: XML or JSON
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Probability Info Data Points: Win Probability Market Name Outcome Name
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball-probabilities/trial/v2/en/seasons/sr:season:79507/outright_probabilities.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball-probabilities/trial/v2/en/seasons/sr:season:79507/outright_probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball-probabilities/trial/v2/en/seasons/sr:season:79507/outright_probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Season Outright Probabilities feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball-probabilities/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/outright_probabilities.`{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: v2). | | `language_code` | Supported Locales | | `season_id` | Id of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Sport Event Probabilities Provides pre-match and live probabilities for a given match.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Probability Info Data Points: Away Team Win Probability
Home Team Win Probability
Market Away Score
Market Home Score
Market Last Updated
Market Live
Market Name
Market Removed
Outcome Name
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball-probabilities/trial/v2/en/sport_events/sr:sport_event:24142067/sport_event_probabilities.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball-probabilities/trial/v2/en/sport_events/sr:sport_event:24142067/sport_event_probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball-probabilities/trial/v2/en/sport_events/sr:sport_event:24142067/sport_event_probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Event Probabilities feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball-probabilities/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{sport_event_id}`/probabilities.`{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: v2). | | `language_code` | Supported Locales | | `sport_event_id` | Id of a given sport event. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Sport Event Upcoming Probabilities Provides a list of IDs for upcoming sport events in the next 24 hours.
Update Frequency: As Necessary
Content Type: XML or JSON
Match Info Data Points: Sport Event Upcoming Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball-probabilities/trial/v2/en/sport_events/upcoming_probabilities.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball-probabilities/trial/v2/en/sport_events/upcoming_probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball-probabilities/trial/v2/en/sport_events/upcoming_probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Event Upcoming Probabilities feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball-probabilities/`{access_level}`/`{version}`/`{language_code}`/sport_events/upcoming_probabilities.`{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: v2). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Timeline Probabilities Provides a timeline of pre-match and live probability changes for a given game.
Update Frequency: As Necessary
Content Type: XML or JSON
Category & Sport Info Data Points: Category Country Code
Category Id
Category Name
Sport Id
Sport Name
Competition Info Data Points: Competition Id
Competition Name
Competition Parent Id
Coverage Live
Group - Group Name
Group Id
Group Name
Round Number
Season Competition Id
Season End Date
Season Id
Season Name
Season Start Date
Season Year
Stage End Date
Stage Order
Stage Phase
Stage Start Date
Stage Type
Stage Year
Competitor Info Data Points: Abbreviation
Country
Country Code
Id
Name
Venue Info Data Points: Capacity
Changed
City
Country Code
Country Name
Id
Map Coordinates
Name
Reduced Capacity
Reduced Capacity Max
Probability Info Data Points: Away Team Win Probability
Home Team Win Probability
Market Away Score
Market Home Score
Market Last Updated
Market Live
Market Name
Market Removed
Outcome Name
Match Info Data Points: Away Score
Competitor Qualifier
Home Score
Period Number
Period Type
Sport Event Id
Sport Event Replaced By
Sport Event Resumed Time
Sport Event Start Time
Sport Event Start Time Confirmed
Sport Event Status
Sport Event Status Away Normaltime Score
Sport Event Status Away Score
Sport Event Status Decided Inning
Sport Event Status Home Normaltime Score
Sport Event Status Home Score
Sport Event Status Match Status
Sport Event Status Scout Abandoned
Sport Event Status Winner Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/baseball-probabilities/trial/v2/en/sport_events/sr:sport_event:24142067/timeline_probabilities.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/baseball-probabilities/trial/v2/en/sport_events/sr:sport_event:24142067/timeline_probabilities.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/baseball-probabilities/trial/v2/en/sport_events/sr:sport_event:24142067/timeline_probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Timeline Probabilities feed by replacing the parameters in the following URL: https://api.sportradar.com/baseball-probabilities/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{sport_event_id}`/timeline_probabilities.`{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: v2). | | `language_code` | Supported Locales | | `sport_event_id` | Id of a given sport event. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Frequently Asked Questions

Q: What leagues or competitions do you cover for Global Baseball v2?

A: A list of the competitions covered in this API can be found below. Note that this list is subject to change at any time. For the most accurate list of competitions, please see the Competitions endpoint in the API.

  • MLB
  • 1st Bundesliga
  • ABL
  • Appalachian League
  • Arizona Fall League
  • Arizona League
  • California League
  • Carolina League
  • Chinese Professional Baseball
  • Dominican Summer League
  • Eastern League
  • Florida State League
  • Gulf Coast League
  • International League
  • Italian Baseball League
  • KBO League
  • Mexican League
  • Midwest League
  • MLB All Star Game
  • MLB Spring Training
  • New York-Penn League
  • Nippon Professional Baseball
  • Northwest League
  • Northwoods League
  • Pacific Coast League
  • Pioneer League
  • Professional Baseball
  • South Atlantic League
  • Southern League
  • Texas League
  • World Baseball Classic

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: How can I find the values for various enum data points within the API?

A: Many enum values are listed in the FAQ below. For the most up-to-date values, please see the Schema section of the OpenAPI specification here: https://api.sportradar.com/baseball/trial/v2/openapi/swagger/index.html

Q: What are the valid sport_event_status - status values?

A: Here are the valid sport_event_status values and their definitions:

  • not_started – The match is scheduled to be played
  • match_about_to_start – The match is about to begin
  • started – The match has started
  • live – The match is currently in progress
  • postponed – The match has been postponed to a future date
  • suspended - The match began, but has been suspended to a later time
  • delayed – The match has been temporarily delayed and will be continued
  • cancelled – The match has been cancelled and will not be played
  • interrupted - The match began, but coverage has stopped for a short time. Note that match scores may not be updated during this period, the last recorded match score will be displayed instead
  • ended – The match is over
  • closed – The match results have been confirmed

Q: What are the valid sport_event_status – match_status values?

A: Here are the valid match_status values:

  • not_started
  • start_delayed
  • aet
  • interrupted
  • ended
  • postponed
  • started
  • abandoned
  • cancelled
  • overtime
  • 1st_inning
  • 2nd_inning
  • 3rd_inning
  • 4th_inning
  • 5th_inning
  • 6th_inning
  • 7th_inning
  • 8th_inning
  • 9th_inning
  • pause

Q: What are the possible event types logged?

A: Here are the valid event type:

  • match_started
  • period_start
  • score_change
  • period_score
  • break_start
  • match_ended

Q: How do I access past seasons results and stats?

A: Use the Competition Seasons endpoint to locate the season_id for the season you want to access. Use that season_id to interrogate the various seasons endpoints.

Q: What are the valid outcomes for probabilities?

A: Here are the valid outcome probabilities:

  • home_team_winner
  • away_team_winner

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

A: Find the node called "coverage" in any of the Summary, Lineups, or Timeline feeds. The attribute "coverage - live" reports if Sportradar has live coverage of the match or not.

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

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

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

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

Q: How are group IDs delivered in the stage array with the various types?

A: With the type of "league" they will have a sr:league prefix. With the type of "cup" they will have a sr:cup prefix.

Q: How are “live” feeds handled in the API?

A: Sport Events appear in the feed 10 minutes before the scheduled start time and are removed 10 minutes after the Sport Event is ended.

Q: What is the probabilities package?

A: The probabilities package is an add-on set of feeds that are an extension of the Season Probabilities feed in the main package (which already provides pre-match probabilities for the sport event winner market). The main features of the Probabilities extension are: Live Probabilities that update throughout game, Season Outright Probabilities for the Tournament Winner market, and Live Probabilities Coverage indicator for the next 24 hours.

Q: Is there Live Probability coverage for every game you cover in the Global Baseball API?

A: Live Probability coverage depends on a number of factors and we can’t guarantee that every game will be covered for any given league, however, Sportradar aims to cover close to 100% of games from the following Tier 1 leagues: Major League Baseball (MLB) – USA, Nippon Professional Baseball (NPB) – Japan, and KBO League – South Korea

Q: Can I utilize the Probabilities extension if I license the Sportradar MLB API?

A: If you have a license for our MLB API you can also integrate Live Probabilities by utilizing the ID Mapping feeds available in Global Baseball v2 to connect games between the two products.

Q: Why can't I find a particular match in the Daily Summaries, Season Summaries or Sport Events Updated feeds?

A: These endpoints support pagination and return 200 entries by default. To return more matches, an additional query string parameter must be used after your API key. For example, appending &start=200 will return the next 200 entries per page, &start=400 will return the next 200, and so on.

Return to top

Docs Navigation