Loading...

To get your Lifetime Free API key signup here

This section explains the basic working of Cricket Data API - it is not language specific. This can guide you in implementing the API for your favourite programming language. We also have quite a few Code Samples in different languages, - furthermore if you'd like to contribute please do reach out to us on contact@cricketdata.org! The Fantasy APIs may be found here.

Index

Generic Information

Generic API provide you supportive information.

A number of generic API are made available for your use - country, flags, banners and more. Any images / rich content provided is supported by our Global CDN so you can be assured of great performance no matter where you are based.

Important information to remember at all times: Every API response contains a generic 'info' object that tells you the result of your interaction with our systems. JSON keys tagged 'optional' may not exist in some scenarios, so please check for the presence of the key before reading it's value.


apikeyGuid Your subscription's API key. You may use different API keys based on your choice of subscription.
This is in a Guid format like 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.
statusString success / failure based on the API result
dataImportant An array / object containing the main data of the API. Sometimes the response data may have a large number of rows, and it's not possible to send all of them in a single query. One query is limited to 25 rows.
infoAn object explaining the result of the API
hitsTodayNumber Hits made today for the current API Key
hitsLimitNumber Limit on the hits for the current API Key
creditsNumber optional Credits in your account
serverNumber The ID of the server that served the current response
offsetRowsNumber Row offset, based on what you have requested
totalRowsNumber Total rows
queryTimeNumber Time (ms) taken to execute the current query
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "status": "success",  "info": {    "hitsToday": 10,    "hitsLimit": 500,    "credits": 0,    "server": 18,    "offsetRows": 0,    "totalRows": 249,    "queryTime": 10  }}

Countries with Flags

List of countries and flags

A comprehensive list of all countries with their corresponding flags (served from a CDN in Vector SVG format). Now you can always show flags of the countries that compete in the matches you choose to cover!



statusString success / failure based on the API result
dataAn array / object containing the main data of the API
idString Unique 2 letter Country ID
nameString Name of the Country
genericFlagURL URL of the Country's flag (generic)
fanartFlagURL optional Fan Art version of the Country's flag
Input
{  "apikey": "[your api key]",  "offset": 0}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": [    {      "id": "zw",      "name": "Zimbabwe",      "genericFlag": "https://cdorg.b-cdn.net/flags/generic/ZW.svg"    },    {      "id": "zm",      "name": "Zambia",      "genericFlag": "https://cdorg.b-cdn.net/flags/generic/ZM.svg"    },    {      "id": "za",      "name": "South Africa",      "genericFlag": "https://cdorg.b-cdn.net/flags/generic/ZA.svg"    }  ],  "status": "success",  "info": {    "hitsToday": 10,    "hitsLimit": 500,    "credits": 0,    "server": 18,    "offsetRows": 0,    "totalRows": 249,    "queryTime": 10  }}
Try out the API in real time
Code Playground

List APIs

These APIs give you a List of items

The common thing to keep in mind is that the 'data' field of the JSON response holds the array of data, and the method for parsing for all List type API is quite similar.


Cricket Series List

List of Series covered in Cricket Data

A Descending-Order (latest first) list of all series that we cover. Keep in mind that in some cases series or some matches in the series may only get partial coverage.



statusString success / failure based on the API result
dataAn array / object containing the main data of the API
idGuid Unique identifier for this Series
nameString Name & Year of the Series
startDateDate Start Date & Month of the Series
endDateDate End Date & Month of the Series
odiNumber Number of ODIs in this Series
t20Number Number of T20s in this Series
testNumber Number of Tests in this Series
squadsNumber Number of Squads for which data is loaded (series may have more squads for which data is pending / undeclared)
matchesNumber Number of Matches for which data is loaded (series may have more matches that are pending / undeclared)
Input
{  "apikey": "[your api key]",  "offset": 0}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": [    {      "id": "47b54677-34de-4378-9019-154e82b9cc1a",      "name": "Indian Premier League 2022",      "startDate": "Mar 26",      "endDate": "May 29",      "odi": 0,      "t20": 70,      "test": 0,      "squads": 10,      "matches": 70    },    {      "id": "ff5aa3f3-7164-4766-be90-3b64783257a0",      "name": "Australia Domestic One-Day Cup 2021-22",      "startDate": "Sep 22",      "endDate": "Mar 11",      "odi": 19,      "t20": 0,      "test": 0,      "squads": 0    }  ],  "status": "success",  "info": {    "hitsToday": 1,    "hitsLimit": 500,    "credits": 0,    "server": 18,    "offsetRows": 0,    "totalRows": 42,    "queryTime": 10  }}
Try out the API in real time
Code Playground

