Note: Authentication is required for all API calls.
## Daily Schedule
```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.
To access the Daily Schedule, replace 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}`
Replace placeholders with the following query parameters:
| 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}`
## Daily Summary
```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.
This endpoint retrieves the Daily Summary information.
https://api.sportradar.us/cricket-`{access_level}{version}`/matches/`{year}`/`{month}`/`{day}`/summary.xml?api_key=`{your_api_key}`
Replace placeholders with the following query parameters:
| Parameter | Description |
| --------- | ----------- |
| `access_level` | Defines the access level of your API key as Production (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}`
## Match Summary
```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.
This endpoint retrieves the Match Summary information for a specific match.
https://api.sportradar.us/cricket-`{access_level}{version}`/matches/`{match_id}`/summary.xml?api_key=`{your_api_key}`
Replace placeholders with the following query parameters:
| Parameter | Description |
| --------- | ----------- |
| `access_level` | Defines the access level of your API key as Production (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}`
## Player Profile
```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.
This endpoint retrieves a Player Profile.
https://api.sportradar.us/cricket-`{access_level}{version}`/players/`{player_id}`/profile.xml?api_key=`{your_api_key}`
Replace placeholders with the following query parameters:
| Parameter | Description |
| --------- | ----------- |
| `access_level` | Defines the access level of your API key as Production (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}`
## Schedule
```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.
This endpoint retrieves the Schedule.
https://api.sportradar.us/cricket-`{access_level}{version}`/matches/schedule.xml?api_key=`{your_api_key}`
Replace placeholders with the following query parameters:
| Parameter | Description |
| --------- | ----------- |
| `access_level` | Defines the access level of your API key as Production (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}`
## Series Statistics
```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.
This endpoint retrieves the Series Statistics.
https://api.sportradar.us/cricket-`{access_level}{version}`/series/`{series_id}`/statistics.xml?api_key=`{your_api_key}`
Replace placeholders with the following query parameters:
| Parameter | Description |
| --------- | ----------- |
| `access_level` | Defines the access level of your API key as Production (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}`
## Team Hierarchy
```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.
This endpoint retrieves the Team Hierarchy.
https://api.sportradar.us/cricket-`{access_level}{version}`/teams/hierarchy.xml?api_key=`{your_api_key}`
Replace placeholders with the following query parameters:
| Parameter | Description |
| --------- | ----------- |
| `access_level` | Defines the access level of your API key as Production (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}`
## Team Profile
```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.
This endpoint retrieves the Team Profile.
https://api.sportradar.us/cricket-`{access_level}{version}`/teams/`{team_id}`/profile.xml?api_key=`{your_api_key}`
Replace placeholders with the following query parameters:
| Parameter | Description |
| --------- | ----------- |
| `access_level` | Defines the access level of your API key as Production (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}`
## 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?