Cricket v1

Frequently Asked Questions
API API Version
Cricket v1
Note: Authentication is required for all API calls.
## Cricket v1 API Map To best utilize the Cricket v1 API, you will need 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 Match Id
  2. Call the Match Summary feed using the Match Id
>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 Match Ids, Team Ids, or Series Ids which can be used to generate the match, player, team, and statistics feeds. ## Daily Schedule Provides scheduled match information, including series information, for all matches played on a given day. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cricket-t1/matches/2015/7/21/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-t1/matches/2015/7/21/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.us/cricket-t1/matches/2015/7/21/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-`{access_level}{version}`/matches/`{year}`/`{month}`/`{day}`/schedule.xml?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: 1). | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day in 2 digit format (DD). | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Daily Schedule, replace the parameters in the following URL. https://api.sportradar.us/cricket-`{access_level}{version}`/schema/matches-schedule.xsd?api_key=`{your_api_key}` Return to API map ## Daily Summary Provides match information and scoring, including player statistics, for all matches played on a given day. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cricket-t1/matches/2015/07/21/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-t1/matches/2015/07/21/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.us/cricket-t1/matches/2015/07/21/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this for post game, and live games. Access the Daily Summary feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-`{access_level}{version}`/matches/`{year}`/`{month}`/`{day}`/summary.xml?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: 1). | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day in 2 digit format (DD). | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Daily Summary, replace the parameters in the following URL. https://api.sportradar.us/cricket-`{access_level}{version}`/schema/matches-summary.xsd?api_key=`{your_api_key}` Return to API map ## Match Summary Provides match information and scoring, including player statistics. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cricket-t1/matches/15cf845f-6dd0-4004-8822-2d1b17dd4ed0/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-t1/matches/15cf845f-6dd0-4004-8822-2d1b17dd4ed0/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.us/cricket-t1/matches/15cf845f-6dd0-4004-8822-2d1b17dd4ed0/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this for post game, and live games. Access the Match Summary feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-`{access_level}{version}`/matches/`{match_id}`/summary.xml?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: 1). | | `match_id` | ID of a given match. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Match Summary, replace the parameters in the following URL. https://api.sportradar.us/cricket-`{access_level}{version}`/schema/matches-summary.xsd?api_key=`{your_api_key}` Return to API map ## Player Profile Provides player profile information. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cricket-t1/players/1cafe5fe-ba04-4773-bf3b-24cc29688fdd/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-t1/players/1cafe5fe-ba04-4773-bf3b-24cc29688fdd/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.us/cricket-t1/players/1cafe5fe-ba04-4773-bf3b-24cc29688fdd/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-`{access_level}{version}`/players/`{player_id}`/profile.xml?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: 1). | | `player_id` | ID for a given player. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Player Profile, replace the parameters in the following URL. https://api.sportradar.us/cricket-`{access_level}{version}`/schema/players-profile.xsd?api_key=`{your_api_key}` Return to API map ## Schedule Provides scheduled match information all covered series. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cricket-t1/matches/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-t1/matches/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.us/cricket-t1/matches/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Schedule feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-`{access_level}{version}`/matches/schedule.xml?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: 1). | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Schedule, replace the parameters in the following URL. https://api.sportradar.us/cricket-`{access_level}{version}`/schema/matches-schedule.xsd?api_key=`{your_api_key}` Return to API map ## Series Statistics Provides series level statistics for each player and match type. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cricket-t1/series/324e971e-2044-4fa6-bdb2-0c47c99da64e/statistics.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cricket-t1/series/324e971e-2044-4fa6-bdb2-0c47c99da64e/statistics.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cricket-t1/series/324e971e-2044-4fa6-bdb2-0c47c99da64e/statistics.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Series Statistics feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-`{access_level}{version}`/series/`{series_id}`/statistics.xml?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: 1). | | `series_id` | ID of a given series. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Series Statistics, replace the parameters in the following URL. https://api.sportradar.us/cricket-`{access_level}{version}`/schema/series-statistics.xsd?api_key=`{your_api_key}` Return to API map ## Team Hierarchy Series and team identification and association information for each series covered. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cricket-t1/teams/hierarchy.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-t1/teams/hierarchy.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cricket-t1/teams/hierarchy.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. Access the Team Hierarchy feed by replacing the parameters in the following URL: https://api.sportradar.us/cricket-`{access_level}{version}`/teams/hierarchy.xml?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: 1). | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Team Hierarchy, replace the parameters in the following URL. https:///api.sportradar.us/cricket-`{access_level}{version}`/schema/teams-hierarchy.xsd?api_key=`{your_api_key}` Return to API map ## Team Profile Provides team profile information, including current team roster. ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cricket-t1/teams/a0a815ad-108b-402c-b930-8c888f07dc01/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-t1/teams/a0a815ad-108b-402c-b930-8c888f07dc01/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.us/cricket-t1/teams/a0a815ad-108b-402c-b930-8c888f07dc01/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-`{access_level}{version}`/teams/`{team_id}`/profile.xml?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: 1). | | `team_id` | ID for a given team. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Team Profile, replace the parameters in the following URL. https://api.sportradar.us/cricket-`{access_level}{version}`/schema/teams-profile.xsd?api_key=`{your_api_key}` Return to API map ## 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 are the valid match status values and their definition?

A: Here are the valid match status values:

  • badlight – The match has been stopped due to bad lighting.
  • badweather – The match has been stopped due to bad weather.
  • break – The match is not over, it is currently at an inning break.
  • cancelled – The match has been cancelled.
  • closed – The match is over and the stats have been validated.
  • delay – The toss or the match start is currently delayed.
  • dinner – The match is not over, but the teams are taking a break for dinner.
  • drink – The match is not over, but the teams are taking a drink break.
  • inprogress – The match is in progress.
  • lunch – The match is not over, but the teams are taking a break for lunch.
  • postponed - The match has been postponed, to be made up at another day and time.
  • preview – The match will be starting soon.
  • rain – The match has been stopped due to rain.
  • scheduled - The match is scheduled to occur.
  • stump - The match is not over, but the umpires have declared the play is over for the day.
  • tea – The match is not over, but the teams are taking a break for tea.
  • unforeseen – The match has been stopped for an unknown reason.
  • wetoutfield – The match has been stopped due to wet outfield.

Q: What are the valid batting styles?

A: Here are the valid batting styles values:

  • left handed bat
  • right handed bat

Q: What are the valid bowling styles?

A: Here are the valid bowling styles values:

  • left-arm chinaman
  • left-arm fast
  • left-arm fast-medium
  • left-arm medium
  • left-arm orthodox
  • right-arm fast
  • right-arm fast-medium
  • right-arm legbreak
  • right-arm medium
  • right-arm offbreak

Q: What are the valid toss decision values?

A: Here are the valid toss decision values and their definitions:

  • batting – The coin toss winner has decided to bat.
  • fielding – The coin toss winner has decided to take the field.

Q: What are the possible batting outcome values?

A: Here are the valid match type values:

  • batting
  • bowled
  • caught
  • dnb
  • lbw
  • retired_hurt
  • retired_out
  • absent-hurt
  • runout
  • stumped
  • hitwicket

Q: What are the valid team type values?

A: Here are the valid match type values:

  • team
  • proxy

Q: What are the valid outcome values under match results?

A: Here are the valid outcome values:

  • draw
  • win
  • tie
  • abandon
  • no_result
Return to top

Docs Navigation