Cricket Legacy v2

Frequently Asked Questions
API API Version XSD Schema
Cricket v2 Download
The Cricket Legacy v2 API is reserved for existing Cricket customers prior to September 2023. For our current Cricket data, please see the Cricket v2 docs.
## Cricket API Overview The Cricket API provides real-time scoring, detailed match statistics (when available), and an array of supplementary data. Select the Cricket 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 schedules, competitions, team and player data, and real-time scores. Additional feeds provide a host of complementary stats, including: 
  • Standings
  • Player profiles
  • Team profiles
  • Historical results
  • Match lineups
  • Seasonal statistics
  • Match win probabilities
  • Live pitch and field coordinates
API API Version
Cricket v2
Note: Authentication is required for all API calls.
## Cricket v2 API Map To best utilize the Cricket 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 statistics of a match: >
  1. Call the Daily Schedule for the day the match takes place and find the associated Sport Event Id
  2. Call the Match Summary feed using the Sport Event Id for your match
>The statistics for this match are now displayed. The primary feeds require only a date or human-readable parameters to call the endpoints. Those feeds provide Sport Event Ids, Competitor Ids, or Season Ids which can be used to generate the match, team, and tournament feeds. ## Daily Live Schedule Provides scheduled match information for all matches being played live. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/schedules/live/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/schedules/live/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/cricket-historical-t2/en/schedules/live/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Daily Live Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/schedules/live/schedule.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Daily Results Provides a summary of all matches played on a given day. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/schedules/2017-03-16/results.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/schedules/2017-03-16/results.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/cricket-historical-t2/en/schedules/2017-03-16/results.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Daily Results feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/schedules/`{year}`-`{month}`-`{day}`/results.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day in 2 digit format (DD). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Daily Schedule Provides schedule information for all matches played on a given day. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/schedules/2017-03-16/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/schedules/2017-03-16/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/cricket-historical-t2/en/schedules/2017-03-16/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Daily Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/schedules/`{year}`-`{month}`-`{day}`/schedule.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day in 2 digit format (DD). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Match Lineups Provides lineups and batting order for a given match. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/matches/sr:match:11233407/lineups.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/matches/sr:match:11233407/lineups.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/cricket-historical-t2/en/matches/sr:match:11233407/lineups.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Match Lineups feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/matches/`{match_id}`/lineups.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `match_id` | ID for a given match. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Match Probabilities Provides 2-way probabilities (home team win, away team win) for a given match. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/matches/sr:match:11233407/probabilities.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/matches/sr:match:11233407/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/cricket-historical-t2/en/matches/sr:match:11233407/probabilities.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Match Probabilities feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/matches/`{match_id}`/probabilities.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `match_id` | ID for a given match. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Match Summary Provides real-time match-level statistics for a given match. Including results and player and team stats. Please note that data returned is determined by coverage level. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/matches/sr:match:11233407/summary.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/matches/sr:match:11233407/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/cricket-historical-t2/en/matches/sr:match:11233407/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Match Summary feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/matches/`{match_id}`/summary.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `match_id` | ID for a given match. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Match Timeline Provides real-time match-level statistics and a play-by-play event timeline for a given match. This includes player and team stats, scoring info, batting and bowling parameters, and human-readable event descriptions. Please note that data returned is determined by coverage level. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/matches/sr:match:11233407/timeline.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/matches/sr:match:11233407/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/cricket-historical-t2/en/matches/sr:match:11233407/timeline.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Match Timeline feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/matches/`{match_id}`/timeline.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `match_id` | ID for a given match. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Match Timeline (Delta) This endpoint retrieves the Match Timeline delta. During a live match, the timeline delta provides all the same data as the match timeline feed, but in 5 minute increments. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/matches/sr:match:11233407/timeline/delta.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/matches/sr:match:11233407/timeline/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/cricket-historical-t2/en/matches/sr:match:11233407/timeline/delta.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Match Timeline Delta feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/matches/`{match_id}`/timeline/delta.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `match_id` | ID for a given match. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Player Profile Provides player information, including current and historical team membership info, and statistics broken down by match format. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/players/sr:player:646278/profile.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/players/sr:player:646278/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/cricket-historical-t2/en/players/sr:player:646278/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Player Profile feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/players/`{player_id}`/profile.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `player_id` | ID of a given player. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Team Profile Provides team information and statistics by season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/teams/sr:competitor:107203/profile.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/teams/sr:competitor:107203/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/cricket-historical-t2/en/teams/sr:competitor:107203/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Team Profile feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/teams/`{team_id}`/profile.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `team_id` | ID of a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Team Results Provides match info and statistics for the past 10 matches for a given team. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/teams/sr:competitor:107203/results.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/teams/sr:competitor:107203/results.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/cricket-historical-t2/en/teams/sr:competitor:107203/results.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Team Results feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/teams/`{team_id}`/results.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `team_id` | ID of a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Team Schedule Provides match schedule information for a given team. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/teams/sr:competitor:152316/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/teams/sr:competitor:152316/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/cricket-historical-t2/en/teams/sr:competitor:152316/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Team Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/teams/`{team_id}`/schedule.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `team_id` | ID of a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Team Versus Team Provides previous and upcoming meetings between two teams including results. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/teams/sr:competitor:107203/versus/sr:competitor:142690/matches.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/teams/sr:competitor:107203/versus/sr:competitor:142690/matches.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/cricket-historical-t2/en/teams/sr:competitor:107203/versus/sr:competitor:142690/matches.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Team vs Team feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/teams/`{team_id}`/versus/`{team_id2}`/matches.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `team_id` | ID of a given team. | | `team_id2` | Id of a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tour List Provides a list of all available Cricket Tours. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tours.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tours.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/cricket-historical-t2/en/tours.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tour List feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tours.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tour Schedule Provides all scheduled matches for a tour. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tours/sr:tour:15540/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tours/sr:tour:15540/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/cricket-historical-t2/en/tours/sr:tour:15540/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tour Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tours/`{tour_id}`/schedule.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `tour_id` | ID of a given tour. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tournament Info Provides information for a given tournament or season, including current season, participating teams, and tournament structure. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tournaments/sr:tournament:2472/info.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tournaments/sr:tournament:2472/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/cricket-historical-t2/en/tournaments/sr:tournament:2472/info.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Info feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/info.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `tournament_id or season_id` | ID for a given tournament or seasons. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tournament Leaders Provides a list of leaders in a given tournament or season for top runs, top average, top wickets, top bowling average, top economy, and top catches. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tournaments/sr:tournament:2472/leaders.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tournaments/sr:tournament:2472/leaders.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/cricket-historical-t2/en/tournaments/sr:tournament:2472/leaders.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Leaders feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/leaders.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `tournament_id or season_id` | ID for a given tournament or seasons. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tournament List Provides a list of all available Cricket Tournaments. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tournaments.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tournaments.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/cricket-historical-t2/en/tournaments.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament List feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tournaments.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tournament Results Provides results for all matches within a given tournament or season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tournaments/sr:tournament:15103/results.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tournaments/sr:tournament:15103/results.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/cricket-historical-t2/en/tournaments/sr:tournament:15103/results.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Results feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/results.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `tournament_id or season_id` | ID for a given tournament or seasons. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tournament Schedule Provides scheduling information for all matches within a given tournament or season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tournaments/sr:tournament:2472/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tournaments/sr:tournament:2472/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.com/cricket-historical-t2/en/tournaments/sr:tournament:2472/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/schedule.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `tournament_id or season_id` | ID for a given tournament or seasons. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tournament Seasons Provides a list of current and past season IDs for a given tournament. Season IDs can be interchanged with tournament IDs to retrieve historical data. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tournaments/sr:tournament:2472/seasons.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tournaments/sr:tournament:2472/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/cricket-historical-t2/en/tournaments/sr:tournament:2472/seasons.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Seasons feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/seasons.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `tournament_id or season_id` | ID for a given tournament or seasons. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tournament Squads Provides squad lineups for a given tournament or season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tournaments/sr:tournament:2472/teams/sr:competitor:152316/squads.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tournaments/sr:tournament:2472/teams/sr:competitor:152316/squads.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/cricket-historical-t2/en/tournaments/sr:tournament:2472/teams/sr:competitor:152316/squads.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Squads feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/teams/`{team_id}`/squads.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `tournament_id or season_id` | ID for a given tournament or seasons. | | `team_id` | ID for a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tournament Standings Provides detailed standings info for a given season. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.com/cricket-historical-t2/en/tournaments/sr:tournament:14892/standings.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-historical-t2/en/tournaments/sr:tournament:14892/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/cricket-historical-t2/en/tournaments/sr:tournament:14892/standings.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Tournament Standings feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-historical-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/standings.`{format}`?api_key=`{your_api_key}` | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 2). | | `language_code` | English (en). | | `tournament_id or season_id` | ID for a given tournament or seasons. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Frequently Asked Questions