Cricket Series Search

Series Search function for Cricket API

List of all series that match the name specified. This is matches on Name and ShortName. Keep in mind that in some cases series or some matches in the series may only get partial coverage.



statusString success / failure based on the API result
dataAn array / object containing the main data of the API
idGuid Unique identifier for this Series
nameString Name & Year of the Series
startDateDate Start Date & Month of the Series
endDateDate End Date & Month of the Series
odiNumber Number of ODIs in this Series
t20Number Number of T20s in this Series
testNumber Number of Tests in this Series
squadsNumber Number of Squads for which data is loaded (series may have more squads for which data is pending / undeclared)
matchesNumber Number of Matches for which data is loaded (series may have more matches that are pending / undeclared)
Input
{  "apikey": "[your api key]",  "offset": 0,  "search": "IPL"}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": [    {      "id": "47b54677-34de-4378-9019-154e82b9cc1a",      "name": "Indian Premier League 2022",      "startDate": "Mar 26",      "endDate": "May 29",      "odi": 0,      "t20": 70,      "test": 0,      "squads": 10,      "matches": 70    }  ],  "status": "success",  "info": {    "hitsToday": 1,    "hitsLimit": 500,    "credits": 0,    "server": 18,    "offsetRows": 0,    "totalRows": 42,    "queryTime": 10  }}
Try out the API in real time
Code Playground

All Matches List

A large list of all matches covered

This API does give you a full list of matches; but keep in mind that using the Series Info API may be easier if you wish to cover just a few series.



statusString success / failure based on the API result
dataAn array / object containing the main data of the API
idGuid Unique identifier for this Match
nameString Name of the Match
matchTypeString Type of the match odi,t20,test
scoreObject optional Score of the match, in inning sequence
Contains Team, Inning, Runs, Wickets, Overs
statusString Latest Match status
venueString Venue of the Match
dateDate Date of the Match
dateTimeGMTDate Date and Time of the Match in GMT
(UTC+00) ISO Format YYYY-MM-DDTHH:mm:ss
teamsArray Names of the teams in JSON array
series_idGuid Unique identifier for the Series this Match is under
fantasyEnabledBoolean True only if Fantasy Scorecard / Squad / Ball-by-Ball are available for this match
Input
{  "apikey": "[your api key]",  "offset": 0}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": [    {      "id": "2d448290-d882-4e67-9a4a-f62dfea9a51a",      "name": "Western Australia vs New South Wales, Final",      "status": "Western Australia won by 18 runs",      "matchType": "odi",      "venue": "Junction Oval, Melbourne",      "date": "2022-03-10",      "dateTimeGMT": "2022-03-10T23:30:00",      "teams": [        "Western Australia",        "New South Wales"      ],      "score": [        {          "r": 207,          "w": 10,          "o": 46.3,          "inning": "Western Australia Inning 1"        },        {          "r": 225,          "w": 9,          "o": 50,          "inning": "New South Wales Inning 1"        }      ],      "series_id": "ff5aa3f3-7164-4766-be90-3b64783257a0",      "fantasyEnabled": false    }  ],  "status": "success",  "info": {    "hitsToday": 3,    "hitsLimit": 500,    "credits": 0,    "server": 18,    "offsetRows": 0,    "totalRows": 913,    "queryTime": 14.5072  }}
Try out the API in real time
Code Playground

Current Matches List

Current matches with a TossWinner but no MatchWinner

This API does give you a full list of CURRENT matches; but keep in mind that using the Series Info API may be easier if you wish to cover just a few series.



statusString success / failure based on the API result
dataAn array / object containing the main data of the API
idGuid Unique identifier for this Match
nameString Name of the Match
matchTypeString Type of the match odi,t20,test
scoreObject optional Score of the match, in inning sequence
Contains Team, Inning, Runs, Wickets, Overs
statusString Latest Match status
venueString Venue of the Match
dateDate Date of the Match
dateTimeGMTDate Date and Time of the Match in GMT
(UTC+00) ISO Format YYYY-MM-DDTHH:mm:ss
teamsArray Names of the teams in JSON array
series_idGuid Unique identifier for the Series this Match is under
fantasyEnabledBoolean True only if Fantasy Scorecard / Squad / Ball-by-Ball are available for this match
Input
{  "apikey": "[your api key]",  "offset": 0}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": [    {      "id": "2d448290-d882-4e67-9a4a-f62dfea9a51a",      "name": "Western Australia vs New South Wales, Final",      "status": "Western Australia won by 18 runs",      "matchType": "odi",      "venue": "Junction Oval, Melbourne",      "date": "2022-03-10",      "dateTimeGMT": "2022-03-10T23:30:00",      "teams": [        "Western Australia",        "New South Wales"      ],      "score": [        {          "r": 207,          "w": 10,          "o": 46.3,          "inning": "Western Australia Inning 1"        },        {          "r": 225,          "w": 9,          "o": 50,          "inning": "New South Wales Inning 1"        }      ],      "series_id": "ff5aa3f3-7164-4766-be90-3b64783257a0",      "fantasyEnabled": false    }  ],  "status": "success",  "info": {    "hitsToday": 3,    "hitsLimit": 500,    "credits": 0,    "server": 18,    "offsetRows": 0,    "totalRows": 913,    "queryTime": 14.5072  }}
Try out the API in real time
Code Playground

