MLB Insights v2

Frequently Asked Questions ## MLB Insights API Overview Sportradar’s MLB Insights product delivers data points and text outputs specifically tailored to create additional context around a game. We provide player highs, milestones, leaderboards, predictions, player and team betting trends, and more. These insights help drive tune-in, facilitate the placement of real money bets, and empower deeper sports stories. Sportradar Insights can be accessed via our radar360 user interface or directly from the API. For trial access to this product, feel free to reach out to our sales team.
API API Version Postman Collection
MLB Insights v2
Note: Authentication is required for all API calls.

Authorization must be passed within the header of all calls to the API as:
Authorization: {your_auth_token}
## Expert Picks Retrieve expert picks for upcoming MLB games. **Example:** SD @ PHI: 100% of analysts predict the Phillies to win. ```ruby require "uri" require "net/http" url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/expert_picks/team/sr:competitor:3422") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = "{your_auth_token}" response = https.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.radar360.sportradar.com") payload = '' headers = { 'Authorization': '{your_auth_token}' } conn.request("GET", "/insights/v2/mlb/en/expert_picks/team/sr:competitor:3422", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/expert_picks/team/sr:competitor:3422' \ --header 'Authorization: {your_auth_token}' ``` **Syntax:** https://api.radar360.sportradar.com/insights/`{version}`/mlb/`{language}`/expert_picks/`{subject}`/`{subjectId}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `version` | Version number of the API you are accessing

Current Version: `v2` | | `language` | 2 letter code for supported languages

`en` (English)
| | `subject` | Subject type for insights

`game`, `team`, or `player` | | `subjectId` | Unique subject Id, matching the subject type. Accepts `subjectUsId` or `subjectSRId`

Samples:
`game` = `f16231a5-bcbd-4e4f-a18c-046829f0a638` or `sr:match:45785631`

`team` = `sr:competitor:3641` or `43a39081-52b4-4f93-ad29-da7f329ea960`

`player` = `sr:player:1399987` or `e750ccd5-7a24-44ef-b661-0d41baa17d1c` | ### Pagination >Example including pagatinated query string parameter:
require "uri"
require "net/http"

url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/expert_picks/team/sr:competitor:3422?pageToken={token}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "{your_auth_token}"

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

