Subscription to this function is not available for your account. To upgrade and receive access to this contact sales@datasportsgroup.com
v2 GET /cricket/get_competitions
Returns all competitions from an area.
Request URL
https://dsg-api.com/clients/{client_name}/cricket/get_competitions?client={client_name}&authkey={client_authkey}
Parameters
area_id
int
area to get the subareas or specific area from
authkey
string Required
client authentification key
client
string Required
unique client ID
ftype
string
changes feed type from XML to json (ftype=json)
lang
string
two-character language code, defaults to 'en'
Nodes
area
details about area
area_id
unique identifier for an area
country_code
three character country code
iso_code
official three character ISO code (not all areas will have an ISO code)
name
name of the area
parent_area_id
unique identifier of the parent area (either continent or World)
competition
details about competition
area_id
unique identifier for an area
area_name
name of the area
competition_id
unique identifier for a competition
format
competition format (domestic_league, domestic_cup, domestic_league_cup, domestic_super_cup, international_cup, international_super_cup, playoff, tournament, race, unofficial)
gender
determines the gender of the competition (male or female)
last_updated
When record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
name
name of the competition
type
determines if a competition is between club teams (club) or national teams (international)
datasportsgroup
details about the API version, sport, language and generation timestamp
generated_utc
UTC timestamp when the API output was generated
lang
language of the API call
sport
sport value
version
version of the API
method
details about the API function
method_id
unique ID of method
name
name of method
Response Headers
200
Success
401
Unauthorized
429
Too Many Requests
Code Samples
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://dsg-api.com/clients/{client_name}/cricket/get_competitions?client={client_name}&authkey={client_authkey}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "{User}:{Password}");
$content = curl_exec($ch);
curl_close($ch);
?>
curl GET -u "User:Password" "https://dsg-api.com/clients/{client_name}/cricket/get_competitions?client={client_name}&authkey={client_authkey}"
Imports System
Imports System.Net	
Imports System.IO
Imports System.Text

Public Module Module1
	Public Sub Main()
		Dim url As String = "https://dsg-api.com/clients/{client_name}/cricket/get_competitions?client={client_name}&authkey={client_authkey}"
		Dim myReq As WebRequest = WebRequest.Create(url)
		myReq.Credentials = new System.Net.NetworkCredential("{User}", "{Password}")
		Dim wr As WebResponse = myReq.GetResponse()
		Dim receiveStream As Stream = wr.GetResponseStream()
		Dim reader As StreamReader = New StreamReader(receiveStream, Encoding.UTF8)
		Dim content As String = reader.ReadToEnd()
	End Sub
