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_tables
Returns the league, home & away tables per season or round.
Request URL
https://dsg-api.com/clients/{client_name}/cricket/get_tables?type={type}&id={id}&client={client_name}&authkey={client_authkey}
Parameters
authkey
string Required
client authentification key
client
string Required
unique client ID
date
string
set a date in format yyyy-mm-dd as limit
ftype
string
changes feed type from XML to json (ftype=json)
gameweek
int
gameweek value to get table from
id
int Required
object id to return
lang
string
two-character language code, defaults to 'en'
live
string
only 'yes' is valid which will provide a live table
type
string Required
type is either "season" or "round"
Nodes
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
list
details about list type
aggregation_type
aggregation type (scores or wins)
id
unique identifier for a group if type = group, if type = playoff then for a playoff
last_updated
When record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
name
name of either a group or playoff
score_a
playoff score of team_a
score_b
playoff score of team_b
type
list type (regular, group or playoff)
winner_team_id
unique identifier for the winning team of the playoff
method
details about the API function
method_id
unique ID of method
name
name of method
round
details about the round
end_date
end date, format 'yyyy-mm-dd'
end_date_utc
end date in UTC timezone, format 'yyyy-mm-dd'
end_time
end time, format 'HH:mm:ss'
end_time_utc
end time in UTC timezone, format 'HH:mm:ss'
last_updated
When record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
name
name of round
round_id
unique identifier of round
start_date
start date, format 'yyyy-mm-dd'
start_date_utc
start date in UTC timezone, format 'yyyy-mm-dd'.
start_time
start time, format 'HH:mm:ss'
start_time_utc
start time in UTC timezone, format 'HH:mm:ss'
type
determines if the round contains a table or a cup structure (knock-out)
season
details about the season
end_date
end date, format 'yyyy-mm-dd'
last_updated
When record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
logo
full path URL of logo for particular season
original_name
competition name during this season
season_id
unique identifier for season
start_date
start date, format 'yyyy-mm-dd'
title
title of season
table
details about the table entry (cricket)
area_id
unique identifier for an area
live
indicates if there is a live game for the team
matches_lost
value for total lost matches
matches_total
value for total played matches
matches_won
value for total won matches
net_run_rate
value for net run rate (NRR)
no_result
value for total no result matches
original_team_name
original team name during the season
points
value for total points gained
position
position value
runs_against
value for total runs against
runs_for
value for total runs scored
run_difference
value for total run difference
short_name
shortened name of the person
team_id
unique identifier of the team
team_name
current team name
tied
value for total tied matches
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_tables?type={type}&id={id}&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_tables?type={type}&id={id}&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_tables?type={type}&id={id}&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_tables?type={type}&id={id}&client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example
200 Success
{"datasportsgroup":{"version":"1.0","sport":"cricket","lang":"en","method":{"method_id":"28","name":"get_tables"},"competition":{"competition_id":"1048","name":"Indian Premier League","teamtype":"male","type":"club","format":"domestic_league","cricket_type":"T20","area_id":"94","area_name":"India","last_updated":"2018-06-10 14:08:49","season":{"season_id":"15641","title":"2018","original_name":"VIVO IPL","start_date":"2018-04-07","end_date":"2018-05-27","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/1048.png","last_updated":"2018-02-26 12:44:53","rounds":{"round_id":"20398","name":"Regular Season","start_date":"2018-04-07","end_date":"2018-05-20","type":"table","last_updated":"2018-02-26 12:02:04","total":{"table":[{"position":"1","team_id":"25801","team_name":"Sunrisers Hyerabad","short_name":"Sunrisers","original_team_name":"Sunrisers Hyerabad","zone":"Championship Playoffs","zone_id":"champ_playoffs","prev_season":"","form":"L,L,L,W,W","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"9","matches_lost":"5","matches_tied":"0","no_result":"0","points":"18","net_run_rate":"0.277"},{"position":"2","team_id":"25796","team_name":"Chennai Super Kings","short_name":"Chennai SK","original_team_name":"Chennai Super Kings","zone":"Championship Playoffs","zone_id":"champ_playoffs","prev_season":"","form":"W,L,W,L,W","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"9","matches_lost":"5","matches_tied":"0","no_result":"0","points":"18","net_run_rate":"0.26"},{"position":"3","team_id":"25800","team_name":"Kolkata Knight Riders","short_name":"Kolkata KR","original_team_name":"Kolkata Knight Riders","zone":"Championship Playoffs","zone_id":"champ_playoffs","prev_season":"","form":"W,W,W,L,L","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"8","matches_lost":"6","matches_tied":"0","no_result":"0","points":"16","net_run_rate":"-0.06"},{"position":"4","team_id":"25799","team_name":"Rajasthan Royals","short_name":"Rajasthan","original_team_name":"Rajasthan Royals","zone":"Championship Playoffs","zone_id":"champ_playoffs","prev_season":"","form":"W,L,W,W,W","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"7","matches_lost":"7","matches_tied":"0","no_result":"0","points":"14","net_run_rate":"-0.315"},{"position":"5","team_id":"25797","team_name":"Mumbai Indians","short_name":"Mumbai Indians","original_team_name":"Mumbai Indians","zone":"","zone_id":"","prev_season":"","form":"L,W,L,W,W","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"6","matches_lost":"8","matches_tied":"0","no_result":"0","points":"12","net_run_rate":"0.324"},{"position":"6","team_id":"25798","team_name":"Royal Challengers Bangalore","short_name":"RC Bangalore","original_team_name":"Royal Challengers Bangalore","zone":"","zone_id":"","prev_season":"","form":"L,W,W,W,L","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"6","matches_lost":"8","matches_tied":"0","no_result":"0","points":"12","net_run_rate":"0.129"},{"position":"7","team_id":"25803","team_name":"Kings XI Punjab","short_name":"Kings XI","original_team_name":"Kings XI Punjab","zone":"","zone_id":"","prev_season":"","form":"L,L,L,L,L","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"6","matches_lost":"8","matches_tied":"0","no_result":"0","points":"12","net_run_rate":"-0.524"},{"position":"8","team_id":"25802","team_name":"Delhi Capitals","short_name":"Delhi Capitals","original_team_name":"Delhi Daredevils","zone":"","zone_id":"","prev_season":"","form":"W,W,L,L,L","next_match_id":"","next_opponent_team_id":"","next_opponent_name":"","matches_total":"14","matches_won":"5","matches_lost":"9","matches_tied":"0","no_result":"0","points":"10","net_run_rate":"-0.127"}]},"home":{"table":[{"position":"1","team_id":"25796","team_name":"Chennai Super Kings","short_name":"Chennai SK","original_team_name":"Chennai Super Kings","matches_total":"7","matches_won":"6","matches_lost":"1","matches_tied":"0","no_result":"0","points":"12","net_run_rate":"0.865"},{"position":"2","team_id":"25801","team_name":"Sunrisers Hyerabad","short_name":"Sunrisers","original_team_name":"Sunrisers Hyerabad","matches_total":"7","matches_won":"5","matches_lost":"2","matches_tied":"0","no_result":"0","points":"10","net_run_rate":"0.354"},{"position":"3","team_id":"25799","team_name":"Rajasthan Royals","short_name":"Rajasthan","original_team_name":"Rajasthan Royals","matches_total":"7","matches_won":"5","matches_lost":"2","matches_tied":"0","no_result":"0","points":"10","net_run_rate":"0.193"},{"position":"4","team_id":"25802","team_name":"Delhi Capitals","short_name":"Delhi Capitals","original_team_name":"Delhi Daredevils","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"0.529"},{"position":"5","team_id":"25798","team_name":"Royal Challengers Bangalore","short_name":"RC Bangalore","original_team_name":"Royal Challengers Bangalore","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"0.177"},{"position":"6","team_id":"25800","team_name":"Kolkata Knight Riders","short_name":"Kolkata KR","original_team_name":"Kolkata Knight Riders","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"0.025"},{"position":"7","team_id":"25803","team_name":"Kings XI Punjab","short_name":"Kings XI","original_team_name":"Kings XI Punjab","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"-0.812"},{"position":"8","team_id":"25797","team_name":"Mumbai Indians","short_name":"Mumbai Indians","original_team_name":"Mumbai Indians","matches_total":"7","matches_won":"3","matches_lost":"4","matches_tied":"0","no_result":"0","points":"6","net_run_rate":"0.047"}]},"away":{"table":[{"position":"1","team_id":"25801","team_name":"Sunrisers Hyerabad","short_name":"Sunrisers","original_team_name":"Sunrisers Hyerabad","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"0.193"},{"position":"2","team_id":"25800","team_name":"Kolkata Knight Riders","short_name":"Kolkata KR","original_team_name":"Kolkata Knight Riders","matches_total":"7","matches_won":"4","matches_lost":"3","matches_tied":"0","no_result":"0","points":"8","net_run_rate":"-0.12"},{"position":"3","team_id":"25797","team_name":"Mumbai Indians","short_name":"Mumbai Indians","original_team_name":"Mumbai Indians","matches_total":"7","matches_won":"3","matches_lost":"4","matches_tied":"0","no_result":"0","points":"6","net_run_rate":"0.598"},{"position":"4","team_id":"25796","team_name":"Chennai Super Kings","short_name":"Chennai SK","original_team_name":"Chennai Super Kings","matches_total":"7","matches_won":"3","matches_lost":"4","matches_tied":"0","no_result":"0","points":"6","net_run_rate":"-0.347"},{"position":"5","team_id":"25798","team_name":"Royal Challengers Bangalore","short_name":"RC Bangalore","original_team_name":"Royal Challengers Bangalore","matches_total":"7","matches_won":"2","matches_lost":"5","matches_tied":"0","no_result":"0","points":"4","net_run_rate":"0.035"},{"position":"6","team_id":"25803","team_name":"Kings XI Punjab","short_name":"Kings XI","original_team_name":"Kings XI Punjab","matches_total":"7","matches_won":"2","matches_lost":"5","matches_tied":"0","no_result":"0","points":"4","net_run_rate":"-0.314"},{"position":"7","team_id":"25799","team_name":"Rajasthan Royals","short_name":"Rajasthan","original_team_name":"Rajasthan Royals","matches_total":"7","matches_won":"2","matches_lost":"5","matches_tied":"0","no_result":"0","points":"4","net_run_rate":"-0.793"},{"position":"8","team_id":"25802","team_name":"Delhi Capitals","short_name":"Delhi Capitals","original_team_name":"Delhi Daredevils","matches_total":"7","matches_won":"1","matches_lost":"6","matches_tied":"0","no_result":"0","points":"2","net_run_rate":"-0.794"}]}}}}}}