Tennis v3

Frequently Asked Questions
Quick Access
Postman Collection XSD Schema
Download
## Tennis API Overview The Tennis API provides real-time scoring, point-by-point match scoring (when available), and an array of supplementary data. Over 4,000 competitions are covered and available in one package. Select the Tennis package in our Coverage Matrix for competitions and data offered. The API is consistent in structure, format, and behavior with the other General Sport APIs. Primary feeds will return seasons, competitions, player data, and real-time scores. Additional feeds provide a host of complementary stats, including:
  • World and race rankings
  • Win probabilities for each match
  • Player profiles
  • Historical results
  • Post-match corrections
  • In-depth match statistics
Real-time customers are also offered two delivery Push Feeds to enhance speed. An extended Probabilities package is also offered. This add-on includes live match probability updates and season outrights.
API API Version
Tennis v3
Note: Authentication is required for all API calls.
## Tennis v3 API Map To best utilize the Tennis 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 win probabilities for a match, given the date: >
  1. Call the Daily Summaries 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 and locate the outcome probability
>The probability of a win for each participant 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 season feeds. ## Tennis v3 Failover Information

If our scout feed goes down or becomes unavailable, Sportradar takes over Live Data Entry (LDE) to provide a failover.

In case of a failover, we follow one of the following scenarios:

  1. Continue point-by-point coverage – but lose service outcomes. During the failover we cannot provide data related to service outcome. The following data will be unavailable: aces, double faults, service faults, and successful service outcome. Those statistics will be verified and updated post-match.
  2. If point-by-point coverage is not possible – we will update game-by-game, post-match. During the failover we cannot provide point-by-point coverage and service outcomes. The following data will be unavailable: aces, double faults, service faults, and successful service outcome. Missing point-by-point coverage and statistics will be verified and updated post-match. Tie-break score will not be displayed. Game-by-game coverage will continue as each match ends.