End Module
response = requests.get("https://dsg-api.com/clients/{client_name}/cricket/get_competitions?client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example
200 Success
{"datasportsgroup":{"version":"1.0","sport":"cricket","lang":"en","method":{"method_id":"38","name":"get_competitions"},"competition":[{"competition_id":"2059","name":"Afghanistan Premier League","teamtype":"male","type":"club","format":"domestic_league","area_id":"8","area_name":"Afghanistan","cricket_type":"T20","last_updated":"2018-10-05 13:51:49"},{"competition_id":"1981","name":"Asia Cup","teamtype":"male","type":"international","format":"international_cup","area_id":"2","area_name":"Asia","cricket_type":"ODI","last_updated":"2018-08-20 12:41:46"},{"competition_id":"2067","name":"ICC World Twenty20 Qualifier","teamtype":"male","type":"international","format":"international_cup","area_id":"2","area_name":"Asia","cricket_type":"T20","last_updated":"2018-06-10 14:08:55"},{"competition_id":"2166","name":"ACC Western Region T20","teamtype":"male","type":"international","format":"international_cup","area_id":"2","area_name":"Asia","cricket_type":"T20","last_updated":"2019-01-21 22:37:40"},{"competition_id":"2211","name":"ICC World Twenty20 Qualifier","teamtype":"female","type":"international","format":"international_cup","area_id":"2","area_name":"Asia","cricket_type":"T20","last_updated":"2018-06-10 14:08:55"},{"competition_id":"2105","name":"ACC Emerging Teams Asia Cup","teamtype":"male","type":"international","format":"international_cup","area_id":"2","area_name":"Asia","cricket_type":"ODI","last_updated":"2018-06-10 14:08:55"},{"competition_id":"1797","name":"Big Bash League","teamtype":"male","type":"club","format":"domestic_league","area_id":"19","area_name":"Australia","cricket_type":"T20","last_updated":"2018-06-10 14:09:00"},{"competition_id":"1827","name":"Sheffield Shield","teamtype":"male","type":"club","format":"domestic_league","area_id":"19","area_name":"Australia","cricket_type":"Test","last_updated":"2018-03-23 20:52:48"},{"competition_id":"1829","name":"One-Day Cup","teamtype":"male","type":"club","format":"domestic_league","area_id":"19","area_name":"Australia","cricket_type":"ODI","last_updated":"2018-08-21 14:04:36"},{"competition_id":"1985","name":"Women's National Cricket League","teamtype":"female","type":"club","format":"domestic_league","area_id":"19","area_name":"Australia","cricket_type":"ODI","last_updated":"2018-08-21 14:04:36"},{"competition_id":"1986","name":"Women's Big Bash League","teamtype":"female","type":"club","format":"domestic_league","area_id":"19","area_name":"Australia","cricket_type":"T20","last_updated":"2018-08-21 14:04:36"},{"competition_id":"2132","name":"Bangladesh Premier League","teamtype":"male","type":"club","format":"domestic_league","area_id":"24","area_name":"Bangladesh","cricket_type":"T20","last_updated":"2018-12-24 00:34:59"},{"competition_id":"2165","name":"Twenty20 Cup","teamtype":"male","type":"club","format":"domestic_league","area_id":"68","area_name":"England","cricket_type":"T20","last_updated":"2019-01-21 08:09:59"},{"competition_id":"2315","name":"Royal London One-Day Cup","teamtype":"male","type":"club","format":"domestic_league","area_id":"68","area_name":"England","cricket_type":"ODI","last_updated":"2019-01-21 08:09:59"},{"competition_id":"2445","name":"Kia Super League","teamtype":"female","type":"club","format":"domestic_league","area_id":"68","area_name":"England","cricket_type":"T20","last_updated":"2019-01-21 08:09:59"},{"competition_id":"2421","name":"European Cricket League","teamtype":"male","type":"club","format":"international_cup","area_id":"7","area_name":"Europe","cricket_type":"T20","last_updated":"2019-01-05 03:12:48"},{"competition_id":"2431","name":"Euro T20 Slam","teamtype":"male","type":"club","format":"international_cup","area_id":"7","area_name":"Europe","cricket_type":"T20","last_updated":"2019-01-05 03:12:48"},{"competition_id":"1048","name":"Indian Premier League","teamtype":"male","type":"club","format":"domestic_league","area_id":"94","area_name":"India","cricket_type":"T20","last_updated":"2018-06-10 14:08:49"},{"competition_id":"2063","name":"Vijay Hazare Trophy","teamtype":"male","type":"club","format":"domestic_league","area_id":"94","area_name":"India","cricket_type":"ODI","last_updated":"2018-06-10 14:08:49"},{"competition_id":"2083","name":"Ranji Trophy","teamtype":"male","type":"club","format":"domestic_league","area_id":"94","area_name":"India","cricket_type":"Test","last_updated":"2018-10-30 15:15:22"},{"competition_id":"2189","name":"Syed Mushtaq Ali Trophy","teamtype":"male","type":"club","format":"domestic_league","area_id":"94","area_name":"India","cricket_type":"T20","last_updated":"2018-06-10 14:08:49"},{"competition_id":"2331","name":"Womens T20 Challenge","teamtype":"female","type":"club","format":"domestic_league","area_id":"94","area_name":"India","cricket_type":"T20","last_updated":"2019-04-08 15:46:07"},{"competition_id":"2365","name":"Saurashtra Premier League","teamtype":"male","type":"club","format":"domestic_league","area_id":"94","area_name":"India","cricket_type":"T20","last_updated":"2018-06-13 11:57:18"},{"competition_id":"2366","name":"T20 Mumbai League","teamtype":"male","type":"club","format":"domestic_league","area_id":"94","area_name":"India","cricket_type":"T20","last_updated":"2018-06-13 11:57:18"},{"competition_id":"2424","name":"Tamil Nadu Premier League","teamtype":"male","type":"club","format":"domestic_league","area_id":"94","area_name":"India","cricket_type":"T20","last_updated":"2018-06-13 11:57:18"},{"competition_id":"1992","name":"Caribbean Premier League","teamtype":"male","type":"club","format":"domestic_league","area_id":"4","area_name":"N\/C America","cricket_type":"T20","last_updated":"2018-08-23 15:14:24"},{"competition_id":"2084","name":"Pokhara Premier League","teamtype":"male","type":"club","format":"domestic_league","area_id":"137","area_name":"Nepal","cricket_type":"T20","last_updated":"2018-10-31 10:40:56"},{"competition_id":"2196","name":"Dhangadhi Premier League","teamtype":"male","type":"club","format":"domestic_league","area_id":"137","area_name":"Nepal","cricket_type":"T20","last_updated":"2018-10-31 10:40:56"},{"competition_id":"1989","name":"Plunket Shield","teamtype":"male","type":"club","format":"domestic_league","area_id":"141","area_name":"New Zealand","cricket_type":"Test","last_updated":"2018-08-23 15:14:24"},{"competition_id":"1990","name":"The Ford Trophy","teamtype":"male","type":"club","format":"domestic_league","area_id":"141","area_name":"New Zealand","cricket_type":"ODI","last_updated":"2018-08-23 15:14:24"},{"competition_id":"1991","name":"Super Smash","teamtype":"male","type":"club","format":"domestic_league","area_id":"141","area_name":"New Zealand","cricket_type":"T20","last_updated":"2018-12-24 00:34:04"},{"competition_id":"2259","name":"ICC World Twenty20 Qualifier","teamtype":"male","type":"international","format":"international_cup","area_id":"6","area_name":"Oceania","cricket_type":"T20","last_updated":"2018-06-10 14:08:55"},{"competition_id":"2164","name":"Pakistan Super League","teamtype":"male","type":"club","format":"domestic_league","area_id":"148","area_name":"Pakistan","cricket_type":"T20","last_updated":"2019-01-21 08:09:59"},{"competition_id":"2120","name":"National T20 Cup","teamtype":"male","type":"club","format":"domestic_league","area_id":"148","area_name":"Pakistan","cricket_type":"T20","last_updated":"2019-01-21 07:55:11"},{"competition_id":"2183","name":"One Day Cup","teamtype":"male","type":"club","format":"domestic_league","area_id":"175","area_name":"South Africa","cricket_type":"ODI","last_updated":"2019-02-05 19:31:29"},{"competition_id":"2094","name":"Mzansi Super League","teamtype":"male","type":"club","format":"domestic_league","area_id":"175","area_name":"South Africa","cricket_type":"T20","last_updated":"2019-02-05 19:31:29"},{"competition_id":"2058","name":"CSA T20 Challenge","teamtype":"male","type":"club","format":"domestic_league","area_id":"175","area_name":"South Africa","cricket_type":"T20","last_updated":"2019-02-05 19:31:29"},{"competition_id":"2302","name":"Super Provincial One Day Tournament","teamtype":"male","type":"club","format":"domestic_league","area_id":"177","area_name":"Sri Lanka","cricket_type":"ODI","last_updated":"2019-04-09 18:21:30"},{"competition_id":"2099","name":"T10 League","teamtype":"male","type":"club","format":"domestic_league","area_id":"202","area_name":"United Arab Emirates","cricket_type":"T10","last_updated":"2018-06-05 17:39:57"},{"competition_id":"1079","name":"Twenty20 Internationals","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"T20","last_updated":"2018-06-10 14:08:55"},{"competition_id":"1820","name":"ICC ODI Championship","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"ODI","last_updated":"2018-06-10 14:09:34"},{"competition_id":"1823","name":"ICC Test Championship","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"Test","last_updated":"2018-06-10 14:09:39"},{"competition_id":"1824","name":"ICC Cricket World Cup","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"ODI","last_updated":"2019-05-30 09:19:25"},{"competition_id":"1825","name":"ICC World Cup Qualifier","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"ODI","last_updated":"2018-03-23 20:52:48"},{"competition_id":"2320","name":"World Cricket League","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"ODI","last_updated":"2019-04-20 21:21:57"},{"competition_id":"2444","name":"ICC World Test Championship","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"Test","last_updated":"2019-07-29 13:42:13"},{"competition_id":"1757","name":"U19 Cricket World Cup","teamtype":"male youth","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"ODI","last_updated":"2018-06-06 11:36:52"},{"competition_id":"1993","name":"ICC Women's World Twenty20","teamtype":"female","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"T20","last_updated":"2018-08-23 15:14:24"},{"competition_id":"2057","name":"ICC Women's Championship","teamtype":"female","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"ODI","last_updated":"2018-10-05 07:53:54"},{"competition_id":"2056","name":"Women's Twenty20 International","teamtype":"female","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"T20","last_updated":"2018-06-10 14:08:55"},{"competition_id":"2422","name":"Women's ODI Internationals","teamtype":"female","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"ODI","last_updated":"2018-10-05 07:53:54"},{"competition_id":"2423","name":"Women's Test Internationals","teamtype":"female","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"Test","last_updated":"2018-10-05 07:53:54"},{"competition_id":"2066","name":"Non-ICC Test","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"Test","last_updated":"2018-10-31 14:56:44"},{"competition_id":"2065","name":"Non-ICC ODI","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"ODI","last_updated":"2018-10-31 14:56:44"},{"competition_id":"2420","name":"U19 ODI International","teamtype":"male youth","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"ODI","last_updated":"2018-10-31 14:56:44"},{"competition_id":"2064","name":"Non-ICC Twenty20 Internationals","teamtype":"male","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"T20","last_updated":"2018-10-31 14:56:44"},{"competition_id":"2085","name":"Non-ICC Twenty20 Internationals","teamtype":"female","type":"international","format":"international_cup","area_id":"1","area_name":"World","cricket_type":"T20","last_updated":"2018-10-31 14:05:47"}]}}