Cricket API Version - 2.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.

Leagues

Method

GET/POST apiv2.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

Request URL

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

JSON Response

{
    "success": 1,
    "result": [
        {
            "league_key": "733",
            "league_name": "4-Day Franchise Series",
            "league_year": "2021/22"
        },
        {
            "league_key": "755",
            "league_name": "Bangladesh tour of South Africa",
            "league_year": "2021/22"
        },
        {
            "league_key": "750",
            "league_name": "CSA PROVINCIAL ONE-DAY CHALLENGE DIVISION ONE",
            "league_year": "2021/22"
        },
        ............
   ]
}

PHP call example

$APIkey=!_your_account_APIkey_!;

   $curl_options = array(
     CURLOPT_URL => "https://apiv2.api-cricket.com/cricket/?method=get_leagues&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);

Events

Method

GET/POST apiv2.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)
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://apiv2.api-cricket.com/cricket/?method=get_events&APIkey=!_your_account_APIkey_!&date_start=2019-07-24&date_stop=2019-07-24

JSON Response

{
            "event_key": "372",
            "event_date_start": "2022-03-15",
            "event_date_stop": "2022-03-15",
            "event_time": "23:00",
            "event_home_team": "West Indies Women",
            "home_team_key": "93",
            "event_away_team": "Australia Women",
            "away_team_key": "98",
            "event_service_home": "",
            "event_service_away": "",
            "event_home_final_result": "131",
            "event_away_final_result": "132/3",
            "event_home_rr": null,
            "event_away_rr": null,
            "event_status": "Finished",
            "event_status_info": "AUS Women won by 7 wickets (with 118 balls remaining)",
            "league_name": "ICC Women's World Cup",
            "league_key": "737",
            "league_round": "",
            "league_season": "2021/22",
            "event_live": "0",
            "event_type": "ODI",
            "event_toss": "West Indies Women, elected to bat first",
            "event_man_of_match": "Ellyse Perry",
            "event_stadium": "Basin Reserve, Wellington",
            "event_home_team_logo": "https://apiv2.api-cricket.com/logo/93_west_indies_women.png",
            "event_away_team_logo": "https://apiv2.api-cricket.com/logo/98_australia_women.png",
            "scorecard": {
                "Australia Women 1 INN": [
                    {
                        "innings": "Australia Women 1 INN",
                        "player": "AJ Healy",
                        "type": "Batsman",
                        "status": "c & b Matthews",
                        "R": "3",
                        "B": "8",
                        "Min": "0",
                        "4s": "0",
                        "6s": "0",
                        "O": null,
                        "M": null,
                        "W": null,
                        "SR": "37.50",
                        "ER": null
                    },
                  .......
                ]
              .......
            },
            "comments": {
                "Australia Women 2 INN": [
                    {
                        "innings": "Australia Women 2 INN",
                        "balls": "2",
                        "overs": "30.2",
                        "ended": "No",
                        "runs": "1",
                        "post": "Taylor to Haynes, 1 run"
                    },
                    {
                        "innings": "Australia Women 2 INN",
                        "balls": "1",
                        "overs": "30.1",
                        "ended": "No",
                        "runs": "0",
                        "post": "Taylor to Haynes, no run"
                    },
                    .......
                ],
                ..........
            },
            "extra": {
                "Queensland Women 1 INN": {
                    "innings": "Queensland Women 1 INN",
                    "nr": "22.00",
                    "text": "(w 15, lb 6)",
                    "total_overs": null,
                    "total": "231 ( 49 )",
                    "percent_over": null
                },
                .......
            },
            "wickets": {
                "Australia Women 2 INN": [
                    {
                        "innings": "Australia Women 2 INN",
                        "fall": "15.6 ov",
                        "balwer": "Ellyse Perry",
                        "batsman": " c Matthews b Henry 10 ",
                        "score": "58/3"
                    },
                .......
                ],
                .....
            },
            "lineups": {
                "home_team": {
                    "starting_lineups": [
                        {
                            "player": "Deandra Dottin"
                        },
                        {
                            "player": "Hayley Matthews"
                        },
                        .........
                      ],
                  ,,,,,,,,
                },
            }
        ]
    }

PHP call example