## Competition Info Returns key information for a given competition. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/competitions/sr:competition:3101/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.com") conn.request("GET", "/tennis/trial/v3/en/competitions/sr:competition:3101/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/tennis/trial/v3/en/competitions/sr:competition:3101/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `competition_id` | Id of the competition. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Competition Seasons Provides historical season information for a given competition. 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/tennis/trial/v3/en/competitions/sr:competition:620/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.com") conn.request("GET", "/tennis/trial/v3/en/competitions/sr:competition:620/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/tennis/trial/v3/en/competitions/sr:competition:620/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `competition_id` | Id of the competition. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Competitions Displays all competitions. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/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.com") conn.request("GET", "/tennis/trial/v3/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.com/tennis/trial/v3/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Competitor Merge Mappings Provides the valid Sportradar Id in cases when two competitors have been merged into one. Mapping entries will remain in the feed for 7 days.
Update Frequency: As Necessary
Content Type: XML or JSON
Mappings Info Data Points: Name Merged Id Retained Id
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/competitors/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.com") conn.request("GET", "/tennis/trial/v3/en/competitors/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.com/tennis/tennis/v3/en/competitors/merge_mappings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Competitor Merge Mappings feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/`{language_code}`/competitors/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: v3). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Competitor Profile Provides stats and information pertaining to a competitor ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/competitors/sr:competitor:89320/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.com") conn.request("GET", "/tennis/trial/v3/en/competitors/sr:competitor:89320/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.com/tennis/trial/v3/en/competitors/sr:competitor:89320/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `competitor_id` | Id of the competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Competitor Summaries Returns sport event information for a given competitor, including all previous and upcoming matches and statistics. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/competitors/sr:competitor:14882/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.com") conn.request("GET", "/tennis/trial/v3/en/competitors/sr:competitor:14882/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/tennis/trial/v3/en/competitors/sr:competitor:14882/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `competitor_id` | Id of the competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Competitor vs Competitor Provides past and upcoming match details between two competitors given two competitor IDs. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/competitors/sr:competitor:122366/versus/sr:competitor:23581/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.com") conn.request("GET", "/tennis/trial/v3/en/competitors/sr:competitor:122366/versus/sr:competitor:23581/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/tennis/trial/v3/en/competitors/sr:competitor:122366/versus/sr:competitor:23581/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/tennis/`{access_level}`/`{version}`/`{language_code}`/competitors/`{competitor_id}`/versus/`{competitor_id2}`/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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `competitor_id` | Id of the competitor. | | `competitor_id2` | Id of the competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Complexes Lists all complexes and venues available in the API ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/complexes.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.com") conn.request("GET", "/tennis/trial/v3/en/complexes.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/tennis/trial/v3/en/complexes.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Complexes feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/`{language_code}`/complexes.`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Daily Summaries Returns a list of summaries for all competitions given a specific date: yyyy-mm-dd.
Note: Pagination will often be required to pull all data within this feed. By default, the feed will return 200 sport events.
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/schedules/2018-01-08/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.com") conn.request("GET", "/tennis/trial/v3/en/schedules/2018-01-08/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/tennis/trial/v3/en/schedules/2018-01-08/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day of the month 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("https://api.sportradar.com/tennis/trial/v3/en/schedules/2018-01-08/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.com")

conn.request("GET", "/tennis/trial/v3/en/schedules/2018-01-08/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/tennis/trial/v3/en/schedules/2018-01-08/summaries.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the summaries 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, maximum value is 200.
Example: limit=75 | Return to top ## Doubles Competitions Played ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/competitors/sr:competitor:124916/doubles_competitions_played.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.com") conn.request("GET", "/tennis/trial/v3/en/competitors/sr:competitor:124916/doubles_competitions_played.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/tennis/trial/v3/en/competitors/sr:competitor:124916/doubles_competitions_played.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Doubles Competitions Played feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/`{language_code}`/competitors/`{competitor_id}`/doubles_competitions_played.`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `competitor_id` | Id of a given competitor. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Doubles Competitor Rankings Provides the top 500 doubles competitor rankings for the ATP and WTA. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/double_competitors_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.com") conn.request("GET", "/tennis/trial/v3/en/double_competitors_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.com/tennis/trial/v3/en/double_competitors_rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Doubles Competitor Rankings feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/`{language_code}`/double_competitors_rankings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Doubles Race Rankings Rankings for the ATP/WTA finals ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/double_competitors_race_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.com") conn.request("GET", "/tennis/trial/v3/en/double_competitors_race_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.com/tennis/trial/v3/en/double_competitors_race_rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Doubles Race Rankings feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/`{language_code}`/double_competitors_race_rankings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Doubles Rankings Rankings in ascending order for doubles. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/double_competitors_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.com") conn.request("GET", "/tennis/trial/v3/en/double_competitors_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.com/tennis/trial/v3/en/double_competitors_rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Doubles Rankings feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/`{language_code}`/double_competitors_rankings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Live Summaries Returns information for currently live matches including live updates and statistics ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/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.com") conn.request("GET", "/tennis/trial/v3/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/tennis/trial/v3/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/tennis/`{access_level}`/`{version}`/`{language_code}`/schedules/live/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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Live Timelines Returns timeline information for currently live matches including live updates ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/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.com") conn.request("GET", "/tennis/trial/v3/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.com/tennis/trial/v3/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Live Timelines Delta Returns a 10 second delta of timeline information for currently live matches including live updates ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/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.com") conn.request("GET", "/tennis/trial/v3/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.com/tennis/trial/v3/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Race Rankings Returns a list in ascending order for the race to the ATP/WTA finals ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/race_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.com") conn.request("GET", "/tennis/trial/v3/en/race_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.com/tennis/trial/v3/en/race_rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Race Rankings feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/`{language_code}`/race_rankings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Rankings Returns a list in ascending order of ATP/WTA world rankings ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/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.com") conn.request("GET", "/tennis/trial/v3/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.com/tennis/trial/v3/en/rankings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Rankings feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/`{language_code}`/rankings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (production) or Trial (trial). | | `version` | Version number of the API you are accessing (Current Version: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Season Competitors Displays a listing of all competitors with respective IDs that compete in a given season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/seasons/sr:season:74057/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.com") conn.request("GET", "/tennis/trial/v3/en/seasons/sr:season:74057/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/tennis/trial/v3/en/seasons/sr:season:74057/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `season_id` | Id of a given season | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Season Info Displays information about a season and lists competitors with respective IDs. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/seasons/sr:season:74057/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.com") conn.request("GET", "/tennis/trial/v3/en/seasons/sr:season:74057/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/tennis/trial/v3/en/seasons/sr:season:74057/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `season_id` | Id of a given season | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## 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/tennis/trial/v3/en/seasons/sr:season:74057/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.com") conn.request("GET", "/tennis/trial/v3/en/seasons/sr:season:74057/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/tennis/trial/v3/en/seasons/sr:season:74057/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `season_id` | Id of a given season | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Season Standings Provides standings info for relevant tournaments, given a season ID. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/seasons/sr:season:74431/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.com") conn.request("GET", "/tennis/trial/v3/en/seasons/sr:season:74431/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/tennis/trial/v3/en/seasons/sr:season:74431/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `season_id` | Id of a given season | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Season Probabilities Provides sport event probabilities for various match markets and outcomes. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/seasons/sr:season:61767/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.com") conn.request("GET", "/tennis/trial/v3/en/seasons/sr:season:61767/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/tennis/trial/v3/en/seasons/sr:season:61767/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `season_id` | Id of a given season | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Season Summaries Returns the sport event summaries for a given season ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/seasons/sr:season:74057/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.com") conn.request("GET", "/tennis/trial/v3/en/seasons/sr:season:74057/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/tennis/trial/v3/en/seasons/sr:season:74057/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `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/tennis/trial/v3/en/seasons/sr:season:74057/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.com")

conn.request("GET", "/tennis/trial/v3/en/seasons/sr:season:74057/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/tennis/trial/v3/en/seasons/sr:season:74057/summaries.xml?api_key={your_api_key}&start=0&limit=75'
In addition to the URL parameters listed above, you can paginate the summaries 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, maximum value is 200.
Example: limit=75 | Return to top ## 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/tennis/trial/v3/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.com") conn.request("GET", "/tennis/trial/v3/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/tennis/trial/v3/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Sport Event Summary Returns information for a match including live updates and statistics ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/sport_events/sr:sport_event:24216873/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.com") conn.request("GET", "/tennis/trial/v3/en/sport_events/sr:sport_event:24216873/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/tennis/trial/v3/en/sport_events/sr:sport_event:24216873/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/tennis/`{access_level}`/`{version}`/`{language_code}`/sport_events/`{sport_event_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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `sport_event_id` | id of the sport event. | | `format` | xml or json. | Return to top ## Sport Event Timeline Returns information for a given sport event ID including a timeline of events, (point-by-point or Game-by-Game depending on the coverage) and some basic stats ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/en/sport_events/sr:sport_event:24025503/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.com") conn.request("GET", "/tennis/trial/v3/en/sport_events/sr:sport_event:24025503/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/tennis/trial/v3/en/sport_events/sr:sport_event:24025503/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `sport_event_id` | id of the sport event. | | `format` | xml or json. | Return to top ## Sport Events Created Returns a list of all sport events that have been created in the last 24 hours.
Note: Pagination will often be required to pull all data within this feed. By default, the feed will return 200 sport events.
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/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.com") conn.request("GET", "/tennis/trial/v3/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/tennis/trial/v3/en/sport_events/created.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Sport Events created feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/`{language_code}`/sport_events/created.`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.sportradar.com/tennis/trial/v3/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.com")

conn.request("GET", "/tennis/trial/v3/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.com/tennis/trial/v3/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. This may be required to access all available data in this feed. 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, maximum value is 1000.
Example: limit=75 | Return to top ## Sport Events Removed Returns a list of all sport events that have been removed from coverage
Note: Pagination will often be required to pull all data within this feed. By default, the feed will return 200 sport events.
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/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.com") conn.request("GET", "/tennis/trial/v3/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/tennis/trial/v3/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.sportradar.com/tennis/trial/v3/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.com")

conn.request("GET", "/tennis/trial/v3/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.com/tennis/trial/v3/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. This may be required to access all available data in this feed. 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, maximum value is 1000.
Example: limit=75 | Return to top ## Sport Events Updated Returns a list of all sport events that have been updated
Note: Pagination will often be required to pull all data within this feed. By default, the feed will return 200 sport events.
```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/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.com") conn.request("GET", "/tennis/trial/v3/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/tennis/trial/v3/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/tennis/`{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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | ### Optional Query String Parameters >Example including optional query string parameters:
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.sportradar.com/tennis/trial/v3/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.com")

conn.request("GET", "/tennis/trial/v3/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.com/tennis/trial/v3/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. This may be required to access all available data in this feed. 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, maximum value is 1000.
Example: limit=75 | Return to top ## Push Feeds >To best utilize Push feeds, we have included code samples in Ruby, Java and Python which provide an example of a way you can consume the feeds. Using these samples will output the feeds content to STDOUT.
For Java, we have also provided a Stream Client to assist your integration.

Note: In the provided Java sample, replace "URL GOES HERE" with the desired Push feed URL. ```ruby require 'httpclient' module Sportradar module HTTP module Stream class Client attr_reader :url, :logger def initialize(url, publisher, logger) @url = url @logger = logger @publisher = publisher @client = ::HTTPClient.new(:agent_name => 'SportsData/1.0') end def start @thread ||= Thread.new do logger.debug "Starting loop" @client.get_content(url, :follow_redirect => true) do |chunk| @publisher.publish(::JSON.parse(chunk)) if @publisher end logger.debug "finished loop" end end def stop @thread.terminate if @thread end end end end end ``` ```java package com.sportradar.http.stream.client; import org.junit.After; import org.junit.Before; import org.junit.Test; public class StreamClientTest { private StreamClient client; private static String SERVICE_URL = ""; @Before public void setup() { client = new StreamClient(); } @After public void cleanup() { client.terminate(); } @Test public void testStream() throws Exception { Handler handler = new ConsoleHandler(); client.stream(SERVICE_URL, handler); System.out.println("Connecting...."); Thread.sleep(1 * 60 * 1000); System.out.println("Disconnecting...."); } } ``` Some of our APIs include Push feeds that allow you to get updates as soon as they are available. Push API feeds automatically send XML and JSON payload to you via a push service, and can dramatically reduce the number of calls you need to make to our RESTful API feeds. The structure of the Push feeds are similar to the structure of the corresponding RESTful API feed (i.e. Push Events, and Push Statistics). The push service ensures reliable and efficient delivery of the most up to date information. Our Push services are based on a HTTP publish/subscribe model. When making a call to the Push APIs, you "subscribe" to various data feeds provided by our service; whenever new content is available on one of those feeds, the server pushes that information out to your client. When no new information is available on the feed, a heartbeat message is sent every 5 seconds to keep the connection active. If you want to filter the results of the feeds, there are several optional query string parameters that can be applied to the API call. If left unfiltered, than all data for the feed is displayed (i.e. all games, events, or statistics). For your applications to accept data from our Push feeds, ensure that your application can: * Can follow a HTTP redirect or use the location provided in the feeds header within one minute of your initial request. * Can accept HTTP data transfer encoded as chunked. Our Push service does not provide a "stateful session", there is no memory of what data has been sent previously. If you are disconnected from the Push session, you can use the RESTful API to catch up or recover from the disconnection. Syntax for using our Push feeds and examples of the JSON payloads can be found below. ## Push Events Returns detailed, real-time information on every game event ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/stream/events/subscribe?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import requests import json r = requests.get("https://api.sportradar.com/tennis/trial/v3/stream/events/subscribe", params = {'api_key': 'your_api_key'}, allow_redirects=False) redirect_url = r.headers['Location'] r = requests.get(redirect_url, stream=True) for line in r.iter_lines(): # filter out keep-alive new lines if line: decoded_line = line.decode('utf-8') print(json.loads(decoded_line)) ``` ```shell curl -L GET 'api.sportradar.com/tennis/trial/v3/stream/events/subscribe?api_key={your_api_key}' ``` >The above command returns json like this. Access the Push Events feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/stream/events/subscribe?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: v3). | | `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/tennis/trial/v3/stream/events/subscribe?api_key={your_api_key}&format=json&competition_id=sr:competition:16126") 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/tennis/trial/v3/stream/events/subscribe", params = {'api_key': 'your_api_key', 'format': 'json', 'competition_id': 'sr:competition:16126'}, 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/tennis/trial/v3/stream/events/subscribe?api_key={your_api_key}&format=json&competition_id=sr:competition:16126' ``` In addition to the URL parameters listed above, you can filter the Events information with one or more of the following optional query string parameters.
Note: Optional query string parameters must be added after your API key with an ampersand (&). If you are filtering for more than one result, separate the results with a comma (,) and no spaces.
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `event_id` | Event id expressed as: {event_id}.
Example: event_id=point | | `format` | Format expressed as: {format}.
Example: format=json | | `sport_event_id` | Sport Event Id expressed as: {sport_event_id}.
Example: sport_event_id=sr:sport_event:27496678 | | `season_id` | Season Id expressed as: {season_id}.
Example: season_id=sr:season:81932 | | `competition_id` | Competition Id expressed as: {competition_id}.
Example: competition_id=sr:competition:16126 | Return to top ## Push Statistics Returns detailed game stats at the doubles team or player level ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis/trial/v3/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/tennis/trial/v3/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/tennis/trial/v3/stream/statistics/subscribe?api_key={your_api_key}' ``` > The above command returns json like this. Access the Push Statistics feed by replacing the parameters in the following URL: https://api.sportradar.com/tennis/`{access_level}`/`{version}`/stream/statistics/subscribe?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: v3). | | `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/tennis/trial/v3/stream/statistics/subscribe?api_key={your_api_key}&format=json&competition_id=sr:competition:16126") 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/tennis/trial/v3/stream/statistics/subscribe", params = {'api_key': 'your_api_key', 'format': 'json', 'competition_id': 'sr:competition:16126'}, 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/tennis/trial/v3/stream/statistics/subscribe?api_key={your_api_key}&format=json&competition_id=sr:competition:16126' ``` In addition to the URL parameters listed above, you can filter the Statistics information with one or more of the following optional query string parameters.
Note: Optional query string parameters must be added after your API key with an ampersand (&). If you are filtering for more than one result, separate the results with a comma (,) and no spaces.
Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `event_id` | Event id expressed as: {event_id}.
Example: event_id=point | | `format` | Format expressed as: {format}.
Example: format=json | | `sport_event_id` | Sport Event Id expressed as: {sport_event_id}.
Example: sport_event_id=sr:sport_event:27496678 | | `season_id` | Season Id expressed as: {season_id}.
Example: season_id=sr:season:81932 | | `competition_id` | Competition Id expressed as: {competition_id}.
Example: competition_id=sr:competition:16126 | Return to top ## 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. 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 ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis-probabilities/trial/v3/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.com") conn.request("GET", "/tennis-probabilities/trial/v3/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.com/tennis-probabilities/trial/v3/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/tennis-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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the OpenAPI Schema Definition for the Live Probabilities feed, use the following URL. https://api.sportradar.com/tennis-probabilities/trial/v3/openapi/swagger/index.html#/schedules/getScheduleLiveProbabilities ## Season Outright Probabilities ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis-probabilities/trial/v3/en/seasons/sr:season:78537/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.com") conn.request("GET", "/tennis-probabilities/trial/v3/en/seasons/sr:season:78537/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.com/tennis-probabilities/trial/v3/en/seasons/sr:season:78537/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/tennis-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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `season_id` | Id of a given season. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the OpenAPI Schema Definition for the Season Outright Probabilities feed, use the following URL. https://api.sportradar.com/tennis-probabilities/trial/v3/openapi/swagger/index.html#/seasons/getSeasonOutrightProbabilities ## Sport Event Probabilities ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis-probabilities/trial/v3/en/sport_events/sr:sport_event:27569530/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.com") conn.request("GET", "/tennis-probabilities/trial/v3/en/sport_events/sr:sport_event:27569530/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.com/tennis-probabilities/trial/v3/en/sport_events/sr:sport_event:27569530/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/tennis-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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `sport_event_id` | Id of a given sport event. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the OpenAPI Schema Definition for the Sport Event Probabilities feed, use the following URL. https://api.sportradar.com/tennis-probabilities/trial/v3/openapi/swagger/index.html#/sport_events/getSportEventAdvancedProbabilities ## Sport Event Upcoming Probabilities ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis-probabilities/trial/v3/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.com") conn.request("GET", "/tennis-probabilities/trial/v3/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.com/tennis-probabilities/trial/v3/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/tennis-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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the OpenAPI Schema Definition for the Sport Event Upcoming Probabilities feed, use the following URL. https://api.sportradar.com/tennis-probabilities/trial/v3/openapi/swagger/index.html#/sport_events/getSportEventsUpcomingProbabilities ## Timeline Probabilities ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/tennis-probabilities/trial/v3/en/sport_events/sr:sport_event:27569530/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.com") conn.request("GET", "/tennis-probabilities/trial/v3/en/sport_events/sr:sport_event:27569530/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.com/tennis-probabilities/trial/v3/en/sport_events/sr:sport_event:27569530/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/tennis-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: v3). | | `language_code` | English (en), Italian (it), German (de), French (fr), Swedish (se), Spanish (es), Russian (ru), Chinese simplified (zh), Chinese traditional (zht), Japanese (ja), Hindi (hi), Turkish (tr), Norwegian (no), Danish (da), Dutch (nl), Portuguese (pt), Finnish (fi), Thai (th), Hungarian (hu), Serbian (sr), Indonesian (id), Korean (ko), or Serbian Latin (srl). | | `sport_event_id` | Id of a given sport event. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the OpenAPI Schema Definition for the Timeline Probabilities feed, use the following URL. https://api.sportradar.com/tennis-probabilities/trial/v3/openapi/swagger/index.html#/sport_events/getSportEventTimelineProbabilities Return to top ## 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: 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/tennis/trial/v3/openapi/swagger/index.html

Q: Which statistics are considered extended match stats and which are standard stats?

A: Here are the extended match stats:

  • backhand_errors
  • backhand_unforced_errors
  • backhand_winners
  • volley_errors
  • volley_unforced_errors
  • volley_winners
  • forehand_errors
  • forehand_unforced_errors
  • forehand_winners
  • groundstroke_errors
  • groundstroke_unforced_errors
  • groundstroke_winners
  • lob_unforced_errors
  • lob_winners
  • overhead_errors
  • overhead_stroke_errors
  • overhead_winners
  • return_errors
  • return_unforced_errors
  • return_winners
  • service_unforced_errors
  • service_games_won
  • service_points_lost
  • service_points_won
  • tiebreaks_won
  • drop_shot_unforced_errors
  • drop_shot_winners

Q: When are standard match stats available?

A: Standard match stats are available whenever live point-by-point coverage is true.

Q: What are the standard match statistics?

A: Here are the available standard match stats:

  • aces
  • double_faults
  • games_won
  • max_games_in_a_row
  • max_points_in_a_row
  • points_won
  • breakpoints_won
  • total_breakpoints
  • first_serve_points_won
  • first_serve_successful
  • second_serve_points_won
  • second_serve_successful
  • aces
  • double_faults
  • second_serve_successful
  • second_serve_points_won

Q: What are the definitions for the various statistics?

A: Here are the definitions for the various statistics:

General definitions:

  • Racket arm: The arm with which the player serves and holds the racket. It is used to define if a player is right-handed or left-handed.
  • Stroke/Shot: The act of striking the ball with the racket.
  • Serve: Short for Service.
  • Server: The player who serves.
  • Returner/Receiver: The player who receives the serve.
  • Return: A shot used to hit back the serve.
  • Forehand: A shot hit from the racket-arm side of the body. The stroke used to return balls hit to the right side of a right-handed player and to the left side of a left-handed player. Forehands are commonly hit one-handed.
  • Backhand: A stroke in which the ball is struck on the opposite side of the body to the racket arm. The stroke is used to return balls hit to the left side of a right-handed player and to the right side of a left-handed player. Backhands are hit either one-handed or two-handed.
  • Groundstroke: A stroke made after the ball has bounced. The standard shot in tennis. Can be either forehand or backhand.
  • Volley: During play, a shot where the ball is hit before it bounces. Can be either forehand or backhand.
  • Overhead: During play, a stroke made with the racket above the head in a motion similar to that of an overhand serve.
  • Drop Shot: A softly hit ball (usually with backspin) that drops near the net after crossing it. Is hit either as a groundstroke or a volley and can be either forehand or backhand.
  • Lob: A stroke that lifts the ball high in the air, usually over the head of the opponent at the net. Is hit either as a groundstroke or a volley and can be either forehand or backhand.

Sportradar Definition – Winners

  • Winner: A winner is any shot that is hit successfully into the opposite side of the court that the opponent can’t manage to get a shot at. It can either be a clean hit without any racket touch or where the opponent only manages to slightly touch the ball (racket clip). Important is that the opponent cannot manage to hit a proper shot. All the below specifications count as Winners in Statistics.
  • Ace: A ball that is served without an opponent (receiver) touching the ball with the racket (usually due to well executed serve)
  • Return winner: A direct winner hit when returning serve. Can be either forehand or backhand.
  • Groundstroke winner: A winner hit as a groundstroke. Can be either forehand or backhand.
  • Volley winner: A winner hit as a volley. Can be either forehand or backhand.
  • Overhead winner: A winner hit as an overhead shot.
  • Drop shot winner: A winner hit as a drop shot. Has to be either groundstroke or volley and can be either forehand or backhand.
  • Lob winner: A winner hit as a lob. Has to be either groundstroke or volley and can be either forehand or backhand.

Sportradar Definition – Forced errors

  • Forced error: An unsuccessful shot caused by an opponent`s good play. Primarily defined when the player who made the error is under time pressure or is on the move/on the defense during the shot execution. If one of those factors is true, then the player was forced into a difficult situation by a good shot and thus made a forced error. All the below specifications count as Forced Errors in Statistics.
  • Return forced error: A forced error caused by an opponent`s serve, player gets racket to the ball but is unable to put it in play (incl. Racket Clip).
  • Groundstroke forced error: A forced error while trying to hit a groundstroke. Can be either forehand or backhand.
  • Volley forced error: A forced error while trying to hit a volley. Can be either forehand or backhand.
  • Overhead forced error: A forced error while trying to hit an overhead shot.

Sportradar Definition – Unforced errors

  • Unforced error: An unsuccessful shot due to an error without being forced under pressure by the opponent. All the below specifications count as Unforced Errors in Statistics.
  • Double fault: Two faults served in a row. On a double fault, the server loses the point.
  • Return unforced error: An unforced error while trying to hit a return of serve. Can be either forehand or backhand.
  • Groundstroke unforced error: An unforced error while trying to hit a groundstroke. Can be either forehand or backhand.
  • Volley unforced error: An unforced error while trying to hit a volley. Can be either forehand or backhand.
  • Overhead unforced error: An unforced error while trying to hit an overhead shot.
  • Drop shot unforced error An unforced error while trying to hit a drop shot. Has to be either groundstroke or volley and can be either forehand or backhand.
  • Lob unforced error: An unforced error while trying to hit a lob. Has to be either groundstroke or volley and can be either forehand or backhand.

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: How do venues work for country vs country competitions?

A: In country vs country competitions such as Davis Cup and ATP Cup, venues on the parent matches refer to the complex in which the courts are located. On the child match level venue refers to the court where the match is played. Note that only the finals venue will be linked to complex attribute for the Davis Cup competition.

Q: How does sport event type work in the feeds?

A: The sport_event_type explicitly denotes the match type. Where there are competitions which have "parent matches" and "child matches" where country_format='true', such as Davis Cup and ATP Cup, this attribute will only appear on the "child match" node. The "parent match" sport_event node will have a "type='parent'" attribute and the "competition" node will have a "type='mixed'" attribute. Otherwise, for competitions where "country_format" is not present, the competition will have a type either "singles" or "doubles".

Q: How do I detect when one player has "advantage" in the case where the players both reached "40" or "deuce"?

A: The player who has "advantage" will have a score of "50" in the timeline, for example this is how a game was won by the receiver after a server committed a double_fault when the receiver was at "advantage":

In addition, when in a live situation the "game_state" node will display the following:

Q: Why do some players have height and weight data and others don't? 

A: Only the height and weight of the top 500 ranked players for ATP and WTA are included. There may be some instances where some players outside of the top 500 have these attributes but should not be relied upon.

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 later time
  • match_about_to_start – The match time has expired, awaiting play
  • 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 – The match is scheduled to be played
  • match_about_to_start – The match time has expired, awaiting play
  • start_delayed – The match has been temporarily delayed and will be continued. Matches are manually moved to this status 15 minutes after the scheduled start time.
  • 1st_set – First set
  • 2nd_set – Second set
  • 3rd_set – Third set
  • 4th_set – Fourth set
  • 5th_set – Fifth set
  • ended – The match is over
  • walkover - The match ended in a walkover
  • interrupted – The match began, but is stopped for a short time
  • suspended – The match began, but has been suspended to a later time
  • cancelled – The match has been cancelled and will not be played
  • postponed – The match has been postponed to a future date
  • retired – The match is incomplete as the result of one player
  • defaulted - The match has ended as a result of one player being disqualified

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

A: Find the node called: “coverage – type” which denotes if the match is covered at the sport_event or competition level. When type="sport_event" you will only get sport_event_properties. When type="competition" you will get sport_event_properties and competition_properties. Within coverage, scores states if the match is scored live or post. Extended stats show if we have enhanced stats for the sport event.

Q: Is the statistical data provided in the Tennis API official data?

A: Sportradar collects sports data independently. For some sports Sportradar is the official data provider. In the case of Tennis, we provide official data for ITF tournaments only.

Q: What prompts a match to appear in Sport Events Updated?

A: Changes to score, match status, or schedule in last 24 hours would cause a match to display in this endpoint.

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: 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 Competition 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 Soccer 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 competition, however, Sportradar covers tens of thousands of sport events across hundreds of leagues. For individual competition coverage, contact sales@sportradar.com

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.

Q: When are placeholder competitors used?

A: We will create fixtures in advance when details are confirmed (fixed draw competitions only). For competitors that have placeholder names, we will display virtual=”true” until the competitor qualifies for the match and replaces the placeholder. Placeholders are not used for qualifiers.

Return to top

Docs Navigation