Series Squad List

Coming soon

The Series squad list API gives you a list of Squads in the given Series. This is yet under development, so please bear with us. Coming soon!


All Players List

A large list of all players in the system

This API gives you a full list of players with their Country of origin. Based on this you can then query the Player Info API and get more details for each player.



statusString success / failure based on the API result
dataAn array / object containing the main data of the API
idGuid Unique identifier for this Player
nameString Full Name of the player
countryString Country the player belongs to
Input
{  "apikey": "[your api key]",  "offset": 0}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": [    {      "id": "16592242-ef26-45d9-bf23-fc090e90fbbe",      "name": "Anderson Phillip",      "country": "West Indies"    },    {      "id": "9f2abfee-a09f-47c8-a1e5-8eb03fa7b85a",      "name": "Veerasammy Permaul",      "country": "West Indies"    }  ],  "status": "success",  "info": {    "hitsToday": 7,    "hitsLimit": 500,    "credits": 0,    "server": 18,    "offsetRows": 0,    "totalRows": 1992,    "queryTime": 10.099  }}
Try out the API in real time
Code Playground

Search All Players

Searches through our entire players database in the system

This API gives you a full list of players with their Country of origin. Based on this you can then query the Player Info API and get more details for each player.



statusString success / failure based on the API result
dataAn array / object containing the main data of the API
idGuid Unique identifier for this Player
nameString Full Name of the player
countryString Country the player belongs to
Input
{  "apikey": "[your api key]",  "offset": 0}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": [    {      "id": "16592242-ef26-45d9-bf23-fc090e90fbbe",      "name": "Anderson Phillip",      "country": "West Indies"    },    {      "id": "9f2abfee-a09f-47c8-a1e5-8eb03fa7b85a",      "name": "Veerasammy Permaul",      "country": "West Indies"    }  ],  "status": "success",  "info": {    "hitsToday": 7,    "hitsLimit": 500,    "credits": 0,    "server": 18,    "offsetRows": 0,    "totalRows": 1992,    "queryTime": 10.099  }}
Try out the API in real time
Code Playground

Cricket Info APIs

These APIs give you Details of each item shown in the List API

Details about series, matches, players, etc can be acquired through this API. Keep in mind that this API does NOT have pagination, so if there's a long list or a large API response you will need to handle it accordingly.


Series Info

Detailed info about the Series

Based on the Series ID provided, this API will give you information about the Series. Beware that the Match List given here is the COMPLETE list, so it will be very HEAVY when the Series has a large number of matches! You should ideally pull this API max 2-3 times a Day or on Manual intervention from your end if required.



statusString success / failure based on the API result
dataAn array / object containing the main data of the API
infoThe basic details about the Series
idGuid Unique identifier for this Series
nameString Name & Year of the Series
startDateDate Start Date & Month of the Series
endDateDate End Date & Month of the Series
odiNumber Number of ODIs in this Series
t20Number Number of T20s in this Series
testNumber Number of Tests in this Series
squadsNumber Number of Squads for which data is loaded (series may have more squads for which data is pending / undeclared)
matchesNumber Number of Matches for which data is loaded (series may have more matches that are pending / undeclared)
matchListAn array / object containing the Matches in this Series
idGuid Unique identifier for this Match
nameString Name of the MAtch
matchTypeString Type of the match odi,t20,test
statusString Latest Match status
venueString Venue of the Match
dateDate Date of the Match
dateTimeGMTDate Date and Time of the Match in GMT
(UTC+00) ISO Format YYYY-MM-DDTHH:mm:ss
teamsArray Names of the teams in JSON array
fantasyEnabledBoolean True only if Fantasy Scorecard / Squad / Ball-by-Ball are available for this match
Input
{  "apikey": "[your api key]",  "offset": 0,  "id": "47b54677-34de-4378-9019-154e82b9cc1a"}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": {    "info": {      "id": "47b54677-34de-4378-9019-154e82b9cc1a",      "name": "Indian Premier League 2022",      "startdate": "Mar 26",      "enddate": "May 29",      "odi": 0,      "t20": 70,      "test": 0,      "squads": 10,      "matches": 70    },    "matchList": [      {        "id": "341e6690-ece0-4dce-83fc-91effbb28eb3",        "name": "Chennai Super Kings vs Kolkata Knight Riders, 1st Match",        "matchType": "t20",        "status": "Match not started",        "venue": "Wankhede Stadium, Mumbai",        "date": "2022-03-26",        "dateTimeGMT": "2022-03-26T14:00:00",        "teams": [          "Chennai Super Kings",          "Kolkata Knight Riders"        ],        "fantasyEnabled": false      }    ]  },  "status": "success",  "info": {    "hitsToday": 12,    "hitsLimit": 500,    "credits": 0,    "server": 11,    "queryTime": 10  }}
Try out the API in real time
Code Playground