Q: What format are date fields presented in?

A: When we present date only values we present these in the ISO 8601 standard format.
ex: 2013-04-03
We use these for attributes that have date and no time (such as birthdate). For more information: https://en.wikipedia.org/wiki/ISO_8601

Q: What format are the date/time fields presented in?

A: All of our Date/Time attributes are in UTC, presented in the ISO 8601 standard format.
ex: 2013-04-03T18:15:00+00:00
For more information: https://en.wikipedia.org/wiki/ISO_8601

Q: What valid languages you support?

A: Currently only English (en)

Q: What are the valid outcomes for probabilities?

A: Here are the valid outcome probabilities:

  • home_team_winner
  • away_team_winner
  • draw

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

A: Find the node called: coverage_info. The attribute live_coverage reports whether Sportradar has live coverage of the match or not.

Q: When are Team and Player seasonal statistics calculated?

A: Team and Player Season Statistics are updated shortly after the match goes to “Match Ended” status.

Q: What are the possible weather conditions?

A: Here are the possible weather conditions:

  • bright_and_sunny
  • cool
  • hot_and_humid
  • raining
  • overcast

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

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

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

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

Q: How far back does the Timeline Delta feed go?

A: 5 mins during a live match. When the match isn’t live, the timeline node isn’t displayed in the Match Timeline feed.

