Programmatic access to the Sports Analysis Dataset through RESTful API endpoints.
http://localhost:3000/api
All API endpoints are relative to this base URL.
Retrieve all games in the dataset.
{
"success": true,
"count": 2,
"data": [
{
"game_id": "game_001",
"sport": "Football",
"date": "2026-01-15",
"venue": "Stadium A",
"duration_minutes": 90
}
]
}
Get detailed information about a specific game.
gameId - The ID of the game (e.g., "game_001"){
"success": true,
"data": {
"game_id": "game_001",
"sport": "Football",
"date": "2026-01-15",
"venue": "Stadium A",
"teams": {
"team_a": "Team Red",
"team_b": "Team Blue"
}
}
}
Retrieve all events with optional filtering.
gameId - Filter by game IDeventType - Filter by event type (goal, foul, etc.)sport - Filter by sportGET /api/events?gameId=game_001&eventType=goal
Get player tracking data for a specific game.
gameId - The ID of the gameGet aggregated statistics for the dataset.
{
"success": true,
"stats": {
"total_games": 2,
"total_events": 7,
"total_players": 16,
"sports": ["Football", "Basketball"]
}
}
// Get all games
fetch('http://localhost:3000/api/games')
.then(response => response.json())
.then(data => console.log(data));
// Get specific game
fetch('http://localhost:3000/api/games/game_001')
.then(response => response.json())
.then(data => console.log(data));
// Get events with filters
fetch('http://localhost:3000/api/events?eventType=goal&sport=Football')
.then(response => response.json())
.then(data => console.log(data));
import requests
# Get all games
response = requests.get('http://localhost:3000/api/games')
games = response.json()
print(games)
# Get specific game
response = requests.get('http://localhost:3000/api/games/game_001')
game = response.json()
print(game)
# Get filtered events
params = {'eventType': 'goal', 'sport': 'Football'}
response = requests.get('http://localhost:3000/api/events', params=params)
events = response.json()
print(events)
# Get all games
curl http://localhost:3000/api/games
# Get specific game
curl http://localhost:3000/api/games/game_001
# Get filtered events
curl "http://localhost:3000/api/events?eventType=goal&sport=Football"
To use the API, start the Node.js server:
npm install
node server.js
The API will be available at http://localhost:3000/api