conn = http.client.HTTPSConnection("api.radar360.sportradar.com")
payload = ''
headers = {
  'Authorization': '{your_auth_token}'
}
conn.request("GET", "/insights/v2/mlb/en/expert_picks/team/sr:competitor:3422?pageToken={token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/expert_picks/team/sr:competitor:3422?pageToken={token}' \
--header 'Authorization: {your_auth_token}'
All Insights endpoints display 50 results by default.

Requests with more than 50 results will include a `pageToken` at the end of the file. Input this token within a query parameter on your next request to access further results. | Parameter | Description | | --------- | ----------- | | `pageToken` | Unique token to paginate additional results | Return to top ## Highs Retrieve noteworthy MLB statistical highs. **Example:** Shane Bieber has set his season high with 31 batters faced. His previous season high was 29 batters faced. ```ruby require "uri" require "net/http" url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/highs/team/sr:competitor:3422") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = "{your_auth_token}" response = https.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.radar360.sportradar.com") payload = '' headers = { 'Authorization': '{your_auth_token}' } conn.request("GET", "/insights/v2/mlb/en/highs/team/sr:competitor:3422", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/highs/team/sr:competitor:3422' \ --header 'Authorization: {your_auth_token}' ``` **Syntax:** https://api.radar360.sportradar.com/insights/`{version}`/mlb/`{language}`/highs/`{subject}`/`{subjectId}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `version` | Version number of the API you are accessing

Current Version: `v2` | | `language` | 2 letter code for supported languages

`en` (English)
| | `subject` | Subject type for insights

`game`, `team`, or `player` | | `subjectId` | Unique subject Id, matching the subject type. Accepts `subjectUsId` or `subjectSRId`

Samples:
`game` = `f16231a5-bcbd-4e4f-a18c-046829f0a638` or `sr:match:45785631`

`team` = `sr:competitor:3641` or `43a39081-52b4-4f93-ad29-da7f329ea960`

`player` = `sr:player:1399987` or `e750ccd5-7a24-44ef-b661-0d41baa17d1c` | ### Pagination >Example including pagatinated query string parameter:
require "uri"
require "net/http"

url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/highs/team/sr:competitor:3422?pageToken={token}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "{your_auth_token}"

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

conn = http.client.HTTPSConnection("api.radar360.sportradar.com")
payload = ''
headers = {
  'Authorization': '{your_auth_token}'
}
conn.request("GET", "/insights/v2/mlb/en/highs/team/sr:competitor:3422?pageToken={token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/highs/team/sr:competitor:3422?pageToken={token}' \
--header 'Authorization: {your_auth_token}'
All Insights endpoints display 50 results by default.

Requests with more than 50 results will include a `pageToken` at the end of the file. Input this token within a query parameter on your next request to access further results. | Parameter | Description | | --------- | ----------- | | `pageToken` | Unique token to paginate additional results | Return to top ## Leaderboards Retrieve leaderboard stat updates and corresponding statistics. **Example:** German Marquez is 2 pitcher strikeouts away from tying Jorge De La Rosa for 1st on the Rockies all-time list. ```ruby require "uri" require "net/http" url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/leaderboards/team/sr:competitor:3422") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = "{your_auth_token}" response = https.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.radar360.sportradar.com") payload = '' headers = { 'Authorization': '{your_auth_token}' } conn.request("GET", "/insights/v2/mlb/en/leaderboards/team/sr:competitor:3422", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/leaderboards/team/sr:competitor:3422' \ --header 'Authorization: {your_auth_token}' ``` **Syntax:** https://api.radar360.sportradar.com/insights/`{version}`/mlb/`{language}`/leaderboards/`{subject}`/`{subjectId}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `version` | Version number of the API you are accessing

Current Version: `v2` | | `language` | 2 letter code for supported languages

`en` (English)
| | `subject` | Subject type for insights

`game`, `team`, or `player` | | `subjectId` | Unique subject Id, matching the subject type. Accepts `subjectUsId` or `subjectSRId`

Samples:
`game` = `f16231a5-bcbd-4e4f-a18c-046829f0a638` or `sr:match:45785631`

`team` = `sr:competitor:3641` or `43a39081-52b4-4f93-ad29-da7f329ea960`

`player` = `sr:player:1399987` or `e750ccd5-7a24-44ef-b661-0d41baa17d1c` | ### Pagination >Example including pagatinated query string parameter:
require "uri"
require "net/http"

url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/leaderboards/team/sr:competitor:3422?pageToken={token}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "{your_auth_token}"

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

conn = http.client.HTTPSConnection("api.radar360.sportradar.com")
payload = ''
headers = {
  'Authorization': '{your_auth_token}'
}
conn.request("GET", "/insights/v2/mlb/en/leaderboards/team/sr:competitor:3422?pageToken={token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/leaderboards/team/sr:competitor:3422?pageToken={token}' \
--header 'Authorization: {your_auth_token}'
All Insights endpoints display 50 results by default.

Requests with more than 50 results will include a `pageToken` at the end of the file. Input this token within a query parameter on your next request to access further results. | Parameter | Description | | --------- | ----------- | | `pageToken` | Unique token to paginate additional results | Return to top ## Lineup Changes Retrieve important MLB lineup changes and corresponding insights. **Example:** Bradley Beal is out today vs. Memphis Grizzlies. In the 2023-24 Season, when Bradley Beal sits, the Phoenix Suns are 10-6 (0.625), compared to 1-2 (0.333) when he plays. ```ruby require "uri" require "net/http" url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/lineup_changes/team/sr:competitor:3422") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = "{your_auth_token}" response = https.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.radar360.sportradar.com") payload = '' headers = { 'Authorization': '{your_auth_token}' } conn.request("GET", "/insights/v2/mlb/en/lineup_changes/team/sr:competitor:3422", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/lineup_changes/team/sr:competitor:3422' \ --header 'Authorization: {your_auth_token}' ``` **Syntax:** https://api.radar360.sportradar.com/insights/`{version}`/mlb/`{language}`/lineup_changes/`{subject}`/`{subjectId}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `version` | Version number of the API you are accessing

Current Version: `v2` | | `language` | 2 letter code for supported languages

`en` (English)
| | `subject` | Subject type for insights

`game`, `team`, or `player` | | `subjectId` | Unique subject Id, matching the subject type. Accepts `subjectUsId` or `subjectSRId`

Samples:
`game` = `f16231a5-bcbd-4e4f-a18c-046829f0a638` or `sr:match:45785631`

`team` = `sr:competitor:3641` or `43a39081-52b4-4f93-ad29-da7f329ea960`

`player` = `sr:player:1399987` or `e750ccd5-7a24-44ef-b661-0d41baa17d1c` | ### Pagination >Example including pagatinated query string parameter:
require "uri"
require "net/http"

url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/lineup_changes/team/sr:competitor:3422?pageToken={token}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "{your_auth_token}"

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

conn = http.client.HTTPSConnection("api.radar360.sportradar.com")
payload = ''
headers = {
  'Authorization': '{your_auth_token}'
}
conn.request("GET", "/insights/v2/mlb/en/lineup_changes/team/sr:competitor:3422?pageToken={token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/lineup_changes/team/sr:competitor:3422?pageToken={token}' \
--header 'Authorization: {your_auth_token}'
All Insights endpoints display 50 results by default.

Requests with more than 50 results will include a `pageToken` at the end of the file. Input this token within a query parameter on your next request to access further results. | Parameter | Description | | --------- | ----------- | | `pageToken` | Unique token to paginate additional results | Return to top ## Milestones Retrieve insights on upcoming MLB player and team milestones. **Example:** Miguel Cabrera is 3 home runs away from reaching 510 in his career. Heading into today, 25 other players in MLB history (0 active) have reached that mark. ```ruby require "uri" require "net/http" url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/milestones/team/sr:competitor:3422") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = "{your_auth_token}" response = https.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.radar360.sportradar.com") payload = '' headers = { 'Authorization': '{your_auth_token}' } conn.request("GET", "/insights/v2/mlb/en/milestones/team/sr:competitor:3422", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/milestones/team/sr:competitor:3422' \ --header 'Authorization: {your_auth_token}' ``` **Syntax:** https://api.radar360.sportradar.com/insights/`{version}`/mlb/`{language}`/milestones/`{subject}`/`{subjectId}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `version` | Version number of the API you are accessing

Current Version: `v2` | | `language` | 2 letter code for supported languages

`en` (English)
| | `subject` | Subject type for insights

`game`, `team`, or `player` | | `subjectId` | Unique subject Id, matching the subject type. Accepts `subjectUsId` or `subjectSRId`

Samples:
`game` = `f16231a5-bcbd-4e4f-a18c-046829f0a638` or `sr:match:45785631`

`team` = `sr:competitor:3641` or `43a39081-52b4-4f93-ad29-da7f329ea960`

`player` = `sr:player:1399987` or `e750ccd5-7a24-44ef-b661-0d41baa17d1c` | ### Pagination >Example including pagatinated query string parameter:
require "uri"
require "net/http"

url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/milestones/team/sr:competitor:3422?pageToken={token}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "{your_auth_token}"

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

conn = http.client.HTTPSConnection("api.radar360.sportradar.com")
payload = ''
headers = {
  'Authorization': '{your_auth_token}'
}
conn.request("GET", "/insights/v2/mlb/en/milestones/team/sr:competitor:3422?pageToken={token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/milestones/team/sr:competitor:3422?pageToken={token}' \
--header 'Authorization: {your_auth_token}'
All Insights endpoints display 50 results by default.

Requests with more than 50 results will include a `pageToken` at the end of the file. Input this token within a query parameter on your next request to access further results. | Parameter | Description | | --------- | ----------- | | `pageToken` | Unique token to paginate additional results | Return to top ## Player Betting Trends Retrieve betting trends on MLB players. **Example:** Mike Trout has failed to exceed 0.5 RBIs in 11 of his last 12 games at home (0.1 RBIs/game average). o/u 0.5 available at DraftKings (+170/-233). ```ruby require "uri" require "net/http" url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/player_betting_trends/team/sr:competitor:3422") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = "{your_auth_token}" response = https.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.radar360.sportradar.com") payload = '' headers = { 'Authorization': '{your_auth_token}' } conn.request("GET", "/insights/v2/mlb/en/player_betting_trends/team/sr:competitor:3422", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/player_betting_trends/team/sr:competitor:3422' \ --header 'Authorization: {your_auth_token}' ``` **Syntax:** https://api.radar360.sportradar.com/insights/`{version}`/mlb/`{language}`/player_betting_trends/`{subject}`/`{subjectId}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `version` | Version number of the API you are accessing

Current Version: `v2` | | `language` | 2 letter code for supported languages

`en` (English)
| | `subject` | Subject type for insights

`game`, `team`, or `player` | | `subjectId` | Unique subject Id, matching the subject type. Accepts `subjectUsId` or `subjectSRId`

Samples:
`game` = `f16231a5-bcbd-4e4f-a18c-046829f0a638` or `sr:match:45785631`

`team` = `sr:competitor:3641` or `43a39081-52b4-4f93-ad29-da7f329ea960`

`player` = `sr:player:1399987` or `e750ccd5-7a24-44ef-b661-0d41baa17d1c` | ### Pagination >Example including pagatinated query string parameter:
require "uri"
require "net/http"

url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/player_betting_trends/team/sr:competitor:3422?pageToken={token}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "{your_auth_token}"

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

conn = http.client.HTTPSConnection("api.radar360.sportradar.com")
payload = ''
headers = {
  'Authorization': '{your_auth_token}'
}
conn.request("GET", "/insights/v2/mlb/en/player_betting_trends/team/sr:competitor:3422?pageToken={token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/player_betting_trends/team/sr:competitor:3422?pageToken={token}' \
--header 'Authorization: {your_auth_token}'
All Insights endpoints display 50 results by default.

Requests with more than 50 results will include a `pageToken` at the end of the file. Input this token within a query parameter on your next request to access further results. | Parameter | Description | | --------- | ----------- | | `pageToken` | Unique token to paginate additional results | Return to top ## Predictions Retrieve predictions on upcoming MLB games. **Example:** The Boston Red Sox are projected to beat the Los Angeles Angels today by 1.5 points. The projected Over/Under is 9.5 points ```ruby require "uri" require "net/http" url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/predictions/team/sr:competitor:3422") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = "{your_auth_token}" response = https.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.radar360.sportradar.com") payload = '' headers = { 'Authorization': '{your_auth_token}' } conn.request("GET", "/insights/v2/mlb/en/predictions/team/sr:competitor:3422", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/predictions/team/sr:competitor:3422' \ --header 'Authorization: {your_auth_token}' ``` **Syntax:** https://api.radar360.sportradar.com/insights/`{version}`/mlb/`{language}`/predictions/`{subject}`/`{subjectId}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `version` | Version number of the API you are accessing

Current Version: `v2` | | `language` | 2 letter code for supported languages

`en` (English)
| | `subject` | Subject type for insights

`game`, `team`, or `player` | | `subjectId` | Unique subject Id, matching the subject type. Accepts `subjectUsId` or `subjectSRId`

Samples:
`game` = `f16231a5-bcbd-4e4f-a18c-046829f0a638` or `sr:match:45785631`

`team` = `sr:competitor:3641` or `43a39081-52b4-4f93-ad29-da7f329ea960`

`player` = `sr:player:1399987` or `e750ccd5-7a24-44ef-b661-0d41baa17d1c` | ### Pagination >Example including pagatinated query string parameter:
require "uri"
require "net/http"

url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/predictions/team/sr:competitor:3422?pageToken={token}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "{your_auth_token}"

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

conn = http.client.HTTPSConnection("api.radar360.sportradar.com")
payload = ''
headers = {
  'Authorization': '{your_auth_token}'
}
conn.request("GET", "/insights/v2/mlb/en/predictions/team/sr:competitor:3422?pageToken={token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/predictions/team/sr:competitor:3422?pageToken={token}' \
--header 'Authorization: {your_auth_token}'
All Insights endpoints display 50 results by default.

Requests with more than 50 results will include a `pageToken` at the end of the file. Input this token within a query parameter on your next request to access further results. | Parameter | Description | | --------- | ----------- | | `pageToken` | Unique token to paginate additional results | Return to top ## Scoring Retrieve in-game scoring updates. **Example:** The Cleveland Guardians just scored and lead 1-0 in the top of the 1st inning. ```ruby require "uri" require "net/http" url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/scoring/team/sr:competitor:3422") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = "{your_auth_token}" response = https.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.radar360.sportradar.com") payload = '' headers = { 'Authorization': '{your_auth_token}' } conn.request("GET", "/insights/v2/mlb/en/scoring/team/sr:competitor:3422", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/scoring/team/sr:competitor:3422' \ --header 'Authorization: {your_auth_token}' ``` **Syntax:** https://api.radar360.sportradar.com/insights/`{version}`/mlb/`{language}`/scoring/`{subject}`/`{subjectId}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `version` | Version number of the API you are accessing

Current Version: `v2` | | `language` | 2 letter code for supported languages

`en` (English), `fr`(French), `de`(German), `it`(Italian), `es`(Spanish)
| | `subject` | Subject type for insights

`game`, `team`, or `player` | | `subjectId` | Unique subject Id, matching the subject type. Accepts `subjectUsId` or `subjectSRId`

Samples:
`game` = `f16231a5-bcbd-4e4f-a18c-046829f0a638` or `sr:match:45785631`

`team` = `sr:competitor:3641` or `43a39081-52b4-4f93-ad29-da7f329ea960`

`player` = `sr:player:1399987` or `e750ccd5-7a24-44ef-b661-0d41baa17d1c` | ### Pagination >Example including pagatinated query string parameter:
require "uri"
require "net/http"

url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/scoring/team/sr:competitor:3422?pageToken={token}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "{your_auth_token}"

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

conn = http.client.HTTPSConnection("api.radar360.sportradar.com")
payload = ''
headers = {
  'Authorization': '{your_auth_token}'
}
conn.request("GET", "/insights/v2/mlb/en/scoring/team/sr:competitor:3422?pageToken={token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/scoring/team/sr:competitor:3422?pageToken={token}' \
--header 'Authorization: {your_auth_token}'
All Insights endpoints display 50 results by default.

Requests with more than 50 results will include a `pageToken` at the end of the file. Input this token within a query parameter on your next request to access further results. | Parameter | Description | | --------- | ----------- | | `pageToken` | Unique token to paginate additional results | Return to top ## Team Betting Trends Retrieve betting trends on NFL teams. **Example:** The Chicago White Sox are 0-7 (.000) on the road off a win over their last 7 games ```ruby require "uri" require "net/http" url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/team_betting_trends/team/sr:competitor:3641") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = "{your_auth_token}" response = https.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.radar360.sportradar.com") payload = '' headers = { 'Authorization': '{your_auth_token}' } conn.request("GET", "/insights/v2/mlb/en/team_betting_trends/team/sr:competitor:3641", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/team_betting_trends/team/sr:competitor:3641' \ --header 'Authorization: {your_auth_token}' ``` **Syntax:** https://api.radar360.sportradar.com/insights/`{version}`/mlb/`{language}`/team_betting_trends/`{subject}`/`{subjectId}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `version` | Version number of the API you are accessing

Current Version: `v2` | | `language` | 2 letter code for supported languages

`en` (English)
| | `subject` | Subject type for insights

`game`, `team`, or `player` | | `subjectId` | Unique subject Id, matching the subject type. Accepts `subjectUsId` or `subjectSRId`

Samples:
`game` = `f16231a5-bcbd-4e4f-a18c-046829f0a638` or `sr:match:45785631`

`team` = `sr:competitor:3641` or `43a39081-52b4-4f93-ad29-da7f329ea960`

`player` = `sr:player:1399987` or `e750ccd5-7a24-44ef-b661-0d41baa17d1c` | ### Pagination >Example including pagatinated query string parameter:
require "uri"
require "net/http"

url = URI("https://api.radar360.sportradar.com/insights/v2/mlb/en/team_betting_trends/team/sr:competitor:3641?pageToken={token}")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "{your_auth_token}"

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

conn = http.client.HTTPSConnection("api.radar360.sportradar.com")
payload = ''
headers = {
  'Authorization': '{your_auth_token}'
}
conn.request("GET", "/insights/v2/mlb/en/team_betting_trends/team/sr:competitor:3641?pageToken={token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
curl --location --request GET 'https://api.radar360.sportradar.com/insights/v2/mlb/en/team_betting_trends/team/sr:competitor:3641?pageToken={token}' \
--header 'Authorization: {your_auth_token}'
All Insights endpoints display 50 results by default.

Requests with more than 50 results will include a `pageToken` at the end of the file. Input this token within a query parameter on your next request to access further results. | Parameter | Description | | --------- | ----------- | | `pageToken` | Unique token to paginate additional results | Return to top ## Push Feed

Push Overview

The Insights Push feed is a webhook-based, real-time feed that automatically sends new insights to you upon generation. It ensures reliable and efficient delivery of the most up-to-date insights and can dramatically reduce the number of calls you need to make to our RESTful Insights V2 API. The structure and content (JSON payload) of insights delivered by the push feed are identical to the RESTful API. However, how you choose which insights to receive differs from the Insights V2 API. You can subscribe to topics defined simply by league, insightType, and locale.

Getting Started

To subscribe to the Insights Push feed, you will need to: 1. Set up a public web server that is configured to receive POST requests - Your web server must not require any authentication on POST requests - Make sure your web server is not configured with a firewall to block incoming requests 2. Send us the HTTPS endpoint where this web server is exposed, and a label you would like to reference this URL by (e.g. "prod", "dev") 3. Send us the topics (combinations of league, insightType, and locale) you would like this endpoint subscribed to.
Parameters
| Parameter | Description | | --------- | ----------- | | `league` | Desired league for insights

`mlb`, `nba`, `ncaamb`, `nfl`, `ncaafb`, `nhl`
| | | `insightType` | Desired type of insight

`expert_picks`, `highs`, `leaderboards`, `lineup_changes`, `milestones`, `player_betting_trends`, `predictions`, `scoring`, `team_betting_trends`
| | `locale` | 2 letter code for supported languages

`en` (English), `fr`(French), `de`(German), `it`(Italian), `es`(Spanish)

Note: Non-English translations are currently only available for Scoring insights | Your endpoint must quickly return a 2xx response prior to any complex logic that could cause a timeout. If your endpoint goes offline and/or does not return a 2xx response upon receiving an insight, the Push feed will attempt to redeliver the insight to your webhook endpoint with an exponential back off.

Subscription Confirmation

```json Subscription Confirmation Sample { "Type": "SubscriptionConfirmation", "MessageId": "d0776612-6cd1-49ba-a0bc-0d26e137ae02", "Token": "2336412f37fb687f5d51e6e2425c464cefc600f65e7b3825a843e9722e219fc5b8cda4086488540df281cbf79edc7c2d03be9e38e11d7ce064fd8fc24cd43bd49d9375754c89432c3ac132fbdb80194b7e71a57d3ae6f6e1f34704cf51bfd72ceaad93543553466e88244f31d84d73bfe44c8e2e0a9ba72d143aabb883783868420c244a4c2c61d4dc016c3778b0bc578b0322a8f4db60ca5cb274cd25e16428", "TopicArn": "arn:aws:sns:us-east-1:038785188916:radar360-push-prod-NflMilestonesPushTopic-AtgiU177X7KK", "Message": "You have chosen to subscribe to the topic arn:aws:sns:us-east-1:038785188916:radar360-push-prod-NflMilestonesPushTopic-AtgiU177X7KK.\nTo confirm the subscription, visit the SubscribeURL included in this message.", "SubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=ConfirmSubscription&TopicArn=arn:aws:sns:us-east-1:038785188916:radar360-push-prod-NflMilestonesPushTopic-AtgiU177X7KK&Token=2336412f37fb687f5d51e6e2425c464cefc600f65e7b3825a843e9722e219fc5b8cda4086488540df281cbf79edc7c2d03be9e38e11d7ce064fd8fc24cd43bd49d9375754c89432c3ac132fbdb80194b7e71a57d3ae6f6e1f34704cf51bfd72ceaad93543553466e88244f31d84d73bfe44c8e2e0a9ba72d143aabb883783868420c244a4c2c61d4dc016c3778b0bc578b0322a8f4db60ca5cb274cd25e16428", "Timestamp": "2023-10-24T16:55:27.813Z", "SignatureVersion": "1", "Signature": "Wh8w6/DXUu+4F9cQ8KWN0bMEj9Jyi2lK1VdkS7WWpO+NbEpMEpsuqX4d85rFWlvHscR+K0r5iZ2ox4E1y0FBqz44FMZeEQeZ5W0G7+ZOiewnjIdQzBjXps3T/zmGNxMWXHoJiyDJ04T/lGTSzMJ+h71ak/mvuX2uBbH+gv+f/tMXvD4k48bWfLTygO7plh3hKRniOXWJK82yxc9O9liZaSndCKTwkPcYeFLvS/TmdeFye6Is9fu+HreDpFCRom6iakMGXIee1ZrSRRiV0VxHz8KRMzCTyzKRjSxHNE8SQ32964KDg8I0LTybzX2N5YUDicyJAZImGuAY3g1wjITXDA==", "SigningCertURL": "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-01d088a6f77103d0fe307c0069e40ed6.pem" } ``` Upon being subscribed to a topic, a confirmation POST request will be made to your endpoint. You must confirm each subscription by visiting (sending a GET request to) the SubscribeURL from the request body in order to start receiving insights for that topic. We recommend that you configure your client to automatically send a GET request to this address upon receiving a subscription confirmation so that you do not encounter disruptions if we need to resubscribe your endpoint, or if you choose to have your subscriptions modified in the future. Click here for a subscription confirmation example.

Subscription Confirmation

Each message (with the exception of subscription confirmations) is signed with a private key that we share with you so that you can verify insights as originating from Sportradar. Specifically, we have implemented SHA256 HMAC signatures decoded as hex on a combination of the timestamp and insight, like so: const signedPayload = `${timestamp}.${JSON.stringify(event.insight)}` const computedSignature = crypto.createHmac('sha256', SECRET_KEY).update(signedPayload).digest('hex') See below for sample implementation.

Implementation

You should expose a POST endpoint to receive insights at, confirm subscription requests, and perform signature validation. Click here for an example implementation of a client which consumes our push feed in Javascript using Node.js and Express. Return to top ## Frequently Asked Questions

Q: What is the Date format?

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 time zone 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: When should I expect to see Insights come through?

A: There are a number of Insights that populate each morning. Then, when games begin, Insights are generated in real-time.

Q: How long are insights available?

A: Our Insights are stored and available for 2 weeks.

Return to top

Docs Navigation