Basketball V1
Competition Statistics
Get statistical leaders for basketball competitions
GET
/
stats
Competition Statistics
curl --request GET \
--url https://api.sportsapipro.com/v1/basketball/stats \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sportsapipro.com/v1/basketball/stats"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sportsapipro.com/v1/basketball/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sportsapipro.com/v1/basketball/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sportsapipro.com/v1/basketball/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sportsapipro.com/v1/basketball/stats")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sportsapipro.com/v1/basketball/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyV1 Legacy Endpoint — This is a V1 API endpoint. For new integrations, we recommend using the Basketball V2 API which provides richer data and more endpoints.
Overview
Returns statistical leaders for a basketball competition, including top scorers, rebounders, assisters, and other key metrics.Query Parameters
Code Examples
curl -X GET "https://api.sportsapipro.com/v1/basketball/stats?competitions=132&withSeasons=true" \
-H "x-api-key: YOUR_API_KEY"
const response = await fetch(
'https://api.sportsapipro.com/v1/basketball/stats?competitions=132&withSeasons=true',
{ headers: { 'x-api-key': 'YOUR_API_KEY' } }
);
const stats = await response.json();
// Get top scorers
const topScorers = stats.categories
.find(c => c.name === 'Points')?.leaders || [];
console.log('Top Scorers:', topScorers.slice(0, 5));
import requests
response = requests.get(
'https://api.sportsapipro.com/v1/basketball/stats',
params={'competitions': 132, 'withSeasons': True},
headers={'x-api-key': 'YOUR_API_KEY'}
)
stats = response.json()
Response Structure
Statistical categories with leaders
Example Response
{
"categories": [
{
"id": 1,
"name": "Points",
"leaders": [
{
"athlete": {
"id": 12345,
"name": "Luka Dončić",
"team": {
"id": 2800,
"name": "Dallas Mavericks"
},
"imageUrl": "..."
},
"value": 33.5,
"rank": 1,
"gamesPlayed": 45
}
]
},
{
"id": 2,
"name": "Rebounds",
"leaders": [...]
},
{
"id": 3,
"name": "Assists",
"leaders": [...]
}
],
"season": {
"id": 2025,
"name": "2025-26 Season",
"isCurrent": true
}
}
Statistical Categories
Common basketball statistical categories:| Category | Description |
|---|---|
| Points | Points per game (PPG) |
| Rebounds | Rebounds per game (RPG) |
| Assists | Assists per game (APG) |
| Steals | Steals per game (SPG) |
| Blocks | Blocks per game (BPG) |
| Field Goal % | Shooting percentage |
| 3-Point % | Three-point percentage |
| Free Throw % | Free throw percentage |
Query Parameters
Response
200 - application/json
Statistics retrieved successfully
Last modified on June 29, 2026
Was this page helpful?
⌘I
Competition Statistics
curl --request GET \
--url https://api.sportsapipro.com/v1/basketball/stats \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sportsapipro.com/v1/basketball/stats"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sportsapipro.com/v1/basketball/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sportsapipro.com/v1/basketball/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sportsapipro.com/v1/basketball/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sportsapipro.com/v1/basketball/stats")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sportsapipro.com/v1/basketball/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body