Exemplar Crops
Retrieve example player and team appearance crops from the analysis. These are representative images of each tracked player and team, selected by the aggregator from across the match.
Availability
Exemplar crops are available for analyses processed with engine version 0.5.30+. Older analyses will return a 404.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/analyses/{id}/exemplar-crops |
GET | List available crops |
/analyses/{id}/exemplar-crops/individuals/{player_id}/{index} |
GET | Get a player crop |
/analyses/{id}/exemplar-crops/teams/{team}/{index} |
GET | Get a team crop |
List Available Crops
GET /analyses/{id}/exemplar-crops
Response
{
"individuals": {
"0-GK": 5,
"0-2": 5,
"0-4": 5,
"0-5": 5,
"1-GK": 5,
"1-2": 5,
"1-4": 5
},
"teams": {
"team_0": 10,
"team_1": 10
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
individuals |
object | Map of player ID to number of available crops (typically 5) |
teams |
object | Map of team key (team_0, team_1) to number of available crops (typically 10) |
Get Player Crop
GET /analyses/{id}/exemplar-crops/individuals/{player_id}/{index}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
player_id |
string | Player identifier (e.g., 0-10, 1-GK). See Player IDs. |
index |
integer | Crop index, starting from 0. Use the listing endpoint to check how many are available. |
Response
Returns a JPEG image (image/jpeg).
Get Team Crop
GET /analyses/{id}/exemplar-crops/teams/{team}/{index}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
team |
string | team_0 or team_1 |
index |
integer | Crop index, starting from 0 |
Response
Returns a JPEG image (image/jpeg).
Example
# List available crops
curl -X GET "https://aiontheball.nl/api/v1/analyses/1246/exemplar-crops" \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Download a player crop
curl -X GET "https://aiontheball.nl/api/v1/analyses/1246/exemplar-crops/individuals/0-10/0" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-o player_0-10_crop.jpg
# Download a team crop
curl -X GET "https://aiontheball.nl/api/v1/analyses/1246/exemplar-crops/teams/team_0/0" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-o team_0_crop.jpg
import requests
base = "https://aiontheball.nl/api/v1/analyses/1246"
headers = {"Authorization": f"Bearer {token}"}
# List what's available
listing = requests.get(f"{base}/exemplar-crops", headers=headers).json()
# Download all crops for a player
player_id = "0-10"
count = listing["individuals"].get(player_id, 0)
for i in range(count):
resp = requests.get(
f"{base}/exemplar-crops/individuals/{player_id}/{i}",
headers=headers,
)
with open(f"{player_id}_crop_{i}.jpg", "wb") as f:
f.write(resp.content)
const base = `https://aiontheball.nl/api/v1/analyses/1246`;
// List available crops
const listing = await fetch(`${base}/exemplar-crops`, { headers })
.then(r => r.json());
// Get a player crop as a blob (for display in <img>)
const blob = await fetch(
`${base}/exemplar-crops/individuals/0-10/0`,
{ headers }
).then(r => r.blob());
const img = document.createElement('img');
img.src = URL.createObjectURL(blob);