The leagues the sports scores and odds APIs accept: NFL, NBA, MLB, NHL, college football and basketball, and the top soccer leagues, with sport, country and home time zone.
curl -X POST "https://api.primaryapi.com/v1/run/sports.leagues" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'{
"output": {
"found": true,
"data": {
"nextCursor": null,
"leagues": [
{
"name": "NFL",
"key": "nfl",
"sport": "american-football",
"country": "US", …
}, …
]
}
},
"credits": 1
}Input and output
0 fields
This API takes no input.
5 fields
league.date is read in for this league.Good to know
A fixed list of 18 leagues.
Which ones answer at a given time depends on the season. On data availability.
A league with no games that day returns found: false from sports.games. A miss is an answer, not an error.
Terms of use. Scores and schedules are informational; they are not official league data and are not suitable for settling bets. Team and league names are trademarks of their owners.
More from Sports. Same key, same credits.
The same key and credits work for every API.