Cricket API Version - 1.0

Welcome to the documentation page of Cricket API service. Please find bellow the full list of the methods you can relay on to get real time Cricket data helping you build awesome applications.

Countries

Method

GET/POST api.api-cricket.com/cricket/?method=get_countries

Returns list of all countries.

Parameters

Parameter Description
method API method name
APIkey Authorization code generated from your apicricket account

Request URL

https://api.api-cricket.com/?method=get_countries&APIkey=!_your_account_APIkey_!

JSON Response

{
    {
      "success": 1,
      "result": [
          {
              "country_key": "626",
              "country_name": "Afghanistan"
          },
          {
              "country_key": "631",
              "country_name": "Africa"
          },
          {
              "country_key": "511",
              "country_name": "Asia"
          },
          {
              "country_key": "502",
              "country_name": "Australia"
          },
          {
              "country_key": "503",
              "country_name": "Bangladesh"
          },
          {
              "country_key": "627",
              "country_name": "Canada"
          },
          {
              "country_key": "628",
              "country_name": "Hong Kong"
          },
          {
              "country_key": "504",
              "country_name": "India"
          },
          ......
    ]
}

PHP call example

$APIkey='!_your_account_APIkey_!';

$curl_options = array(
  CURLOPT_URL => "https://api.api-cricket.com/?method=get_countries&APIkey=$APIkey",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HEADER => false,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_CONNECTTIMEOUT => 5
);

$curl = curl_init();
curl_setopt_array( $curl, $curl_options );
$result = curl_exec( $curl );

$result = (array) json_decode($result);

var_dump($result);

Leagues

Method

GET/POST api.api-cricket.com/cricket/?method=get_leagues

Returns list of supported competitions included in your current subscription plan.

Parameters

Parameter Description
method API method name
APIkey Authorization code generated from your apicricket account
country_key Country Key - if set only leagues from specific country will be returned (Optional)

Request URL

https://api.api-cricket.com/cricket/?method=get_leagues&APIkey=!_your_account_APIkey_!

JSON Response

{
   "success": 1,
   "result": [
        {
            "league_key": "9824",
            "league_name": "Asia Cup ODI",
            "country_key": "511",
            "country_name": "Asia"
        },
        {
            "league_key": "9825",
            "league_name": "Asia Cup T20",
            "country_key": "511",
            "country_name": "Asia"
        },
        {
            "league_key": "9823",
            "league_name": "Asian Games",
            "country_key": "511",
            "country_name": "Asia"
        },
        {
            "league_key": "9828",
            "league_name": "Asian Games Women",
            "country_key": "511",
            "country_name": "Asia"
        },
        {
            "league_key": "9831",
            "league_name": "East Asia Cup",
            "country_key": "511",
            "country_name": "Asia"
        },
       .......
   ]
}

PHP call example

$APIkey=!_your_account_APIkey_!;
   $country_key = 511;

   $curl_options = array(
     CURLOPT_URL => "https://api.api-cricket.com/cricket/?method=get_leagues&APIkey=$APIkey&country_key=$country_key",
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_HEADER => false,
     CURLOPT_TIMEOUT => 30,
     CURLOPT_CONNECTTIMEOUT => 5
   );

   $curl = curl_init();
   curl_setopt_array( $curl, $curl_options );
   $result = curl_exec( $curl );

   $result = (array) json_decode($result);

   var_dump($result);

Events

Method

GET/POST api.api-cricket.com/cricket/?method=get_events

Returns events included in your current subscription plan

Parameters

Parameter Description
method API method name
APIkey Authorization code generated from your apicricket account
date_start Start date (yyyy-mm-dd)
date_stop Stop date (yyyy-mm-dd)
country_key Country Key - if set only events from specific country will be returned (Optional)
league_key League Key - if set events from specific league will be returned (Optional)
event_key Event Key - if set only details from specific match will be returned (Optional)

Request URL

https://api.api-cricket.com/cricket/?method=get_events&APIkey=!_your_account_APIkey_!&date_start=2019-07-24&date_stop=2019-07-24

JSON Response

{
        "success": 1,
        "result": [
        {
            "event_key": "2423",
            "event_date_start": "2019-07-24",
            "event_date_stop": "2019-07-26",
            "event_time": "12:00",
            "event_home_team": "England",
            "home_team_key": "34",
            "event_away_team": "Ireland",
            "away_team_key": "72",
            "event_service_home": "",
            "event_service_away": "",
            "event_home_final_result": "85 & 303",
            "event_away_final_result": "207 & 38",
            "event_home_rr": "",
            "event_away_rr": "",
            "event_status": "Finished",
            "event_status_info": "England won by 143 runs.",
            "country_name": "World",
            "league_name": "Test Series",
            "league_key": "9846",
            "league_round": "",
            "league_season": "2019",
            "event_live": "0",
            "event_home_team_logo": "https://api.api-cricket.com/logo/34_england.png",
            "event_away_team_logo": "https://api.api-cricket.com/logo/72_ireland.png",
            "scorecard": {
                "ENG - 1st Innings": [
                    {
                        "innings": "ENG - 1st Innings",
                        "player": "Burns R.",
                        "type": "Batsman",
                        "status": "c Wilson G. b Murtagh T.",
                        "R": "6",
                        "B": "25",
                        "Min": "49",
                        "4s": "0",
                        "6s": "0",
                        "SR": "24.00"
                    },
            .......
        ]
    }

PHP call example

$APIkey=!_your_account_APIkey_!;
    $date_start = '2019-07-24';
    $date_stop = '2019-07-24';

    $curl_options = array(
      CURLOPT_URL => "https://api-cricket.com/?method=get_events&APIkey=$APIkey&date_start=$date_start&date_stop=$date_stop",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HEADER => false,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_CONNECTTIMEOUT => 5
    );

    $curl = curl_init();
    curl_setopt_array( $curl, $curl_options );
    $result = curl_exec( $curl );

    $result = (array) json_decode($result);

    var_dump($result);

Livescore

Method

GET/POST api.api-cricket.com/cricket/?method=get_livescore

Returns playing now events included in your current subscription plan.

Parameters

Parameter Description
method API method name
APIkey Authorization code generated from your apicricket account
country_key Country ID - if set only leagues from specific country will be returned (Optional)
league_key League ID - if set events from specific league will be returned (Optional)
match_key Match ID - if set only details from specific match will be returned (Optional)

Request URL

https://api.api-cricket.com/?method=get_livescore&APIkey=!_your_account_APIkey_!

JSON Response

{
       "success": 1,
       "result": [
           {
               "event_key": "415",
               "event_date_start": "2019-03-15",
               "event_date_stop": "2019-03-19",
               "event_time": "05:30",
               "event_home_team": "Afghanistan",
               "home_team_key": "78",
               "event_away_team": "Ireland",
               "away_team_key": "72",
               "event_service_home": "Batting team",
               "event_service_away": "Bowling team",
               "event_home_final_result": "311/9 (105)",
               "event_away_final_result": "172",
               "event_home_rr": "",
               "event_away_rr": "",
               "event_status": "1st Innings",
               "event_status_info": "Afghanistan lead by 139 runs with 1 wicket remaining in the 1st innings.",
               "country_name": "World",
               "league_name": "Test Series",
               "league_key": "9846",
               "league_round": "",
               "league_season": "2019",
               "event_live": "1",
               "event_home_team_logo": "https://api.api-cricket.com/logo/78_afghanistan.png",
               "event_away_team_logo": "https://api.api-cricket.com/logo/72_ireland.png",
               "scorecard": [],
               "ball_by_ball": [],
               "wickets": [],
               "extra": [],
               "lineups": {
                   "home_team": {
                       "starting_lineups": [
                           {
                               "player": "Asghar A. (C)",
                               "player_country": "Afghanistan"
                           },
           .......
       ]
   }

PHP call example

$APIkey=!_your_account_APIkey_!;

 $curl_options = array(
   CURLOPT_URL => "https://api.api-cricket.com/?method=get_livescore&APIkey=$APIkey",
   CURLOPT_RETURNTRANSFER => true,
   CURLOPT_HEADER => false,
   CURLOPT_TIMEOUT => 30,
   CURLOPT_CONNECTTIMEOUT => 5
 );

 $curl = curl_init();
 curl_setopt_array( $curl, $curl_options );
 $result = curl_exec( $curl );

 $result = (array) json_decode($result);

 var_dump($result);

H2H (Head to Head)

Method

GET/POST api.api-cricket.com/?method=get_H2H

Returns the last games between submiteted teams and the last games of each team

Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your apicricket account
first_team_key First team Key
second_team_key Second team Key

Request URL

https://api.api-cricket.com/?method=get_H2H&APIkey=!_your_account_APIkey_!&first_team_key=30&second_team_key=5

JSON Response

{
        "success": 1,
        "result": {
          "H2H": [
              {
                  "event_key": "2391",
                  "event_date_start": "2019-06-09",
                  "event_date_stop": "2019-06-09",
                  "event_time": "11:30",
                  "event_home_team": "Australia",
                  "home_team_key": "5",
                  "event_away_team": "India",
                  "away_team_key": "30",
                  "event_service_home": "",
                  "event_service_away": "",
                  "event_home_final_result": "316/10 (50)",
                  "event_away_final_result": "352/5 (50)",
                  "event_home_rr": "RR 6.32",
                  "event_away_rr": "RR 7.04",
                  "event_status": "Finished",
                  "event_status_info": "India won by 36 runs.",
                  "league_name": "ICC World Cup",
                  "league_key": "9843",
                  "league_round": "",
                  "league_season": "",
                  "event_live": "0"
              },
                .........
            ]
        }
    }

PHP call example

$APIkey=!_your_account_APIkey_!;
    $firstTeamKey=30;
    $secondTeamKey=5;

    $curl_options = array(
      CURLOPT_URL => "https://api.api-cricket.com/?method=get_H2H&APIkey=$APIkey&first_team_key=$firstTeamKey&second_team_key=$secondTeamKey",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HEADER => false,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_CONNECTTIMEOUT => 5
    );

    $curl = curl_init();
    curl_setopt_array( $curl, $curl_options );
    $result = curl_exec( $curl );

    $result = (array) json_decode($result);

    var_dump($result);

Standings

Method

GET/POST api.api-cricket.com/?method=get_standings

Returns standings for leagues included in your current subscription plan.

Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your apicricket account
league_key League internal code

Request URL

https://api.api-cricket.com/?method=get_standings&league_key=9869&APIkey=!_your_account_APIkey_!

JSON Response

{
    "success": 1,
    "result": {
        "total": [
            {
                "standing_place": "1",
                "standing_place_type": "Promotion - Premier League (Play Offs: Semi-finals)",
                "standing_team": "Balkh Legends",
                "standing_MP": "8",
                "standing_W": "6",
                "standing_L": "2",
                "standing_NR": "0",
                "standing_R": "1366:1254",
                "standing_NRR": "",
                "standing_Pts": "12",
                "team_key": "136",
                "league_key": "9869",
                "league_round": "",
                "standing_updated": "2019-03-11 18:46:41"
            },
            {
                "standing_place": "2",
                "standing_place_type": "Promotion - Premier League (Play Offs: Semi-finals)",
                "standing_team": "Paktia Panthers",
                "standing_MP": "8",
                "standing_W": "5",
                "standing_L": "3",
                "standing_NR": "0",
                "standing_R": "1307:1325",
                "standing_NRR": "",
                "standing_Pts": "10",
                "team_key": "138",
                "league_key": "9869",
                "league_round": "",
                "standing_updated": "2019-03-11 18:46:41"
            },
            ........
        ]
    }
}

PHP call example

$APIkey=!_your_account_APIkey_!;
     $league_key = 9869;

     $curl_options = array(
       CURLOPT_URL => "https://api.api-cricket.com/?method=get_standings&APIkey=$APIkey&league_key=$league_key",
       CURLOPT_RETURNTRANSFER => true,
       CURLOPT_HEADER => false,
       CURLOPT_TIMEOUT => 30,
       CURLOPT_CONNECTTIMEOUT => 5
     );

     $curl = curl_init();
     curl_setopt_array( $curl, $curl_options );
     $result = curl_exec( $curl );

     $result = (array) json_decode($result);

     var_dump($result);

Teams

Method

GET/POST api.api-cricket.com/?method=get_teams

Returns teams for leagues included in your current subscription plan.

Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your apicricket account
team_key Team internal code
league_key League internal code

Request URL

https://api.api-cricket.com/cricket/?method=get_teams&team_key=137&APIkey=!_your_account_APIkey_!

JSON Response

{
       "success": 1,
       "result": [
          {
              "team_key": "137",
              "team_name": "Kabul Zawanan",
              "team_logo": "https://api.api-cricket.com/logo/-1"
          }
       ]
   }

PHP call example

$APIkey=!_your_account_APIkey_!;
    $team_key = 137;

    $curl_options = array(
     CURLOPT_URL => "https://api.api-cricket.com/?method=get_teams&APIkey=$APIkey&team_key=$team_key",
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_HEADER => false,
     CURLOPT_TIMEOUT => 30,
     CURLOPT_CONNECTTIMEOUT => 5
    );

    $curl = curl_init();
    curl_setopt_array( $curl, $curl_options );
    $result = curl_exec( $curl );

    $result = (array) json_decode($result);

    var_dump($result);

Odds

Method

GET/POST api.api-cricket.com/?method=get_odds

Returns odds for events included in your current subscription plan.

Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your apicricket account
date_start Start date (yyyy-mm-dd)
date_stop Stop date (yyyy-mm-dd)
country_key Country ID - if set only events from specific country will be returned (Optional)
league_key League ID - if set events from specific league will be returned (Optional)
event_key Event ID - if set only details from specific match will be returned (Optional)

Request URL

https://api.api-cricket.com/?method=get_odds&event_key=3070&APIkey=!_your_account_APIkey_!

JSON Response

{
    "success": 1,
    "result": {
        "3070": {
            "1X2 - Full Time": {
                "1": {
                    "888sport": "1.96",
                    "bet-at-home": "1.85",
                    "bet365": "1.90",
                    "Betclic": "1.90",
                    "Betfred": "1.91",
                    "Betsafe": "1.92",
                    "Betsson": "1.92",
                    "BetVictor": "1.91",
                    "BoyleSports": "1.91",
                    "Expekt": "1.90",
                    "iFortuna.cz": "2.00",
                    "Intertops": "2.00",
                    "Jetbull": "1.93",
                    "Marathonbet": "1.95",
                    "NordicBet": "1.92",
                    "SBOBET": "1.87",
                    "Titanbet": "2.05",
                    "Unibet": "1.96",
                    .....
              }
          }
    }
}

PHP call example

$APIkey=!_your_account_APIkey_!;
 $eventKey = 3070;

 $curl_options = array(
   CURLOPT_URL => "https://api.api-cricket.com/?method=get_odds&&APIkey=$APIkey&event_key=$eventKey",
   CURLOPT_RETURNTRANSFER => true,
   CURLOPT_HEADER => false,
   CURLOPT_TIMEOUT => 30,
   CURLOPT_CONNECTTIMEOUT => 5
 );

 $curl = curl_init();
 curl_setopt_array( $curl, $curl_options );
 $result = curl_exec( $curl );

 $result = (array) json_decode($result);

 var_dump($result);