Q: What are the possible event types?

A: Here are the possible event types conditions:

  • boundary
  • six
  • wicket
  • general
  • weather
  • toss
  • power_play
  • next_batsman_in
  • change_of_bowler
  • new_record
  • milestone
  • highlight
  • change_of_ball
  • slow_over_rate
  • penalty
  • free_hit
  • play_halted
  • drinks
  • lunch
  • tea
  • dinner
  • time-out
  • innings_break
  • stumps
  • close_of_play
  • super_over
  • rain_stoppage
  • bad_light
  • udrs
  • significant_event
  • match_started
  • period_start
  • ball

Q: What are the valid tournament types?

A: Here are the valid tournament types:

  • test
  • odi
  • t20i
  • list_a
  • first_class
  • t20

Q: How is distance traveled measured?

A: Distance traveled is defined by a simple integer that defines the scope of travel.

  • 1 – Very Short (under 15 yards)
  • 2 – Short (between 15 and 30 yards)
  • 3 – Medium (between 30 and 50 yards)
  • 4 – Full (approximately 60 yards, or the edge of the outfield)
  • 5 – Edge (used for boundaries)
  • 6 – Out (over the boundary on the full, used for sixes)

Q: What are the valid dismissal details?

A: Here are the valid dismissal details:

  • bowled
  • caught
  • caught_and_bowled
  • lbw
  • run_out
  • stumped
  • handled_the_ball
  • hit_wicket
  • retired_hurt
  • retired_out
  • hit_the_ball_twice
  • obstructing_the_field
  • timed_out

Q: What are the valid “sport_event_status – status” values?

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

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

Q: What are the valid “sport_event_status – match_status” values?

A: Here are the valid match status values and their definitions:

  • awaiting_super_over
  • dinner
  • drinks
  • ended
  • first_innings_away
  • first_innings_home
  • fourth_innings_away
  • fourth_innings_home
  • innings_break
  • interrupted
  • lunch_break
  • second_innings_away
  • second_innings_home
  • stumps
  • super_over
  • tea_break
  • third_innings_away
  • third_innings_home

Q: What are the valid dismissal decision reasons?

A: Here are the valid dismissal decisions:

  • no_contact_with_the_ball
  • batsman_knicked_the_ball
  • too_high_to_attempt
  • too_wide_to_attempt
  • hit_in_line_with_the_stumps
  • hit_outside_the_line_of_the_stumps
  • height_of_the_ball
  • batsman_well_forward
  • bowler_overstepped
  • bowler_did_not_overstep
  • batsman_safe
  • batsman_short_of_crease
  • benefit_of_doubtt

Q: What are the valid delivery types for bowling parameters?

A: Here are the valid delivery types:

  • angled_away
  • angled_in
  • arm_ball
  • beamer
  • bouncer
  • carrom_ball
  • chinaman
  • doosra
  • flipper
  • full_toss
  • googly
  • in_swinger
  • left_arm_orthodox
  • leg_cutter
  • leg_spin
  • normal
  • off_cutter
  • off_spin
  • out_swinger
  • reverse_swing
  • seamed_in
  • seamed_out
  • slider
  • slow_ball
  • slow_bouncer
  • top_spin
  • wide_yorker
  • yorker

