Darts v2
Quick Access | |
Postman Collection | XSD Schema |
Download |
API | API Version |
Darts | v2 |
Note: Authentication is required for all API calls. |
- Competitor profiles
- Rankings
- Standings
- Historical results
- Match win probabilities
Example:
>To find the probability of a home team win for a given game: >- Call the Daily Summaries for the day the sport event takes place and find the Season Id for the chosen sport event
- Make note of the Sport Event Id for the given sport event
- Call the Season Probabilties using the Season Id
- Find Sport Event Id within the results locate the home team and the outcome probability
Update Frequency: | As Necessary | ||
Content Type: | XML or JSON | ||
Mappings Info Data Points: | Name | Merged Id | Retained Id |
require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/schedules/2018-09-05/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
import http.client conn = http.client.HTTPSConnection("api.sportradar.com") conn.request("GET", "/darts/trial/v2/en/schedules/2018-09-05/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.com/darts/trial/v2/en/schedules/2018-09-05/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 (&). |
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 200.
Example: limit=200 | Return to API map ## Head To Heads Lists the last 10 past results and 10 upcoming schedules upcoming matches, given two team IDs. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/competitors/sr:competitor:26092/versus/sr:competitor:26280/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", "/darts/trial/v2/en/competitors/sr:competitor:26092/versus/sr:competitor:26280/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.com/darts/trial/v2/en/competitors/sr:competitor:26092/versus/sr:competitor:26280/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/competitors/`{competitor_id}`/versus/`{competitor_id2}`/summaries.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `competitor_id` | Id of a given competitor. | | `competitor_id2` | Id of a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Live Summaries Provides game information for all currently live matches, including scoring. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/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", "/darts/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.com/darts/trial/v2/en/schedules/live/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/schedules/live/summaries.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Live Timelines Provides an event timeline for currently live matches. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/darts/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", "/darts/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/darts/trial/v2/en/schedules/live/timelines.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/snooker/`{access_level}`/`{version}`/`{language_code}`/schedules/live/timelines.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Live Timelines Delta Provides a 10 second live delta of game information, including scoring and an event timeline. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/darts/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", "/darts/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/darts/trial/v2/en/schedules/live/timelines_delta.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/schedules/live/timelines_delta.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Rankings Returns current PDC order of merit ranking information for the current week. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/darts/trial/v2/en/rankings.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/darts/trial/v2/en/rankings.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/darts/trial/v2/en/rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.us/darts/`{access_level}`/`{version}`/`{language_code}`/rankings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Competitors Provides a list of competitors participating in a given season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/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", "/darts/trial/v2/en/seasons/sr:season:48090/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.com/darts/trial/v2/en/seasons/sr:season:48090/competitors.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/competitors.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `season_id` | Id of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Information Provides detailed information for a given season, including participating competitors and league structure. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/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", "/darts/trial/v2/en/seasons/sr:season:48090/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.com/darts/trial/v2/en/seasons/sr:season:48090/info.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/info.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `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. Use this feed to compile full advancement brackets for relevant seasons/tournaments. Links between all matches and rounds are available when competitors (TBD vs. TBD) are not yet known. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/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", "/darts/trial/v2/en/seasons/sr:season:48090/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.com/darts/trial/v2/en/seasons/sr:season:48090/stages_groups_cup_rounds.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/stages_groups_cup_rounds.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `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 match win probabilities (home team win, away team win) for all matches in a given season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/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", "/darts/trial/v2/en/seasons/sr:season:48090/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.com/darts/trial/v2/en/seasons/sr:season:48090/probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/probabilities.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `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("https://api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/probabilities.xml?api_key={your_api_key}&start=200") 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.com") conn.request("GET", "/darts/trial/v2/en/seasons/sr:season:48090/probabilities.xml?api_key={your_api_key}&start=200") res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
curl -L GET 'api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/probabilities.xml?api_key={your_api_key}&start=200'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 (&). |
Example: start=0 | | `limit` | Number to limit the number of results. Minimum value is 1, maximum value is 200.
Example: limit=200 | Return to top ## Season Standings Provides detailed standings info for a given season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/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", "/darts/trial/v2/en/seasons/sr:season:48090/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.com/darts/trial/v2/en/seasons/sr:season:48090/standings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/standings.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `season_id` | Id of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Statistics Returns the team statistics for a given season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/competitors/sr:competitor:26280/statistics.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/darts/trial/v2/en/seasons/sr:season:48090/competitors/sr:competitor:26280/statistics.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/competitors/sr:competitor:26280/statistics.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/competitors/`{competitor_id}`/statistics.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `season_id` | Id of a given season. | | `competitor_id` | Id of a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Season Summaries Provides schedule information for all matches from a given season including scoring at the match level. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/seasons/sr:season:48090/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", "/darts/trial/v2/en/seasons/sr:season:48090/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.com/darts/trial/v2/en/seasons/sr:season:48090/summaries.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/seasons/`{season_id}`/summaries.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `season_id` | Id of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Seasons Provides a list of historical season information for all competitions. Competitions will return a maximum of three seasons of data, including current or newly created seasons. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/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", "/darts/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.com/darts/trial/v2/en/seasons.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/seasons.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `format` | xml or json. | | `your_api_key` | Your API key. | | `&parents=true` | Optional query parameter to display only parent competitions. | Return to API map ## Seasons Disabled Returns a list of all currently disabled seasons. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/seasons_disabled.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", "/darts/trial/v2/en/seasons_disabled.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/darts/trial/v2/en/seasons_disabled.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/seasons_disabled.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Sport Event Summaries Provides real-time match-level scoring for a given match. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/sport_events/sr:sport_event:14530422/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", "/darts/trial/v2/en/sport_events/sr:sport_event:14530422/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.com/darts/trial/v2/en/sport_events/sr:sport_event:14530422/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{sport_event_id}`/summary.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `sport_event_id` | Id of a given match. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Sport Event Timeline Provides a real-time event timeline of scoring for a given match. Please note that data returned is determined by coverage level. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/sport_events/sr:sport_event:14530422/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", "/darts/trial/v2/en/sport_events/sr:sport_event:14530422/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.com/darts/trial/v2/en/sport_events/sr:sport_event:14530422/timeline.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{sport_event_id}`/timeline.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `sport_event_id` | Id of a given match. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to API map ## Sport Events Created Provides ids for sport events that have been created in the last 24 hours. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/v2/en/sport_events/created.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", "/darts/trial/v2/en/sport_events/created.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/darts/trial/v2/en/sport_events/created.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/sport_events/created.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `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("https://api.sportradar.us/darts/trial/v2/en/sport_events/created.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", "/darts/trial/v2/en/sport_events/created.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/darts/trial/v2/en/sport_events/created.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 (&). |
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 Events Removed Provides ids for sport events that have been removed from the API due to an entry error. Ids will remain in the response for 2 weeks. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/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", "/darts/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.com/darts/trial/v2/en/sport_events/removed.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/sport_events/removed.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `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("https://api.sportradar.us/darts/trial/v2/en/sport_events/removed.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", "/darts/trial/v2/en/sport_events/removed.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/darts/trial/v2/en/sport_events/removed.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 (&). |
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 Events Updated Provides ids for sport events that have been updated in the last 24 hours. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/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", "/darts/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.com/darts/trial/v2/en/sport_events/updated.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. https://api.sportradar.com/darts/`{access_level}`/`{version}`/`{language_code}`/sport_events/updated.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v2). | | `language_code` | 2 letter code for supported languages: en (English) | | `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("https://api.sportradar.us/darts/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", "/darts/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/darts/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 (&). |
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 ## Push Feeds >To best utilize Push feeds, we have included code samples in Ruby, Java and Python which provide an example of a way you can consume the feeds. Using these samples will output the feeds content to STDOUT.
For Java, we have also provided a Stream Client to assist your integration.
Note: In the provided Java sample, replace "URL GOES HERE" with the desired Push feed URL. ```ruby require 'httpclient' module Sportradar module HTTP module Stream class Client attr_reader :url, :logger def initialize(url, publisher, logger) @url = url @logger = logger @publisher = publisher @client = ::HTTPClient.new(:agent_name => 'SportsData/1.0') end def start @thread ||= Thread.new do logger.debug "Starting loop" @client.get_content(url, :follow_redirect => true) do |chunk| @publisher.publish(::JSON.parse(chunk)) if @publisher end logger.debug "finished loop" end end def stop @thread.terminate if @thread end end end end end ``` ```java package com.sportradar.http.stream.client; import org.junit.After; import org.junit.Before; import org.junit.Test; public class StreamClientTest { private StreamClient client; private static String SERVICE_URL = "
Note: Optional query string parameters must be added after your API key with an ampersand (&). If you are filtering for more than one result, separate the results with a comma (,) and no spaces. |
Example: channel=darts | | `competition_id` | Competition Id expressed as: {competition_id}.
Example: competition_id=sr:competition:27230 | | `event_id` | Event type expressed as: {event_type}.
Example: event_id=dart | | `format` | Format type expressed as: {format}.
Example: format=json | | `season_id` | Season id expressed as: {season_id}.
Example: season_id=sr:season:59654 | | `sport_event_id` | Sport event id expressed as: {sport_event_id}.
Example: sport_event_id=sr:sport_event_id:18243959 | | `sport_id` | Sport id expressed as: {sport_id}.
Example: sport_id=sr:sport:22 | Return to API map ## Push Statistics Displays statistics information for live matches. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/stream/statistics/subscribe?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import requests import json r = requests.get("https://api.sportradar.com/darts/trial/stream/statistics/subscribe", params = {'api_key': 'your_api_key'}, allow_redirects=False) redirect_url = r.headers['Location'] r = requests.get(redirect_url, stream=True) for line in r.iter_lines(): # filter out keep-alive new lines if line: decoded_line = line.decode('utf-8') print(json.loads(decoded_line)) ``` ```shell curl -L GET 'api.sportradar.com/darts/trial/stream/statistics/subscribe?api_key={your_api_key}' ``` > The above command returns json structured like this. https://api.sportradar.us/darts/`{access_level}`/stream/statistics/subscribe?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `your_api_key` | Your API key. | ### Optional Query String Parameters >Example including optional query string parameters: ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/darts/trial/stream/statistics/subscribe?api_key={your_api_key}&format=json&sport_event_id=sr:sport_event_id:18243959") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import requests import json r = requests.get("https://api.sportradar.com/darts/trial/stream/statistics/subscribe", params = {'api_key': 'your_api_key', 'format': 'json', 'sport_event_id': 'sr:sport_event_id:18243959'}, allow_redirects=False) redirect_url = r.headers['Location'] r = requests.get(redirect_url, stream=True) for line in r.iter_lines(): # filter out keep-alive new lines if line: decoded_line = line.decode('utf-8') print(json.loads(decoded_line)) ``` ```shell curl -L GET 'https://api.sportradar.com/darts/trial/stream/statistics/subscribe?api_key={your_api_key}&format=json&sport_event_id=sr:sport_event_id:18243959' ``` In addition to the URL parameters listed above, you can filter the Statistics information with one or more of the following optional query string parameters.
Note: Optional query string parameters must be added after your API key with an ampersand (&). If you are filtering for more than one result, separate the results with a comma (,) and no spaces. |
Example: channel=darts | | `competition_id` | Competition Id expressed as: {competition_id}.
Example: competition_id=sr:competition:27230 | | `event_id` | Event type expressed as: {event_type}.
Example: event_id=dart | | `format` | Format type expressed as: {format}.
Example: format=json | | `season_id` | Season id expressed as: {season_id}.
Example: season_id=sr:season:59654 | | `sport_event_id` | Sport event id expressed as: {sport_event_id}.
Example: sport_event_id=sr:sport_event_id:18243959 | | `sport_id` | Sport id expressed as: {sport_id}.
Example: sport_id=sr:sport:22 | Return to API map ## Frequently Asked Questions
Q: What leagues do you cover, and at what level?
Coverage information can be found via our Coverage Matrix.
Q: What format are date fields presented in?
A: When we present date only values we present these in the ISO 8601 standard format.
ex: 2013-04-03
We use these for attributes that have date and no time (such as birthdate). For more information: https://en.wikipedia.org/wiki/ISO_8601
Q: What format are the date/time fields presented in?
A: All of our Date/Time attributes are in UTC, presented in the ISO 8601 standard format.
ex: 2013-04-03T18:15:00+00:00
For more information: https://en.wikipedia.org/wiki/ISO_8601
Q: What does Mode Best Of represent in the Competition Information?
A: The Mode Best Of displayed represents the number of sets in a given event, not legs.
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/darts/trial/v2/openapi/swagger/index.html
Q: What are the valid sport_event_status – status values?
A: Status values can change over time, and new values may be added when needed. Here is a list of the currently valid status values and their definitions:
- not_started – The match is scheduled to be played
- started – The match has begun
- postponed – The match has been postponed to a future date
- match_about_to_start – The match is about to begin
- live – The match is currently in progress
- closed – The match results have been confirmed
- ended – The match is over
- 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
- suspended – The match began, but has been suspended to a later time
- cancelled – The match has been cancelled and will not be played
- delayed – The match has been temporarily delayed and will be continued
Q: What are the valid sport_event_status – match_status values?
A: Match status values can change over time, and new values may be added when needed. Here is a list of the currently valid match status values and their definitions:
- not_started
- ended
- postponed
- cancelled
- abandoned
- 1st_set
- 2nd_set
- 3rd_set
- 4th_set
- 5th_set
- 6th_set
- 7th_set
- 8th_set
- 9th_set
- 10th_set
- 11th_set
- 12th_set
- 13th_set
- pause
- started
- start_delayed
- walkover
Q: How do I access past seasons’ result and stats?
A: TournamentID and SeasonID are interchangeable. To access a previous season, first interrogate the tournaments/[tournamentID]/seasons endpoint to ascertain the required seasonID, then use that seasonID in place of the tournamentID for any of the following endpoints:
- Tournaments/seasonID/results
- Tournaments/seasonID/schedule
- Tournaments/seasonID/teams/teamID/statistics
- Tournaments/seasonID/standings
Q: What are the valid outcomes for probabilities?
A: Here are the valid outcome probabilities:
- home_team_winner
- away_team_winner
Q: How do I find out the coverage for a particular match?
A: Find the node called “coverage_info” in the Sport Event Timeline endpoint. The attribute live_coverage reports whether Sportradar has live coverage of the match or not.
Q: Why do different groups have coverage information for a tournament?
A: The notion of “groups” is versatile and is used to distinguish between playoffs, and our tournaments structures and is therefore necessary to describe coverage at a group level for consistency.
Q: What are the possible event types logged?
A: Here are all of the possible event types we log:
- match_started
- match_ended
- first_throw
- period_start
- leg_score_change
- period_score
- score_change
- dart
- match_info
Q: What are the valid tournament types?
A: Here are the valid tournament types:
- group
- playoff
Q: What are markets and what are the different markets?
A: Markets is something you can bet on that we provide probabilities for. Over time we intend to provide more and more markets in the API. Currently the only market we provide is 3-way (will the home team win? Or the away team? Or will it be a draw?)
Q: What are the possible outcomes?
A: Different markets have different outcomes. The available markets are currently:
- home_team_winner
- away_team_winner
Q: What are the possible values for dart_score_multiplier:?
A: The available values for dart_score_multiplier are:
- 0 = miss
- 1 = single
- 2 = double
- 3 = treble
Q: How long are matches stored in the deleted/updated matches endpoints?
A: The deleted/updated matches endpoints will show sport events removed or updated in the last 2 weeks.
Q: Why is the displayed season end date a day late?
A: This is a measure to ensure that all matches in a season are contained within the season date range.
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: When will a season move from Seasons Disabled endpoint to the Competition Seasons endpoint?
A: A season will become active once the draw has been made and there is confirmation of the competitors and the 1st round schedule.
Q: How will a sport event behave when it is not covered with live scores?
A: When a sport_event is not covered live, the status and match_status will remain as not_started until results are entered post-match.
Q: What competitions are available in Seasons Disabled endpoint?
A: PDC competitions will be available.
Q: How do I locate the TTL (Time to Live)/cache on an API endpoint?
A: The cache (in seconds) can be accessed in the returned header information on each RESTful API call, under cache-control
.
ex. cache-control: max-age=1, public, s-maxage=1
or
cache-control: public, must-revalidate, max-age=120
Q: What are the possible values for cup_round
– state
in the Season Links feed?
A: Listed below are the values and definitions for cup_round
- state
. These can be leveraged to determine the status of a cup round.
empty
- A matchup has been created but neither the match details nor the competitors are known.unseeded_fixture
- Match details are known but competitors are unknown.partial_seeded
- One competitor is known.partial_seeded_fixture
- Match details and one competitor are known.seeded
- Both competitors are known.seeded_fixture
- Match details and both competitors are known.unstarted
- Match(es) have been added.on_going
- The first match has started.decided
- The last match has ended.winner
- The winner is known.cancelled
– The matchup has been cancelled.
Docs Navigation
- Documentation
- Football (American Football)
- Football (Soccer)
- Australian Rules Football
- Baseball
- Basketball
- NBA v8
- NBA v7
- NBA v5
- NBA v4
- WNBA v8
- WNBA v7
- WNBA v4
- WNBA v3
- NBA G League v8
- NBA G League v7
- NBA G League v5
- NCAA Men's Basketball v8
- NCAA Men's Basketball v7
- NCAA Men's Basketball v4
- NCAA Men's Basketball v3
- NCAA Women's Basketball v8
- NCAA Women's Basketball v7
- NCAA Women's Basketball v3
- Global Basketball v2
- Global Basketball v1
- NBA Historical v1
- Combat Sports
- Cricket
- Editorial Content
- Golf
- Handball
- Hockey
- Images
- Insights
- Insights User Interface
- NBA Insights v1
- NHL Insights v1
- MLB Insights v1
- NFL Insights v1
- MLB Betting Splits v2
- MLB Betting Splits v1
- NBA Betting Splits v2
- NBA Betting Splits v1
- NCAAFB Betting Splits v2
- NCAAFB Betting Splits v1
- NCAAMB Betting Splits v2
- NCAAMB Betting Splits v1
- NFL Betting Splits v2
- NFL Betting Splits v1
- NHL Betting Splits v2
- NHL Betting Splits v1
- Soccer Betting Splits v2
- Soccer Betting Splits v1
- Odds
- Broadcast Graphics
- Racing
- Rugby
- Tennis
- Widgets
- Baseline Sports Coverage
- Badminton v2
- Badminton v1
- Bandy v2
- Bandy v1
- Beach Soccer v2
- Beach Soccer v1
- Curling v2
- Curling v1
- Cycling v2
- Darts v2
- Darts v1
- Field Hockey v2
- Field Hockey v1
- Floorball v2
- Floorball v1
- Futsal v2
- Futsal v1
- Pesapallo v2
- Pesapallo v1
- Snooker v2
- Snooker v1
- Squash v2
- Squash v1
- Table Tennis v2
- Volleyball (Beach) v2
- Volleyball (Beach) v1
- Volleyball (Indoor) v2
- Volleyball (Indoor) v1
- Waterpolo v2
- Waterpolo v1
- Winter Sports v1