Basketball documentation

  • Home
  • Basketball documentation

Endpoints

ALL SPORTS API - Basketball API Version 1.0

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

Countries


Method

GET/POST api/basketball/?met=Countries

Returns list of supported countries included in your current subscription plan


Parameters

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

Request URL


JSON Response

{
  "success": 1,
  "result": [
    {
      "country_key": "681",
      "country_name": "Ukraine"
    },
    {
      "country_key": "682",
      "country_name": "United Kingdom"
    },
    {
      "country_key": "251",
      "country_name": "Uruguay"
    },
    {
      "country_key": "252",
      "country_name": "USA"
    },
    {
      "country_key": "253",
      "country_name": "Venezuela"
    }
    ......
  ]
}
                                

PHP call example


$APIkey='!_your_account_APIkey_!';

$curl_options = array(
  CURLOPT_URL => "https://allsportsapi.com/api/basketball/?met=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/basketball/?met=Leagues

Returns list of supported competitions included in your current subscription plan


Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your allsportsapi account
countryId Country ID - if set only leagues from specific country will be returned (Optional)

Request URL


JSON Response

{
  "success": 1,
  "result": [
    {
      "league_key": "8926",
      "league_name": "BIG3 (3x3)",
      "country_key": "252",
      "country_name": "USA"
    },
    {
      "league_key": "795",
      "league_name": "CBI",
      "country_key": "252",
      "country_name": "USA"
    },
    {
      "league_key": "794",
      "league_name": "CIT",
      "country_key": "252",
      "country_name": "USA"
    },
    {
      "league_key": "796",
      "league_name": "IBL",
      "country_key": "252",
      "country_name": "USA"
    },
    {
      "league_key": "787",
      "league_name": "NBA",
      "country_key": "252",
      "country_name": "USA"
    },
    {
      "league_key": "791",
      "league_name": "NBA G League",
      "country_key": "252",
      "country_name": "USA"
    },
.......
  ]
}
            

PHP call example


$APIkey=!_your_account_APIkey_!;
$countryId = 135;

$curl_options = array(
  CURLOPT_URL => "https://allsportsapi.com/api/basketball/?met=Leagues&APIkey=$APIkey&countryId=$countryId",
  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);

            


Fixtures


Method

GET/POST api/basketball/?met=Fixtures

Returns events included in your current subscription plan


Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your allsportsapi account
from Start date (yyyy-mm-dd)
to Stop date (yyyy-mm-dd)
countryId Country ID - if set only events from specific country will be returned (Optional)
leagueId League ID - if set events from specific league will be returned (Optional)
matchId Match ID - if set only details from specific match will be returned (Optional)

Request URL


JSON Response

{
  "success": 1,
  "result": [
    {
      "event_key": "4372",
      "event_date": "2018-04-15",
      "event_time": "23:30",
      "event_home_team": "Toronto Raptors",
      "home_team_key": "51",
      "event_away_team": "Washington Wizards",
      "away_team_key": "55",
      "event_final_result": "114 - 106",
      "event_status": "Finished",
      "country_name": "USA",
      "league_name": "NBA",
      "league_key": "787",
      "league_round": "1/8-finals",
      "league_season": "2017/2018",
      "event_live": "0",
      "scores": {
        "1stQuarter": [
          {
            "score_home": "28",
            "score_away": "23"
          }
        ],
        "2ndQuarter": [
          {
            "score_home": "27",
            "score_away": "36"
          }
        ],
        "3rdQuarter": [
          {
            "score_home": "31",
            "score_away": "26"
          }
        ],
        "4thQuarter": [
          {
            "score_home": "28",
            "score_away": "21"
          }
        ]
      },
      "statistics": {
        "Match": [
          {
            "type": "Field Goals Attempted",
            "home": "77",
            "away": "86"
          },
          {
            "type": "Field Goals Made",
            "home": "42",
            "away": "42"
          },
          {
            "type": "Field Goals %",
            "home": "54.5%",
            "away": "48.8%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "47",
            "away": "65"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "26",
            "away": "34"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "55.3%",
            "away": "52.3%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "30",
            "away": "21"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "16",
            "away": "8"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "53.3%",
            "away": "38.1%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "20",
            "away": "18"
          },
          {
            "type": "Free Throws Made",
            "home": "16",
            "away": "16"
          },
          {
            "type": "Free Throws %",
            "home": "80%",
            "away": "88.9%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "5",
            "away": "6"
          },
          {
            "type": "Defensive Rebounds",
            "home": "33",
            "away": "29"
          },
          {
            "type": "Total Rebounds",
            "home": "38",
            "away": "35"
          },
          {
            "type": "Assists",
            "home": "26",
            "away": "29"
          },
          {
            "type": "Blocks",
            "home": "8",
            "away": "3"
          },
          {
            "type": "Turnovers",
            "home": "17",
            "away": "13"
          },
          {
            "type": "Steals",
            "home": "6",
            "away": "11"
          },
          {
            "type": "Personal Fouls",
            "home": "18",
            "away": "21"
          },
          {
            "type": "Field Goals Attempted",
            "home": "19",
            "away": "21"
          },
          {
            "type": "Field Goals Made",
            "home": "11",
            "away": "10"
          },
          {
            "type": "Field Goals %",
            "home": "57.9%",
            "away": "47.6%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "12",
            "away": "16"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "9",
            "away": "8"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "75%",
            "away": "50%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "7",
            "away": "5"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "2",
            "away": "2"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "28.6%",
            "away": "40%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "6",
            "away": "3"
          },
          {
            "type": "Free Throws Made",
            "home": "4",
            "away": "3"
          },
          {
            "type": "Free Throws %",
            "home": "66.7%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "3",
            "away": "3"
          },
          {
            "type": "Defensive Rebounds",
            "home": "10",
            "away": "5"
          },
          {
            "type": "Total Rebounds",
            "home": "13",
            "away": "8"
          },
          {
            "type": "Assists",
            "home": "6",
            "away": "7"
          },
          {
            "type": "Blocks",
            "home": "1",
            "away": "0"
          },
          {
            "type": "Turnovers",
            "home": "7",
            "away": "4"
          },
          {
            "type": "Steals",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Personal Fouls",
            "home": "6",
            "away": "5"
          },
          {
            "type": "Field Goals Attempted",
            "home": "21",
            "away": "26"
          },
          {
            "type": "Field Goals Made",
            "home": "9",
            "away": "13"
          },
          {
            "type": "Field Goals %",
            "home": "42.9%",
            "away": "50%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "11",
            "away": "22"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "4",
            "away": "12"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "36.4%",
            "away": "54.5%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "10",
            "away": "4"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "5",
            "away": "1"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "50%",
            "away": "25%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "4",
            "away": "7"
          },
          {
            "type": "Free Throws Made",
            "home": "4",
            "away": "7"
          },
          {
            "type": "Free Throws %",
            "home": "100%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "0",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "8",
            "away": "10"
          },
          {
            "type": "Total Rebounds",
            "home": "8",
            "away": "11"
          },
          {
            "type": "Assists",
            "home": "8",
            "away": "10"
          },
          {
            "type": "Blocks",
            "home": "4",
            "away": "0"
          },
          {
            "type": "Turnovers",
            "home": "4",
            "away": "2"
          },
          {
            "type": "Steals",
            "home": "1",
            "away": "4"
          },
          {
            "type": "Personal Fouls",
            "home": "5",
            "away": "4"
          },
          {
            "type": "Field Goals Attempted",
            "home": "18",
            "away": "19"
          },
          {
            "type": "Field Goals Made",
            "home": "12",
            "away": "10"
          },
          {
            "type": "Field Goals %",
            "home": "66.7%",
            "away": "52.6%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "11",
            "away": "12"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "7",
            "away": "6"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "63.6%",
            "away": "50%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "7",
            "away": "7"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "5",
            "away": "4"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "71.4%",
            "away": "57.1%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Free Throws Made",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Free Throws %",
            "home": "100%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "1",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "7",
            "away": "5"
          },
          {
            "type": "Total Rebounds",
            "home": "8",
            "away": "6"
          },
          {
            "type": "Assists",
            "home": "5",
            "away": "7"
          },
          {
            "type": "Blocks",
            "home": "0",
            "away": "2"
          },
          {
            "type": "Turnovers",
            "home": "4",
            "away": "5"
          },
          {
            "type": "Steals",
            "home": "1",
            "away": "3"
          },
          {
            "type": "Personal Fouls",
            "home": "3",
            "away": "5"
          },
          {
            "type": "Field Goals Attempted",
            "home": "19",
            "away": "20"
          },
          {
            "type": "Field Goals Made",
            "home": "10",
            "away": "9"
          },
          {
            "type": "Field Goals %",
            "home": "52.6%",
            "away": "45%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "13",
            "away": "15"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "6",
            "away": "8"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "46.2%",
            "away": "53.3%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "6",
            "away": "5"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "4",
            "away": "1"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "66.7%",
            "away": "20%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "8",
            "away": "6"
          },
          {
            "type": "Free Throws Made",
            "home": "6",
            "away": "4"
          },
          {
            "type": "Free Throws %",
            "home": "75%",
            "away": "66.7%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "1",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "8",
            "away": "9"
          },
          {
            "type": "Total Rebounds",
            "home": "9",
            "away": "10"
          },
          {
            "type": "Assists",
            "home": "7",
            "away": "5"
          },
          {
            "type": "Blocks",
            "home": "3",
            "away": "1"
          },
          {
            "type": "Turnovers",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Steals",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Personal Fouls",
            "home": "4",
            "away": "7"
          }
        ],
        "1stQuarter": [
          {
            "type": "Field Goals Attempted",
            "home": "19",
            "away": "21"
          },
          {
            "type": "Field Goals Made",
            "home": "11",
            "away": "10"
          },
          {
            "type": "Field Goals %",
            "home": "57.9%",
            "away": "47.6%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "12",
            "away": "16"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "9",
            "away": "8"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "75%",
            "away": "50%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "7",
            "away": "5"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "2",
            "away": "2"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "28.6%",
            "away": "40%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "6",
            "away": "3"
          },
          {
            "type": "Free Throws Made",
            "home": "4",
            "away": "3"
          },
          {
            "type": "Free Throws %",
            "home": "66.7%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "3",
            "away": "3"
          },
          {
            "type": "Defensive Rebounds",
            "home": "10",
            "away": "5"
          },
          {
            "type": "Total Rebounds",
            "home": "13",
            "away": "8"
          },
          {
            "type": "Assists",
            "home": "6",
            "away": "7"
          },
          {
            "type": "Blocks",
            "home": "1",
            "away": "0"
          },
          {
            "type": "Turnovers",
            "home": "7",
            "away": "4"
          },
          {
            "type": "Steals",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Personal Fouls",
            "home": "6",
            "away": "5"
          }
        ],
        "2ndQuarter": [
          {
            "type": "Field Goals Attempted",
            "home": "21",
            "away": "26"
          },
          {
            "type": "Field Goals Made",
            "home": "9",
            "away": "13"
          },
          {
            "type": "Field Goals %",
            "home": "42.9%",
            "away": "50%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "11",
            "away": "22"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "4",
            "away": "12"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "36.4%",
            "away": "54.5%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "10",
            "away": "4"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "5",
            "away": "1"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "50%",
            "away": "25%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "4",
            "away": "7"
          },
          {
            "type": "Free Throws Made",
            "home": "4",
            "away": "7"
          },
          {
            "type": "Free Throws %",
            "home": "100%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "0",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "8",
            "away": "10"
          },
          {
            "type": "Total Rebounds",
            "home": "8",
            "away": "11"
          },
          {
            "type": "Assists",
            "home": "8",
            "away": "10"
          },
          {
            "type": "Blocks",
            "home": "4",
            "away": "0"
          },
          {
            "type": "Turnovers",
            "home": "4",
            "away": "2"
          },
          {
            "type": "Steals",
            "home": "1",
            "away": "4"
          },
          {
            "type": "Personal Fouls",
            "home": "5",
            "away": "4"
          }
        ],
        "3rdQuarter": [
          {
            "type": "Field Goals Attempted",
            "home": "18",
            "away": "19"
          },
          {
            "type": "Field Goals Made",
            "home": "12",
            "away": "10"
          },
          {
            "type": "Field Goals %",
            "home": "66.7%",
            "away": "52.6%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "11",
            "away": "12"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "7",
            "away": "6"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "63.6%",
            "away": "50%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "7",
            "away": "7"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "5",
            "away": "4"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "71.4%",
            "away": "57.1%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Free Throws Made",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Free Throws %",
            "home": "100%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "1",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "7",
            "away": "5"
          },
          {
            "type": "Total Rebounds",
            "home": "8",
            "away": "6"
          },
          {
            "type": "Assists",
            "home": "5",
            "away": "7"
          },
          {
            "type": "Blocks",
            "home": "0",
            "away": "2"
          },
          {
            "type": "Turnovers",
            "home": "4",
            "away": "5"
          },
          {
            "type": "Steals",
            "home": "1",
            "away": "3"
          },
          {
            "type": "Personal Fouls",
            "home": "3",
            "away": "5"
          }
        ],
        "4thQuarter": [
          {
            "type": "Field Goals Attempted",
            "home": "19",
            "away": "20"
          },
          {
            "type": "Field Goals Made",
            "home": "10",
            "away": "9"
          },
          {
            "type": "Field Goals %",
            "home": "52.6%",
            "away": "45%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "13",
            "away": "15"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "6",
            "away": "8"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "46.2%",
            "away": "53.3%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "6",
            "away": "5"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "4",
            "away": "1"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "66.7%",
            "away": "20%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "8",
            "away": "6"
          },
          {
            "type": "Free Throws Made",
            "home": "6",
            "away": "4"
          },
          {
            "type": "Free Throws %",
            "home": "75%",
            "away": "66.7%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "1",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "8",
            "away": "9"
          },
          {
            "type": "Total Rebounds",
            "home": "9",
            "away": "10"
          },
          {
            "type": "Assists",
            "home": "7",
            "away": "5"
          },
          {
            "type": "Blocks",
            "home": "3",
            "away": "1"
          },
          {
            "type": "Turnovers",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Steals",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Personal Fouls",
            "home": "4",
            "away": "7"
          }
        ]
      }
    }
.......
  ]
}
            

PHP call example


$APIkey=!_your_account_APIkey_!;
$from = '2018-05-23';
$to = '2018-05-23';

$curl_options = array(
  CURLOPT_URL => "https://allsportsapi.com/api/basketball/?met=Fixtures&APIkey=$APIkey&from=$from&to=$to",
  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/basketball/?met=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 allsportsapi account
firstTeamId First team Id
secondTeamId Second team Id

Request URL


JSON Response

{
  "success": 1,
  "result": {

  }
}
            

PHP call example


$APIkey=!_your_account_APIkey_!;
$firstTeamId=2616;
$secondTeamId=2617;

$curl_options = array(
  CURLOPT_URL => "https://allsportsapi.com/api/basketball/?met=H2H&APIkey=$APIkey&firstTeamId=$firstTeamId&secondTeamId=$secondTeamId",
  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/basketball/?met=Livescore

Returns playing now events included in your current subscription plan


Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your allsportsapi account
countryId Country ID - if set only events from specific country will be returned (Optional)
leagueId League ID - if set events from specific league will be returned (Optional)
matchId Match ID - if set only details from specific match will be returned (Optional)

Request URL


JSON Response

{
  "success": 1,
  "result": [
    {
      "event_key": "4343",
      "event_date": "2018-04-18",
      "event_time": "01:00",
      "event_home_team": "Toronto Raptors",
      "home_team_key": "51",
      "event_away_team": "Washington Wizards",
      "away_team_key": "55",
      "event_final_result": "130 - 119",
      "event_status": "3'",
      "country_name": "USA",
      "league_name": "NBA",
      "league_key": "787",
      "league_round": "1/8-finals",
      "league_season": "2017/2018",
      "event_live": "1",
      "scores": {
        "1stQuarter": [
          {
            "score_home": "44",
            "score_away": "27"
          }
        ],
        "2ndQuarter": [
          {
            "score_home": "32",
            "score_away": "31"
          }
        ],
        "3rdQuarter": [
          {
            "score_home": "24",
            "score_away": "32"
          }
        ],
        "4thQuarter": [
          {
            "score_home": "30",
            "score_away": "29"
          }
        ]
      },
      "statistics": {
        "Match": [
          {
            "type": "Field Goals Attempted",
            "home": "86",
            "away": "84"
          },
          {
            "type": "Field Goals Made",
            "home": "45",
            "away": "42"
          },
          {
            "type": "Field Goals %",
            "home": "52.3%",
            "away": "50%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "52",
            "away": "62"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "32",
            "away": "32"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "61.5%",
            "away": "51.6%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "34",
            "away": "22"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "13",
            "away": "10"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "38.2%",
            "away": "45.5%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "33",
            "away": "28"
          },
          {
            "type": "Free Throws Made",
            "home": "27",
            "away": "25"
          },
          {
            "type": "Free Throws %",
            "home": "81.8%",
            "away": "89.3%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "9",
            "away": "3"
          },
          {
            "type": "Defensive Rebounds",
            "home": "38",
            "away": "29"
          },
          {
            "type": "Total Rebounds",
            "home": "47",
            "away": "32"
          },
          {
            "type": "Assists",
            "home": "24",
            "away": "26"
          },
          {
            "type": "Blocks",
            "home": "7",
            "away": "3"
          },
          {
            "type": "Turnovers",
            "home": "13",
            "away": "9"
          },
          {
            "type": "Steals",
            "home": "5",
            "away": "7"
          },
          {
            "type": "Personal Fouls",
            "home": "27",
            "away": "24"
          },
          {
            "type": "Field Goals Attempted",
            "home": "27",
            "away": "26"
          },
          {
            "type": "Field Goals Made",
            "home": "16",
            "away": "11"
          },
          {
            "type": "Field Goals %",
            "home": "59.3%",
            "away": "42.3%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "14",
            "away": "18"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "9",
            "away": "8"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "64.3%",
            "away": "44.4%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "13",
            "away": "8"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "7",
            "away": "3"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "53.8%",
            "away": "37.5%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "6",
            "away": "2"
          },
          {
            "type": "Free Throws Made",
            "home": "5",
            "away": "2"
          },
          {
            "type": "Free Throws %",
            "home": "83.3%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "4",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "13",
            "away": "7"
          },
          {
            "type": "Total Rebounds",
            "home": "17",
            "away": "8"
          },
          {
            "type": "Assists",
            "home": "10",
            "away": "7"
          },
          {
            "type": "Blocks",
            "home": "2",
            "away": "0"
          },
          {
            "type": "Turnovers",
            "home": "3",
            "away": "3"
          },
          {
            "type": "Steals",
            "home": "2",
            "away": "1"
          },
          {
            "type": "Personal Fouls",
            "home": "5",
            "away": "6"
          },
          {
            "type": "Field Goals Attempted",
            "home": "23",
            "away": "17"
          },
          {
            "type": "Field Goals Made",
            "home": "12",
            "away": "11"
          },
          {
            "type": "Field Goals %",
            "home": "52.2%",
            "away": "64.7%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "14",
            "away": "15"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "8",
            "away": "11"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "57.1%",
            "away": "73.3%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "9",
            "away": "2"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "4",
            "away": "0"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "44.4%",
            "away": "0%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "4",
            "away": "11"
          },
          {
            "type": "Free Throws Made",
            "home": "4",
            "away": "9"
          },
          {
            "type": "Free Throws %",
            "home": "100%",
            "away": "81.8%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "1",
            "away": "0"
          },
          {
            "type": "Defensive Rebounds",
            "home": "8",
            "away": "8"
          },
          {
            "type": "Total Rebounds",
            "home": "9",
            "away": "8"
          },
          {
            "type": "Assists",
            "home": "6",
            "away": "9"
          },
          {
            "type": "Blocks",
            "home": "2",
            "away": "1"
          },
          {
            "type": "Turnovers",
            "home": "4",
            "away": "3"
          },
          {
            "type": "Steals",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Personal Fouls",
            "home": "9",
            "away": "4"
          },
          {
            "type": "Field Goals Attempted",
            "home": "19",
            "away": "21"
          },
          {
            "type": "Field Goals Made",
            "home": "9",
            "away": "12"
          },
          {
            "type": "Field Goals %",
            "home": "47.4%",
            "away": "57.1%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "13",
            "away": "16"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "9",
            "away": "9"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "69.2%",
            "away": "56.3%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "6",
            "away": "5"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "0",
            "away": "3"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "0%",
            "away": "60%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "10",
            "away": "6"
          },
          {
            "type": "Free Throws Made",
            "home": "6",
            "away": "5"
          },
          {
            "type": "Free Throws %",
            "home": "60%",
            "away": "83.3%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "2",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "7",
            "away": "8"
          },
          {
            "type": "Total Rebounds",
            "home": "9",
            "away": "9"
          },
          {
            "type": "Assists",
            "home": "4",
            "away": "4"
          },
          {
            "type": "Blocks",
            "home": "1",
            "away": "0"
          },
          {
            "type": "Turnovers",
            "home": "3",
            "away": "0"
          },
          {
            "type": "Steals",
            "home": "0",
            "away": "3"
          },
          {
            "type": "Personal Fouls",
            "home": "4",
            "away": "6"
          },
          {
            "type": "Field Goals Attempted",
            "home": "17",
            "away": "20"
          },
          {
            "type": "Field Goals Made",
            "home": "8",
            "away": "8"
          },
          {
            "type": "Field Goals %",
            "home": "47.1%",
            "away": "40%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "11",
            "away": "13"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "6",
            "away": "4"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "54.5%",
            "away": "30.8%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "6",
            "away": "7"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "2",
            "away": "4"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "33.3%",
            "away": "57.1%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "13",
            "away": "9"
          },
          {
            "type": "Free Throws Made",
            "home": "12",
            "away": "9"
          },
          {
            "type": "Free Throws %",
            "home": "92.3%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "2",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "10",
            "away": "6"
          },
          {
            "type": "Total Rebounds",
            "home": "12",
            "away": "7"
          },
          {
            "type": "Assists",
            "home": "4",
            "away": "6"
          },
          {
            "type": "Blocks",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Turnovers",
            "home": "3",
            "away": "3"
          },
          {
            "type": "Steals",
            "home": "1",
            "away": "1"
          },
          {
            "type": "Personal Fouls",
            "home": "9",
            "away": "8"
          }
        ],
        "1stQuarter": [
          {
            "type": "Field Goals Attempted",
            "home": "27",
            "away": "26"
          },
          {
            "type": "Field Goals Made",
            "home": "16",
            "away": "11"
          },
          {
            "type": "Field Goals %",
            "home": "59.3%",
            "away": "42.3%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "14",
            "away": "18"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "9",
            "away": "8"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "64.3%",
            "away": "44.4%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "13",
            "away": "8"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "7",
            "away": "3"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "53.8%",
            "away": "37.5%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "6",
            "away": "2"
          },
          {
            "type": "Free Throws Made",
            "home": "5",
            "away": "2"
          },
          {
            "type": "Free Throws %",
            "home": "83.3%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "4",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "13",
            "away": "7"
          },
          {
            "type": "Total Rebounds",
            "home": "17",
            "away": "8"
          },
          {
            "type": "Assists",
            "home": "10",
            "away": "7"
          },
          {
            "type": "Blocks",
            "home": "2",
            "away": "0"
          },
          {
            "type": "Turnovers",
            "home": "3",
            "away": "3"
          },
          {
            "type": "Steals",
            "home": "2",
            "away": "1"
          },
          {
            "type": "Personal Fouls",
            "home": "5",
            "away": "6"
          }
        ],
        "2ndQuarter": [
          {
            "type": "Field Goals Attempted",
            "home": "23",
            "away": "17"
          },
          {
            "type": "Field Goals Made",
            "home": "12",
            "away": "11"
          },
          {
            "type": "Field Goals %",
            "home": "52.2%",
            "away": "64.7%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "14",
            "away": "15"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "8",
            "away": "11"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "57.1%",
            "away": "73.3%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "9",
            "away": "2"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "4",
            "away": "0"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "44.4%",
            "away": "0%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "4",
            "away": "11"
          },
          {
            "type": "Free Throws Made",
            "home": "4",
            "away": "9"
          },
          {
            "type": "Free Throws %",
            "home": "100%",
            "away": "81.8%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "1",
            "away": "0"
          },
          {
            "type": "Defensive Rebounds",
            "home": "8",
            "away": "8"
          },
          {
            "type": "Total Rebounds",
            "home": "9",
            "away": "8"
          },
          {
            "type": "Assists",
            "home": "6",
            "away": "9"
          },
          {
            "type": "Blocks",
            "home": "2",
            "away": "1"
          },
          {
            "type": "Turnovers",
            "home": "4",
            "away": "3"
          },
          {
            "type": "Steals",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Personal Fouls",
            "home": "9",
            "away": "4"
          }
        ],
        "3rdQuarter": [
          {
            "type": "Field Goals Attempted",
            "home": "19",
            "away": "21"
          },
          {
            "type": "Field Goals Made",
            "home": "9",
            "away": "12"
          },
          {
            "type": "Field Goals %",
            "home": "47.4%",
            "away": "57.1%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "13",
            "away": "16"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "9",
            "away": "9"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "69.2%",
            "away": "56.3%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "6",
            "away": "5"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "0",
            "away": "3"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "0%",
            "away": "60%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "10",
            "away": "6"
          },
          {
            "type": "Free Throws Made",
            "home": "6",
            "away": "5"
          },
          {
            "type": "Free Throws %",
            "home": "60%",
            "away": "83.3%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "2",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "7",
            "away": "8"
          },
          {
            "type": "Total Rebounds",
            "home": "9",
            "away": "9"
          },
          {
            "type": "Assists",
            "home": "4",
            "away": "4"
          },
          {
            "type": "Blocks",
            "home": "1",
            "away": "0"
          },
          {
            "type": "Turnovers",
            "home": "3",
            "away": "0"
          },
          {
            "type": "Steals",
            "home": "0",
            "away": "3"
          },
          {
            "type": "Personal Fouls",
            "home": "4",
            "away": "6"
          }
        ],
        "4thQuarter": [
          {
            "type": "Field Goals Attempted",
            "home": "17",
            "away": "20"
          },
          {
            "type": "Field Goals Made",
            "home": "8",
            "away": "8"
          },
          {
            "type": "Field Goals %",
            "home": "47.1%",
            "away": "40%"
          },
          {
            "type": "2-Point Field G. Attempted",
            "home": "11",
            "away": "13"
          },
          {
            "type": "2-Point Field Goals Made",
            "home": "6",
            "away": "4"
          },
          {
            "type": "2-Point Field Goals %",
            "home": "54.5%",
            "away": "30.8%"
          },
          {
            "type": "3-Point Field G. Attempted",
            "home": "6",
            "away": "7"
          },
          {
            "type": "3-Point Field Goals Made",
            "home": "2",
            "away": "4"
          },
          {
            "type": "3-Point Field Goals %",
            "home": "33.3%",
            "away": "57.1%"
          },
          {
            "type": "Free Throws Attempted",
            "home": "13",
            "away": "9"
          },
          {
            "type": "Free Throws Made",
            "home": "12",
            "away": "9"
          },
          {
            "type": "Free Throws %",
            "home": "92.3%",
            "away": "100%"
          },
          {
            "type": "Offensive Rebounds",
            "home": "2",
            "away": "1"
          },
          {
            "type": "Defensive Rebounds",
            "home": "10",
            "away": "6"
          },
          {
            "type": "Total Rebounds",
            "home": "12",
            "away": "7"
          },
          {
            "type": "Assists",
            "home": "4",
            "away": "6"
          },
          {
            "type": "Blocks",
            "home": "2",
            "away": "2"
          },
          {
            "type": "Turnovers",
            "home": "3",
            "away": "3"
          },
          {
            "type": "Steals",
            "home": "1",
            "away": "1"
          },
          {
            "type": "Personal Fouls",
            "home": "9",
            "away": "8"
          }
        ]
      }
    }
.......
  ]
}
            

PHP call example


$APIkey=!_your_account_APIkey_!;

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

            


Standings


Method

GET/POST api/basketball/?met=Standings

Returns standings for leagues included in your current subscription plan


Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your allsportsapi account
leagueId League internal code

Request URL


JSON Response

{
  "success": 1,
  "result": {
    "total": [
      {
        "standing_place": "1",
        "standing_place_type": "Promotion - NBA (Play Offs)",
        "standing_team": "Toronto Raptors",
        "standing_P": "82",
        "standing_W": "59",
        "standing_L": "23",
        "standing_F": "9156",
        "standing_A": "8518",
        "standing_PCT": "0.720",
        "team_key": "51",
        "league_key": "787",
        "league_season": "2017/2018",
        "league_round": "Eastern Conference",
        "standing_updated": "2018-05-28 17:22:59"
      },
      {
        "standing_place": "2",
        "standing_place_type": "Promotion - NBA (Play Offs)",
        "standing_team": "Boston Celtics",
        "standing_P": "82",
        "standing_W": "55",
        "standing_L": "27",
        "standing_F": "8529",
        "standing_A": "8235",
        "standing_PCT": "0.671",
        "team_key": "52",
        "league_key": "787",
        "league_season": "2017/2018",
        "league_round": "Eastern Conference",
        "standing_updated": "2018-05-28 17:22:59"
      },
      {
        "standing_place": "3",
        "standing_place_type": "Promotion - NBA (Play Offs)",
        "standing_team": "Philadelphia 76ers",
        "standing_P": "82",
        "standing_W": "52",
        "standing_L": "30",
        "standing_F": "9004",
        "standing_A": "8635",
        "standing_PCT": "0.634",
        "team_key": "56",
        "league_key": "787",
        "league_season": "2017/2018",
        "league_round": "Eastern Conference",
        "standing_updated": "2018-05-28 17:23:00"
      }
.......
  ]
}
            

PHP call example


$APIkey=!_your_account_APIkey_!;
$leagueId = 758;

$curl_options = array(
  CURLOPT_URL => "https://allsportsapi.com/api/basketball/?met=Leagues&APIkey=$APIkey&leagueId=$leagueId",
  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/basketball/?met=Teams

Returns teams for leagues included in your current subscription plan


Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your allsportsapi account
leagueId League internal code

Request URL


JSON Response

{
  "success": 1,
  "result": [

  ]
}
            

PHP call example


$APIkey=!_your_account_APIkey_!;
$teamId = 2616;

$curl_options = array(
  CURLOPT_URL => "https://allsportsapi.com/api/basketball/?met=Teams&APIkey=$APIkey&teamId=$teamId",
  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);

            


Videos


Method

GET/POST api/basketball/?met=Videos

Returns videos for events included in your current subscription plan


Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your allsportsapi account
eventId Event internal Id

Request URL


JSON Response

{
  "success": 1,
  "result": [

  ]
}
            

PHP call example


$APIkey=!_your_account_APIkey_!;
$eventId = 76387;

$curl_options = array(
  CURLOPT_URL => "https://allsportsapi.com/api/basketball/?met=Players&APIkey=$APIkey&eventId=$eventId",
  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/basketball/?met=Odds

Returns odds for events included in your current subscription plan


Parameters

Parameter Description
action API method name
APIkey Authorization code generated from your allsportsapi account
from Start date (yyyy-mm-dd)
to Stop date (yyyy-mm-dd)
countryId Country ID - if set only events from specific country will be returned (Optional)
leagueId League ID - if set events from specific league will be returned (Optional)
matchId Match ID - if set only details from specific match will be returned (Optional)

Request URL


JSON Response

{
  "success": 1,
  "result": {
      "42297": {
          "1X2 - Full Time": {
              "1": {
                  "1xBet": "1.70",
                  "Betclic": "1.68",
                  "Betsafe": "1.70",
                  "Betsson": "1.70",
                  "Betway": "1.65",
                  "Chance.cz": "1.60",
                  "Expekt": "1.68",
                  "France Pari": "1.47",
                  "iFortuna.cz": "1.62",
                  "Jetbull": "1.70",
                  "Leonbets": "1.66",
                  "Marathonbet": "1.68",
                  "NordicBet": "1.70",
                  "STS.pl": "1.65",
                  "Tipsport.cz": "1.60",
                  "Tipsport.sk": "1.60",
                  "Unibet.fr": "1.66",
                  "Unibet.it": "1.68",
                  "youwin": "1.62"
              },
              "2": {
                  "1xBet": "2.58",
                  "Betclic": "2.44",
                  "Betsafe": "2.45",
                  "Betsson": "2.45",
                  "Betway": "2.30",
                  "Chance.cz": "2.45",
                  "Expekt": "2.44",
                  "France Pari": "2.15",
                  "iFortuna.cz": "2.41",
                  "Jetbull": "2.40",
                  "Leonbets": "2.39",
                  "Marathonbet": "2.61",
                  "NordicBet": "2.45",
                  "STS.pl": "2.42",
                  "Tipsport.cz": "2.45",
                  "Tipsport.sk": "2.45",
                  "Unibet.fr": "2.40",
                  "Unibet.it": "2.40",
                  "youwin": "2.35"
              },
              "X": {
                  "1xBet": "13.50",
                  "Betclic": "15.00",
                  "Betsafe": "11.50",
                  "Betsson": "11.50",
                  "Betway": "13.00",
                  "Chance.cz": "15.50",
                  "Expekt": "15.00",
                  "France Pari": "13.50",
                  "iFortuna.cz": "15.00",
                  "Jetbull": "11.00",
                  "Leonbets": "12.95",
                  "Marathonbet": "13.50",
                  "NordicBet": "11.50",
                  "STS.pl": "14.75",
                  "Tipsport.cz": "15.50",
                  "Tipsport.sk": "15.50",
                  "Unibet.fr": "14.00",
                  "Unibet.it": "14.00",
                  "youwin": "13.00"
              }
          },
          "1X2 - 1st Half": {
              "1": {
                  "bwin": "1.72",
                  "bwin.es": "1.72",
                  "bwin.fr": "1.65",
                  "Chance.cz": "1.75",
                  "iFortuna.cz": "1.68",
                  "Jetbull": "1.70",
                  "Leonbets": "1.71",
                  "Sportingbet": "1.72",
                  "Tipsport.cz": "1.75",
                  "Tipsport.sk": "1.75",
                  "Unibet.fr": "1.65"
              },
              "2": {
                  "bwin": "2.25",
                  "bwin.es": "2.25",
                  "bwin.fr": "2.15",
                  "Chance.cz": "2.28",
                  "iFortuna.cz": "2.26",
                  "Jetbull": "2.23",
                  "Leonbets": "2.18",
                  "Sportingbet": "2.25",
                  "Tipsport.cz": "2.28",
                  "Tipsport.sk": "2.28",
                  "Unibet.fr": "2.05"
              },
              "X": {
                  "bwin": "11.50",
                  "bwin.es": "11.50",
                  "bwin.fr": "9.50",
                  "Chance.cz": "10.50",
                  "iFortuna.cz": "11.00",
                  "Jetbull": "13.25",
                  "Leonbets": "18.05",
                  "Sportingbet": "11.50",
                  "Tipsport.cz": "10.50",
                  "Tipsport.sk": "10.50",
                  "Unibet.fr": "12.00"
              }
          }
      },
  .............
              

PHP call example


  $APIkey=!_your_account_APIkey_!;
  $eventId = 42297;

  $curl_options = array(
    CURLOPT_URL => "https://allsportsapi.com/api/basketball/?met=Odds&APIkey=$APIkey&matchId=$eventId",
    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);