Getting Started
Getting Started with SportsStack
SportsStack is a unified sports data API that normalizes data from 25+ providers — Sportradar, Genius Sports, Optic Odds, SportsData.io, and more — into one consistent schema. Write one integration, and it works with every source.
Your first API call
Grab your API key from Dashboard → Settings → API Keys, then make your first request:
curl "https://api.sportsstack.io/api/v1/teams?league_id=nfl" \
-H "Authorization: Bearer YOUR_API_KEY"import requests
resp = requests.get(
"https://api.sportsstack.io/api/v1/teams",
params={"league_id": "nfl"},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
teams = resp.json()["data"]
print(f"{len(teams)} NFL teams")const resp = await fetch(
"https://api.sportsstack.io/api/v1/teams?league_id=nfl",
{ headers: { Authorization: "Bearer YOUR_API_KEY" } }
);
const { data: teams } = await resp.json();
console.log(`${teams.length} NFL teams`);You'll get back a list of NFL teams, each with a common_model_id — a universal identifier that stays the same regardless of which data provider sourced it.
Key concepts
Unified Schema
Every provider formats data differently. Sportradar uses passingYds, SportsData.io uses passing_yds, FTN uses passing-yds. SportsStack normalizes all of these into a single consistent schema — passing_yards — so you never have to write provider-specific parsing logic.
Universal IDs
Every entity (player, team, event, market) gets a common_model_id — a stable UUID that maps across all providers. Patrick Mahomes has different IDs in Sportradar, FTN, and ESPN, but one common_model_id in SportsStack. Use the ID Explorer to translate between provider IDs and universal IDs.
Provider-agnostic
Switch providers or add new data sources without changing your code. Your integration talks to SportsStack, and SportsStack handles the rest — authentication, rate limits, format normalization, and ID resolution for each provider behind the scenes.
Core endpoints
| Endpoint | Description |
|---|---|
GET /v1/sports | Sports categories |
GET /v1/leagues | Leagues and competitions |
GET /v1/teams | Teams and organizations |
GET /v1/players | Player profiles |
GET /v1/events | Games, matches, and schedules |
GET /v1/event-stats | Per-game statistics |
GET /v1/seasons/:year/season-stats | Season-aggregated stats |
GET /v1/markets | Betting market types |
GET /v1/odds | Sportsbook odds |
GET /v1/futures | Futures and outrights |
GET /v1/news | News and injury reports |
GET /v1/standings | League standings |
All endpoints return JSON and require a Bearer token in the Authorization header. See the API Reference for full details.
Common query patterns
Filter by league
Most endpoints accept a league_id parameter to scope results:
# Get all NBA events
curl "https://api.sportsstack.io/api/v1/events?league_id=nba" \
-H "Authorization: Bearer YOUR_API_KEY"Get live game stats
# Get stats for a specific event
curl "https://api.sportsstack.io/api/v1/events/{event_id}/event-stats" \
-H "Authorization: Bearer YOUR_API_KEY"Get odds across sportsbooks
# Get latest odds for an event
curl "https://api.sportsstack.io/api/v1/odds/latest?event_id={event_id}" \
-H "Authorization: Bearer YOUR_API_KEY"Real-time updates with webhooks
SportsStack can push data changes to your server in real time via webhooks. You'll receive notifications when entities change — scores update, odds move, injuries are reported, etc.
{
"stream": "change_log",
"resource_type": "event",
"entity_id": "evt-abc-123",
"event": {
"common_model_id": "evt-abc-123",
"changed_at": "2025-01-15T20:30:00Z"
}
}See the Webhooks Guide for setup instructions.
Supported sports
SportsStack covers major North American and international leagues:
- Football: NFL, NCAAF
- Basketball: NBA, NCAAB, WNBA
- Baseball: MLB
- Hockey: NHL
- Soccer: EPL, La Liga, Serie A, MLS, and more
- Golf: PGA Tour
- Tennis: ATP, WTA
- MMA: UFC
Coverage varies by provider and sport. See the Coverage Matrix for a full breakdown.
Next steps
- Quickstart — Step-by-step first integration
- Authentication — API keys and security best practices
- API Usage Guide — Deep dive into the data model
- Webhooks Guide — Set up real-time notifications
- Rate Limits — Usage limits and headers
- Stat Types Reference — 1,000+ normalized stat fields
- Market Types Reference — 835+ betting market types
Updated 29 days ago
