Athletes
Athlete Season Stats
Get season-by-season statistics for an athlete in a specific competition
GET
/
athletes
/
trophies
/
stats
Athlete Season Stats
curl --request GET \
--url https://api.sportsapipro.com/v1/football/athletes/trophies/stats \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sportsapipro.com/v1/football/athletes/trophies/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/football/athletes/trophies/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/football/athletes/trophies/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/football/athletes/trophies/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/football/athletes/trophies/stats")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sportsapipro.com/v1/football/athletes/trophies/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{
"stats": {
"columns": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"rows": [
{
"season": "<string>",
"seasonNum": 123,
"competitionId": 123,
"competitionName": "<string>",
"appearances": 123,
"goals": 123,
"assists": 123,
"yellowCards": 123,
"redCards": 123,
"minutesPlayed": 123,
"avgRating": 123
}
]
},
"athletes": "<array>",
"competitions": "<array>"
}Endpoint
GET https://api.sportsapipro.com/v1/football/athletes/trophies/stats
Description
Retrieves comprehensive season-by-season statistics for a specific athlete, optionally filtered by competition. This endpoint provides historical performance data essential for career analysis, season comparisons, and statistical breakdowns.Built-in TTL: 300 seconds (5 minutes). Season statistics are cached longer as they change less frequently.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
athleteId | number | Yes | - | The unique identifier of the athlete |
competitionId | number | Yes* | - | The competition to retrieve stats for |
competitionId is effectively required. While technically optional, omitting it will return empty data ("No data available") for most athletes. Always provide a competitionId to get results.Common competition IDs: Premier League (
7), La Liga (104), Serie A (17), Bundesliga (199), Ligue 1 (176), Champions League (572).Request Examples
# Get stats for athlete in a specific competition
curl -X GET "https://api.sportsapipro.com/v1/football/athletes/trophies/stats?athleteId=874&competitionId=104" \
-H "x-api-key: YOUR_API_KEY"
# Get all competition stats for an athlete
curl -X GET "https://api.sportsapipro.com/v1/football/athletes/trophies/stats?athleteId=874" \
-H "x-api-key: YOUR_API_KEY"
// Specific competition
const response = await fetch(
`https://api.sportsapipro.com/v1/football/athletes/trophies/stats?athleteId=874&competitionId=104`,
{
headers: { "x-api-key": "YOUR_API_KEY" }
}
);
const data = await response.json();
response = requests.get(
"https://api.sportsapipro.com/v1/football/athletes/trophies/stats",
params={
"athleteId": 874,
"competitionId": 104
},
headers={"x-api-key": "YOUR_API_KEY"}
)
data = response.json()
Response
{
"lastUpdateId": 5494796687,
"requestedUpdateId": -1,
"ttl": 300,
"stats": {
"columns": [
{ "id": "season", "name": "Season", "type": "string" },
{ "id": "appearances", "name": "Apps", "type": "number" },
{ "id": "goals", "name": "Goals", "type": "number" },
{ "id": "assists", "name": "Assists", "type": "number" },
{ "id": "yellowCards", "name": "YC", "type": "number" },
{ "id": "redCards", "name": "RC", "type": "number" },
{ "id": "minutesPlayed", "name": "Mins", "type": "number" },
{ "id": "avgRating", "name": "Avg Rating", "type": "number" }
],
"rows": [
{
"season": "2024/25",
"seasonNum": 25,
"competitionId": 104,
"competitionName": "La Liga",
"appearances": 28,
"goals": 22,
"assists": 14,
"yellowCards": 3,
"redCards": 0,
"minutesPlayed": 2340,
"avgRating": 8.2
},
{
"season": "2023/24",
"seasonNum": 24,
"competitionId": 104,
"competitionName": "La Liga",
"appearances": 35,
"goals": 26,
"assists": 16,
"yellowCards": 5,
"redCards": 0,
"minutesPlayed": 2980,
"avgRating": 8.4
}
]
},
"athletes": [...],
"competitions": [...],
"sports": [...]
}
Response Fields
Root Object
| Field | Type | Description |
|---|---|---|
lastUpdateId | number | Internal versioning ID for incremental updates |
requestedUpdateId | number | Requested update ID (-1 = latest) |
ttl | number | Cache TTL in seconds (300 for this endpoint) |
stats | object | Statistics container with columns and rows |
athletes | array | Athlete information |
competitions | array | Competition definitions |
sports | array | Sport definitions |
Stats Object
| Field | Type | Description |
|---|---|---|
columns | array | Column definitions for interpreting row data |
rows | array | Season-by-season statistical data |
Column Object
| Field | Type | Description |
|---|---|---|
id | string | Column identifier |
name | string | Human-readable column name |
type | string | Data type: “string”, “number” |
Row Object (Season Stats)
| Field | Type | Description |
|---|---|---|
season | string | Season display name (e.g., “2024/25”) |
seasonNum | number | Numeric season identifier |
competitionId | number | Competition ID |
competitionName | string | Competition name |
appearances | number | Total appearances |
goals | number | Goals scored |
assists | number | Assists provided |
yellowCards | number | Yellow cards received |
redCards | number | Red cards received |
minutesPlayed | number | Total minutes played |
avgRating | number | Average match rating (1.0-10.0) |
Use Cases
Career Statistics Table
// Fetch all-time stats across competitions
const response = await fetch(
`https://api.sportsapipro.com/v1/football/athletes/trophies/stats?athleteId=874`,
{ headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { stats } = await response.json();
// Render a data table using columns for headers
const headers = stats.columns.map(col => col.name);
const rows = stats.rows.map(row =>
stats.columns.map(col => row[col.id])
);
Season Comparison Chart
// Compare goal output across seasons
const goalsBySeasonData = stats.rows.map(row => ({
season: row.season,
goals: row.goals,
assists: row.assists
}));
// Use with charting library
<BarChart data={goalsBySeasonData} />
Multi-Competition Career Summary
// Fetch stats for multiple competitions concurrently
const competitionIds = [104, 572, 596]; // La Liga, UCL, Copa del Rey
const statsPromises = competitionIds.map(compId =>
fetch(`https://api.sportsapipro.com/v1/football/athletes/trophies/stats?athleteId=874&competitionId=${compId}`,
{ headers: { "x-api-key": "YOUR_API_KEY" } }
).then(r => r.json())
);
const allStats = await Promise.all(statsPromises);
Error Responses
| Status | Description |
|---|---|
| 400 | Missing required athleteId parameter |
| 401 | Invalid or missing API key |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
{
"error": "Missing required parameter: athleteId"
}
Authorizations
Your SportsAPI Pro API key
Query Parameters
The unique identifier of the athlete
Example:
874
Filter stats to a specific competition
Example:
104
Last modified on June 29, 2026
Was this page helpful?
⌘I
Athlete Season Stats
curl --request GET \
--url https://api.sportsapipro.com/v1/football/athletes/trophies/stats \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sportsapipro.com/v1/football/athletes/trophies/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/football/athletes/trophies/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/football/athletes/trophies/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/football/athletes/trophies/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/football/athletes/trophies/stats")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sportsapipro.com/v1/football/athletes/trophies/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{
"stats": {
"columns": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"rows": [
{
"season": "<string>",
"seasonNum": 123,
"competitionId": 123,
"competitionName": "<string>",
"appearances": 123,
"goals": 123,
"assists": 123,
"yellowCards": 123,
"redCards": 123,
"minutesPlayed": 123,
"avgRating": 123
}
]
},
"athletes": "<array>",
"competitions": "<array>"
}