Match Info

Detailed info about the Match

Provides the details of this cricket match. If you require scorecard / ball by ball or other more detailed information, please use the corresponding Fantasy Squad / Fantasy Scorecard / Fantasy Ball-by-Ball API.



statusString success / failure based on the API result
dataAn array / object containing this Matches detail
idGuid Unique identifier for this Match
nameString Name of the Match
matchTypeString Type of the match odi,t20,test
scoreObject optional Score of the match, in inning sequence
Contains Team, Inning, Runs, Wickets, Overs
statusString Latest Match status
venueString Venue of the Match
dateDate Date of the Match
dateTimeGMTDate Date and Time of the Match in GMT
(UTC+00) ISO Format YYYY-MM-DDTHH:mm:ss
teamsArray Names of the teams in JSON array
fantasyEnabledBoolean True only if Fantasy Scorecard / Squad / Ball-by-Ball are available for this match
Input
{  "apikey": "[your api key]",  "offset": 0,  "id": "820cfd88-3b56-4a6e-9dd8-1203051140da"}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": {    "id": "2d448290-d882-4e67-9a4a-f62dfea9a51a",    "name": "Western Australia vs New South Wales, Final",    "matchType": "odi",    "status": "Western Australia won by 18 runs",    "venue": "Junction Oval, Melbourne",    "date": "2022-03-10",    "dateTimeGMT": "2022-03-10T23:30:00",    "teams": [      "Western Australia",      "New South Wales"    ],    "score": [      {        "r": 207,        "w": 10,        "o": 46.3,        "inning": "Western Australia Inning 1"      },      {        "r": 225,        "w": 9,        "o": 50,        "inning": "New South Wales Inning 1"      }    ],    "tossWinner": "Western Australia",    "tossChoice": "bat",    "matchWinner": "Western Australia",    "series_id": "ff5aa3f3-7164-4766-be90-3b64783257a0",    "fantasyEnabled": false  },  "status": "success",  "info": {    "hitsToday": 21,    "hitsLimit": 500,    "credits": 0,    "server": 11,    "queryTime": 15.7629  }}
Try out the API in real time
Code Playground

Player Info

Detailed info about the Player

Basic details about the player are provided in this API. In future we will include a player photograph (coming soon).



statusString success / failure based on the API result
dataAn array / object containing this Player detail
idGuid Unique identifier for this Player
nameString Name of the Player
dateOfBirthDate Date of Birth
roleString Player's Role
battingStyleString Batting Style
bowlingStyleString Bowling Style
placeOfBirthString Place of Birth
countryString Player's Country
Input
{  "apikey": "[your api key]",  "offset": 0,  "id": "16592242-ef26-45d9-bf23-fc090e90fbbe"}
Output
(data may be truncated for ease of reading)
{  "apikey": "[your api key]",  "data": {    "id": "16592242-ef26-45d9-bf23-fc090e90fbbe",    "name": "Anderson Phillip",    "dateOfBirth": "1996-08-22T00:00:00",    "role": "Bowler",    "battingStyle": "Right Handed Bat",    "bowlingStyle": "Right-arm fast-medium",    "placeOfBirth": "--",    "country": "West Indies"  },  "status": "success",  "info": {    "hitsToday": 41,    "hitsLimit": 500,    "credits": 0,    "server": 11,    "queryTime": 10  }}
Try out the API in real time
Code Playground

Fantasy API

Work in Progress Detailed Scorecard, Squad and Ball-By-Ball APIs

Fantasy API includes Scorecard, Ball-by-Ball and Squad API for each match. This is still a work in progress, so expect more changes to come in the future!

Get the Fantasy APIs (Scorecard, Squad, Ball-By-Ball, Points, etc) here