Cricket v2

Frequently Asked Questions
Quick Access
Postman Collection XSD Schema
Download
## Cricket API Overview The Cricket API provides real-time scoring, detailed match statistics (when available), and an array of supplementary data. 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
  • Detailed ball-by-ball data
  • Match lineups
  • Seasonal statistics
  • Unique fielding data points
API API Version
Cricket v2
Note: Authentication is required for all API calls.
## Data Source Upgrade Our upgraded Cricket v2 API is official for ICC, ECB and Caribbean Premier League. See the below Content Strategy link for detailed info. While this enhancement mapped out new data to our existing attributes, there are some attributes that we will not be replacing. Details of this can be found in the Data Mapping document, with all data available documented here. The new dataset will also include each of the below features: - Custom-designed for cricket with multi-mode capability to ensure the lowest latency in the market. - Unique fielding data points exclusive to Sportradar - Ball tracking for shot and delivery, type coding and AI-powered automated text commentary. - Automated system monitoring platform redundancy to ensure reliable, uninterrupted service.
To access the below endpoints request our Cricket v2 Legacy API. These will be added to our upgraded Cricket v2 in the near future.
  • Tournament Leaders
  • Tournament Squad
## 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-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-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-t2/en/schedules/live/schedule.xml?api_key={your_api_key}" ``` Access the Daily Live Schedule feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/schedules/2017-03-16/results.xml?api_key={your_api_key}" ``` Access the Daily Results feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/schedules/2017-03-16/schedule.xml?api_key={your_api_key}" ``` Access the Daily Schedule feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-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.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-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.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-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.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-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.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/players/sr:player:646278/profile.xml?api_key={your_api_key}" ``` Access the Player Profile feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/teams/sr:competitor:107203/profile.xml?api_key={your_api_key}" ``` Access the Team Profile feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/teams/sr:competitor:107203/results.xml?api_key={your_api_key}" ``` Access the Team Results feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/teams/sr:competitor:152316/schedule.xml?api_key={your_api_key}" ``` Access the Team Schedule feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/teams/sr:competitor:107203/versus/sr:competitor:142690/matches.xml?api_key={your_api_key}" ``` Access the Team vs Team feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/tours.xml?api_key={your_api_key}" ``` Access the Tour List feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/tournaments/sr:tournament:2472/info.xml?api_key={your_api_key}" ``` Access the Tournament Info feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `tournament_id or season_id` | ID for a given tournament or season. | | `format` | xml or json. | | `your_api_key` | Your API key. | Return to top ## Tournament Leaders Provides leaders in a given tournament or season for a variety of stats including 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-t2/en/tournaments/sr:season:69330/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-t2/en/tournaments/sr:season:69330/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-t2/en/tournaments/sr:season:69330/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.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `tournament_id or season_id` | ID for a given tournament or season. | | `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-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-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-t2/en/tournaments.xml?api_key={your_api_key}" ``` Access the Tournament List feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `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-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-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-t2/en/tournaments/sr:tournament:15103/results.xml?api_key={your_api_key}" ``` Access the Tournament Results feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `tournament_id or season_id` | ID for a given tournament or season. | | `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-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-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-t2/en/tournaments/sr:tournament:2472/schedule.xml?api_key={your_api_key}" ``` Access the Tournament Schedule feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `tournament_id or season_id` | ID for a given tournament or season. | | `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-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-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-t2/en/tournaments/sr:tournament:2472/seasons.xml?api_key={your_api_key}" ``` Access the Tournament Seasons feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `tournament_id or season_id` | ID for a given tournament or season. | | `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-t2/en/tournaments/sr:season:93975/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-t2/en/tournaments/sr:season:93975/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-t2/en/tournaments/sr:season:93975/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.com/cricket-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id or season_id}`/teams/`{competitor_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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `tournament_id or season_id` | ID for a given tournament or season. | | `competitor_id` | ID for a given competitor. | | `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-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-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-t2/en/tournaments/sr:tournament:14892/standings.xml?api_key={your_api_key}" ``` Access the Tournament Standings feed by replacing the parameters in the following URL: https://api.sportradar.com/cricket-`{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` | 2 letter code for supported languages

English (en) is the only fully supported language for this API. | | `tournament_id or season_id` | ID for a given tournament or season. | | `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: How can I find the values for various enum data points within the API?

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://schemas.sportradar.com/sportsapi/cricket/v2/openapi/swagger/index.html

Q: What valid languages do you support?

A: Currently only English (en)

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

A: This is available in our coverage properties within Sport Event Timeline. Coverage levels are:

  • Post-match - Lowest level of coverage. Data is entered after the completion of the match
  • Core - Includes basic data such as scores, players, current over stats, required run rate
  • Advanced - More granular coverage. Includes more datapoints such as shot and ball types, wagon wheel data
  • Fielding - More enhanced coverage currently only for major ICC events (World Cup Mens, Womens, U19) and the Caribbean Premier League (CPL). Data points include richer data for fielding events, fielding position coordinates and multiple-player events

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 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: 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 does the `batting_params.trace` attribute represent?

A: The `trace` attribute is a Boolean value signifying whether or not the ball was hit in the air.

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