Fast JSON API for ESPN sports data - live scores, schedules and results, match details, boxscores, play-by-play, lineups, odds, win probability, standings, teams, rosters, player statistics, injuries, rankings, search and news for NFL, NBA, MLB, NHL, soccer, tennis, golf, MMA and more.
Includes 100 free calls per month
After the free quota, standard per-request pricing applies via x402 (USDC on Base).
Returns the leagues and competitions of a sport with their ids, names, abbreviations and slugs. The slug is what the other endpoints take as the "league" parameter.
Request schema
Sport slug as returned by the sports list (e.g. basketball, football, soccer)
Response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"abbreviation": {
"type": "string"
},
"shortName": {
"type": "string"
},
"slug": {
"type": "string"
},
"hasStandings": {
"type": "boolean"
}
}
}
}Returns the list of all sports with their ids, names and slugs. The slug is what the other endpoints take as the "sport" parameter.
Request schema
{
"type": "object",
"properties": {}
}Response schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
}
}
}Easiest way: the APIHub CLI. Credits cover x402, no wallet needed.
# install and set up once
npx @apihubio/cli register
npx @apihubio/cli topup 10
# call this service
npx @apihubio/cli call -X GET "https://proxy.apihub.io/espn/v1/general/leagues" \
-d '{"sport":"basketball"}'Or call the proxy directly (curl / any HTTP client):
curl https://proxy.apihub.io/espn/v1/general/leagues \
-H "Authorization: Bearer ahk_your_key"
# If credits available: charged automatically, returns 200
# Otherwise: returns 402 (pay via @x402/fetch or top up credits)Estimate your monthly cost for ESPN.