Skip to Content

Leagues

Get a list of available leagues with optional sport filtering.

GET /api/v1/leagues

Requires an API key. Available on all tiers (Free included). Unauthenticated requests return 401.

Query Parameters

ParameterTypeDefaultDescription
sportstringallFilter by sport (e.g., basketball, football)

Example Requests

# List all leagues curl -X GET "https://api.sharpapi.io/api/v1/leagues" \ -H "X-API-Key: YOUR_API_KEY" # Filter by sport curl -X GET "https://api.sharpapi.io/api/v1/leagues?sport=basketball" \ -H "X-API-Key: YOUR_API_KEY"

Response

Success (200)

{ "data": [ { "id": "nba", "numerical_id": 87, "name": "NBA", "sport": "basketball", "event_count": 15, "live_count": 2 }, { "id": "ncaab", "numerical_id": 88, "name": "NCAAB", "sport": "basketball", "event_count": 27, "live_count": 1 }, { "id": "wnba", "numerical_id": 89, "name": "WNBA", "sport": "basketball", "event_count": 0, "live_count": 0 } ], "meta": { "count": 3, "total": 3, "pagination": { "limit": 50, "offset": 0, "has_more": false, "next_offset": null }, "updated_at": "2026-01-26T12:00:00Z", "filters": { "sport": "basketball" } } }

All Leagues (No Filter)

{ "data": [ { "id": "nba", "name": "NBA", "sport": "basketball", "event_count": 15, "live_count": 2 }, { "id": "ncaab", "name": "NCAAB", "sport": "basketball", "event_count": 27, "live_count": 1 }, { "id": "wnba", "name": "WNBA", "sport": "basketball", "event_count": 0, "live_count": 0 }, { "id": "nfl", "name": "NFL", "sport": "football", "event_count": 16, "live_count": 1 }, { "id": "ncaaf", "name": "NCAAF", "sport": "football", "event_count": 12, "live_count": 0 }, { "id": "nhl", "name": "NHL", "sport": "hockey", "event_count": 15, "live_count": 2 }, { "id": "mlb", "name": "MLB", "sport": "baseball", "event_count": 0, "live_count": 0 }, { "id": "epl", "name": "English Premier League", "sport": "soccer", "event_count": 10, "live_count": 2 }, { "id": "la_liga", "name": "La Liga", "sport": "soccer", "event_count": 10, "live_count": 1 }, { "id": "serie_a", "name": "Serie A", "sport": "soccer", "event_count": 10, "live_count": 1 }, { "id": "bundesliga", "name": "Bundesliga", "sport": "soccer", "event_count": 5, "live_count": 0 }, { "id": "mls", "name": "MLS", "sport": "soccer", "event_count": 0, "live_count": 0 }, { "id": "atp", "name": "ATP", "sport": "tennis", "event_count": 12, "live_count": 4 }, { "id": "wta", "name": "WTA", "sport": "tennis", "event_count": 6, "live_count": 2 }, { "id": "ufc", "name": "UFC", "sport": "mma", "event_count": 12, "live_count": 0 }, { "id": "pga", "name": "PGA Tour", "sport": "golf", "event_count": 4, "live_count": 1 } ], "meta": { "count": 16, "total": 16, "pagination": { "limit": 50, "offset": 0, "has_more": false, "next_offset": null }, "updated_at": "2026-01-26T12:00:00Z", "filters": {} } }

League Object Schema

FieldTypeDescription
idstringLeague identifier (lowercase, use in API filters)
numerical_idinteger | nullStable integer key for the league (frozen, never reused). New (May 2026) — additive, optional. See Entity reference IDs.
namestringHuman-readable league name
sportstringParent sport ID
event_countintegerTotal events currently available with odds
live_countintegerEvents currently live/in-play

New (May 2026): numerical_id

numerical_id is a frozen, dense-from-1 integer assigned per league in the SharpAPI atlas. The full registry currently spans ~1,000 leagues across all 19 sports. Use it as a compact join/index key when storing rows in your own database.

  • Frozen: never reused or remapped.
  • Optional: absent (or null) for leagues that haven’t been mapped yet — slug id is always present.
  • Domain-scoped: unique across leagues only.

Every odds row and opportunity leg also carries a matching league_ref block ({id, label, numerical_id}) so you don’t need to second-fetch this endpoint just to label a row. See Entity reference IDs for the full contract.

Leagues by Sport

Basketball

IDDisplay NameDescription
nbaNBANational Basketball Association
ncaabNCAABNCAA Men’s Basketball
wnbaWNBAWomen’s National Basketball Association

Football

IDDisplay NameDescription
nflNFLNational Football League
ncaafNCAAFNCAA Football

Hockey

IDDisplay NameDescription
nhlNHLNational Hockey League

Baseball

IDDisplay NameDescription
mlbMLBMajor League Baseball

Soccer

IDDisplay NameDescription
eplEnglish Premier LeagueEnglish Premier League
la_ligaLa LigaSpanish La Liga
serie_aSerie AItalian Serie A
bundesligaBundesligaGerman Bundesliga
mlsMLSMajor League Soccer

Tennis

IDDisplay NameDescription
atpATPAssociation of Tennis Professionals
wtaWTAWomen’s Tennis Association

MMA

IDDisplay NameDescription
ufcUFCUltimate Fighting Championship

Golf

IDDisplay NameDescription
pgaPGA TourProfessional Golfers’ Association Tour

The event_count and live_count values are dynamic. Off-season leagues (e.g., MLB in winter, WNBA in fall) will show 0 events.

Using Leagues in Filters

Use the league id as a filter parameter on other endpoints:

# Get NBA odds curl "https://api.sharpapi.io/api/v1/odds?league=nba" \ -H "X-API-Key: YOUR_API_KEY" # Get best odds for NFL and NBA curl "https://api.sharpapi.io/api/v1/odds/best?league=nfl,nba" \ -H "X-API-Key: YOUR_API_KEY"
Last updated on