Q: What are the possible statuses within Sport Event Status?

A: Here are the valid statuses:

  • match_delayed_due_to_wet
  • match_abandoned
  • ground_conditions
  • bad_ground_condition
  • bad_light
  • bad_pitch
  • bad_weather_condition
  • crowd_invasion
  • crowd_trouble
  • dinner
  • drinks
  • fog
  • innings_break
  • light_failure
  • lunch
  • match_abandoned
  • match_ended
  • play_halted
  • rain_stoppage
  • stumps
  • super_over
  • in_progress
  • tea
  • wet_ground_condition
  • wet_pitch_condition

Q: What are the possible match result types within Sport Event Status?

A: Here are the valid match results types:

  • r - win by runs
  • w - win by wickets
  • i - win by an innings
  • t - match tied
  • a - match abandoned
  • d - match drawn

Q: What are the possible shot types within batting parameters?

A: Here are the valid shot types:

  • attacking
  • semi-attacking
  • defensive
  • left_alone

Q: What are the possible stroke types within batting parameters?

A: Here are the valid stroke types:

  • hook
  • pull_shot
  • flick
  • backfoot_punch
  • sweep
  • leg_glance
  • paddle_sweep
  • reverse_sweep
  • guided
  • upper_cut
  • square_cut
  • square_drive
  • punched
  • pushed
  • cover_drive
  • off_drive
  • straight_drive
  • on_drive
  • slog
  • lofted_shot
  • slog_sweep
  • chinese_cut
  • backfoot_defense
  • forward_defense
  • left_alone
  • deliberate_padding
  • ducked_
  • inside_out
  • switch-hit
  • scoop
  • helicopter_shot
  • normal
  • inside_edge
  • late_cut

Q: What are the possible connects within batting parameters?

A: Here are the valid connects:

  • middled
  • played_&_missed
  • left_alone
  • bottom_edge
  • inside_edge
  • outside_edge
  • top_edge
  • rapped_on_pads
  • hit_on_glove
  • hit_on_helmet
  • hit_on_foot
  • hit_on_body
  • other

Q: What are the possible values for fielding positions within dismissal details?

A: Here are the valid fielding positions:

  • square_leg
  • deep_square_leg
  • backward_sq._leg
  • deep_backward_sq._leg
  • leg_gully
  • leg_slip
  • short_fine_leg
  • deep_fine_leg
  • wicket-keeper
  • 1st_slip
  • 2nd_slip
  • 3rd_slip
  • 4th_slip
  • gully
  • short_third_man
  • deep_third_man
  • point
  • backward_point
  • deep_backward_point
  • sweeper
  • cover_point
  • silly_point
  • short_cover
  • cover
  • deep_cover
  • extra_cover
  • deep_extra_cover
  • mid_off
  • short_mid_off
  • long_off
  • bowler
  • mid_on
  • short_mid_on
  • long_on
  • mid_wicket
  • short_mid_wicket
  • deep_mid_wicket
  • short_leg
  • square_short_leg
  • forward_short_lg
  • silly_mid_on
  • square_leg
  • fine_leg
  • third_man
  • deep_point
  • short_point

Q: How will a sport event behave when it is not covered with live scores?

A: When a sport_event is not covered live, the status and match_status will remain as not_started until results are entered post-match.

Q: What are the possible values for pitch info?

A: Here are the valid pitch conditions:

  • cracked
  • damp
  • dry
  • dusty
  • green

Q: What are the possible values for outfield info?

A: Here are the valid outfield conditions:

  • fast
  • slow_damp
  • slow_dewy
  • slow_grassy
  • slow_uneven

Q: What is the scale of the pitch (pitch_x, pitch_y) and strike zone (strike_zone_z)?

A: The pitch we use is 40 x 52, while the strike zone is 30 x 40. Here is a layout of each:

Q: What are the possible values for angle traversed and their meanings within batting parameters?

A: Here are the valid connects:

  • square_leg – (0-45)
  • fine_leg – (46-90)
  • third_man – (91-135)
  • point – (136–180)
  • cover – (181-225)
  • mid_off – (226-270)
  • mid_on – (271-315)
  • mid_wicket – (316-359)

Q: How do I locate the TTL (Time to Live)/cache on an API endpoint?

A: The cache (in seconds) can be accessed in the returned header information on each RESTful API call, under cache-control.
ex. cache-control: max-age=1, public, s-maxage=1 or
cache-control: public, must-revalidate, max-age=120

Return to top

Docs Navigation