$APIkey=!_your_account_APIkey_!;
    $date_start = '2022-03-15';
    $date_stop = '2022-03-15';

    $curl_options = array(
      CURLOPT_URL => "https://apiv2.api-cricket.com/cricket/?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 apiv2.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
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://apiv2.api-cricket.com/?method=get_livescore&APIkey=!_your_account_APIkey_!

JSON Response

{
    "success": 1,
    "result": [
        {
            "event_key": "767",
            "event_date_start": "2022-03-12",
            "event_date_stop": "2022-03-16",
            "event_time": "04:30",
            "event_home_team": "Jharkhand",
            "home_team_key": "23",
            "event_away_team": "Nagaland",
            "away_team_key": "28",
            "event_service_home": "132/2",
            "event_service_away": "",
            "event_home_final_result": "880",
            "event_away_final_result": "289",
            "event_home_rr": null,
            "event_away_rr": null,
            "event_status": "Stumps",
            "event_status_info": "Day 4 - Jharkhand lead by 723 runs.",
            "league_name": "Ranji Trophy",
            "league_key": "728",
            "league_round": "",
            "league_season": "2021/22",
            "event_live": "1",
            "event_type": "First-class",
            "event_toss": "Nagaland, elected to bowl first",
            "event_man_of_match": "",
            "event_stadium": null,
            "event_home_team_logo": "https://apiv2.api-cricket.com/logo/23_jharkhand.png",
            "event_away_team_logo": "https://apiv2.api-cricket.com/logo/28_nagaland.png",
            "scorecard": {
                "Jharkhand 1 INN": [
                    {
                        "innings": "Jharkhand 1 INN",
                        "player": "Utkarsh Singh",
                        "type": "Batsman",
                        "status": "c Ahmed b Mundhe",
                        "R": "36",
                        "B": "55",
                        "Min": "0",
                        "4s": "7",
                        "6s": "0",
                        "O": null,
                        "M": null,
                        "W": null,
                        "SR": "65.45",
                        "ER": null
                    },
                  ........
                ],
              .......
            },
            "comments": {
                "Live": [
                    {
                        "innings": "Live",
                        "balls": "6",
                        "overs": "36.6",
                        "ended": "No",
                        "runs": "0",
                        "post": "Jonathan to Utkarsh Singh"
                    },
                    {
                        "innings": "Live",
                        "balls": "5",
                        "overs": "36.5",
                        "ended": "No",
                        "runs": "0",
                        "post": "Jonathan to Utkarsh Singh"
                    },
                    ........
                  ],
                ........
            },
            "wickets": {
                "Jharkhand 1 INN": [
                    {
                        "innings": "Jharkhand 1 INN",
                        "fall": "14.6 ov",
                        "balwer": "Utkarsh Singh",
                        "batsman": " c Ahmed b Mundhe 36 ",
                        "score": "64/2"
                    },
                    .........
                ],
                .........
            },
            "extra": {
                "Jharkhand 1 INN": {
                    "innings": "Jharkhand 1 INN",
                    "nr": "17.00",
                    "text": "(w 3, lb 2)",
                    "total_overs": null,
                    "total": "880 ( 203.4 )",
                    "percent_over": null
                },
                ..........
            },
            "lineups": {
                "home_team": {
                    "starting_lineups": [
                        {
                            "player": "Utkarsh Singh"
                        },
                        {
                            "player": "Nazim Siddiqui"
                        },
                        ...........
                    ],
                  ......
                },
            }
      ]

   }

PHP call example

$APIkey=!_your_account_APIkey_!;

 $curl_options = array(
   CURLOPT_URL => "https://apiv2.api-cricket.com/cricket/?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 apiv2.api-cricket.com/cricket/?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://apiv2.api-cricket.com/cricket/?method=get_H2H&APIkey=!_your_account_APIkey_!&first_team_key=30&second_team_key=5

JSON Response

{
    "success": 1,
    "result": {
        "H2H": [
            {
                "event_key": "767",
                "event_date_start": "2022-03-12",
                "event_date_stop": "2022-03-16",
                "event_time": "04:30",
                "event_home_team": "Jharkhand",
                "home_team_key": "23",
                "event_away_team": "Nagaland",
                "away_team_key": "28",
                "event_service_home": "132/2",
                "event_service_away": "",
                "event_home_final_result": "880",
                "event_away_final_result": "289",
                "event_home_rr": null,
                "event_away_rr": null,
                "event_status": "Stumps",
                "event_status_info": "Day 4 - Jharkhand lead by 723 runs.",
                "league_name": "Ranji Trophy",
                "league_key": "728",
                "league_round": "",
                "league_season": "2021/22",
                "event_live": "1"
            },
            ..............
        ],
        "firstTeamResults": [
            {
                "event_key": "115",
                "event_date_start": "2022-02-24",
                "event_date_stop": "2022-02-27",
                "event_time": "04:30",
                "event_home_team": "Jharkhand",
                "home_team_key": "23",
                "event_away_team": "Delhi",
                "away_team_key": "33",
                "event_service_home": "",
                "event_service_away": "target 335",
                "event_home_final_result": "251 & 307/7d",
                "event_away_final_result": "224 & 319",
                "event_home_rr": null,
                "event_away_rr": null,
                "event_status": "Finished",
                "event_status_info": "Jharkhand won by 15 runs",
                "league_name": "Ranji Trophy",
                "league_key": "728",
                "league_round": "Elite, Group H",
                "league_season": "2021/22",
                "event_live": "0"
            },
            ..........
          ],
          ...........
      }
  }

PHP call example

$APIkey=!_your_account_APIkey_!;
    $firstTeamKey=23;
    $secondTeamKey=28;

    $curl_options = array(
      CURLOPT_URL => "https://apiv2.api-cricket.com/cricket/?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 apiv2.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://apiv2.api-cricket.com/cricket/?method=get_standings&league_key=749&APIkey=!_your_account_APIkey_!

JSON Response

{
    "success": 1,
    "result": {
        "total": [
            {
                "standing_place": "1",
                "standing_place_type": "",
                "standing_team": "Eagles Women",
                "standing_MP": "6",
                "standing_W": "5",
                "standing_L": "1",
                "standing_NR": "0",
                "standing_R": "",
                "standing_NRR": "",
                "standing_Pts": "25",
                "team_key": "165",
                "league_key": "749",
                "league_round": ""
            },
            {
                "standing_place": "2",
                "standing_place_type": "",
                "standing_team": "Rhinos Women",
                "standing_MP": "6",
                "standing_W": "3",
                "standing_L": "3",
                "standing_NR": "0",
                "standing_R": "",
                "standing_NRR": "",
                "standing_Pts": "15",
                "team_key": "167",
                "league_key": "749",
                "league_round": ""
            },
            ........
        ]
    }
}

PHP call example

$APIkey=!_your_account_APIkey_!;
     $league_key = 749;

     $curl_options = array(
       CURLOPT_URL => "https://apiv2.api-cricket.com/cricket/?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 apiv2.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://apiv2.api-cricket.com/cricket/?method=get_teams&team_key=137&APIkey=!_your_account_APIkey_!

JSON Response

{
    "success": 1,
    "result": [
        {
            "team_key": "22",
            "team_name": "Tamil Nadu",
            "team_logo": "https://apiv2.api-cricket.com/logo/22_tamil_nadu.png"
        },
        {
            "team_key": "23",
            "team_name": "Jharkhand",
            "team_logo": "https://apiv2.api-cricket.com/logo/23_jharkhand.png"
        },
        ........
     ]
 }

PHP call example

$APIkey=!_your_account_APIkey_!;
    $league_key = 728;

    $curl_options = array(
     CURLOPT_URL => "https://apiv2.api-cricket.com/cricket/?method=get_teams&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);

Odds

Method

GET/POST apiv2.api-cricket.com/cricket?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)
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://apiv2.api-cricket.com/cricket/?method=get_odds&event_key=748&APIkey=!_your_account_APIkey_!

JSON Response

{
    "success": 1,
    "result": {
        "748": {
            "3Way Result": {
                "Home": {
                    "bet365": "2.50",
                    "1xbet": "2.56",
                    "Sportingbet": "2.30"
                },
                "Draw": {
                    "bet365": "3.25",
                    "1xbet": "3.32",
                    "Sportingbet": "3.25"
                },
                "Away": {
                    "bet365": "2.80",
                    "1xbet": "2.86",
                    "Sportingbet": "2.90"
                }
            },
            "Home/Away": {
                "Home": {
                    "bet365": "1.72",
                    "Unibet": "1.75",
                    "1xbet": "1.65"
                },
                "Away": {
                    "bet365": "2.10",
                    "Unibet": "2.05",
                    "1xbet": "2.30"
                }
            },
            ..........
        }
    }
}

PHP call example

$APIkey=!_your_account_APIkey_!;
 $eventKey = 748;

 $curl_options = array(
   CURLOPT_URL => "https://apiv2.api-cricket.com/cricket/?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);