Leagues & Sport API Documentation
Description
This endpoint returns all the available leagues that are active in a given sport, ie: NFL, NBA, MLB, NHL, Premier League, college football, basketball & more.
REQUIREMENT
You'll need a license key to use OpticOdds' API. You can get one by contacting us at www.opticodds.com.
API Endpoint
https://api.opticodds.com/api/v2/leagues
Parameters
NOTE
You can pass in multiple of the same parameters in each GET
request.
key
(required)
Your OpticOdds API license key.
sport
NOTE
You can pass in multiple of this parameter.
The sport you want to receive leagues for. We support the following:
football
basketball
baseball
mma
boxing
hockey
soccer
tennis
golf
motorsports
esports
wrestling
aussie-rules
rugby
lacrosse
cricket
volleyball
politics
is_live
Flag to filter for odds for live leagues (supports values true
, yes
, t
, 1
)
all
Get all leagues that we offer, not just the ones that currently have games.
detailed
Get the id and the name of all the leagues that we offer.
Example Response
{
"data": [
"UEFA - Europa League",
"NHL",
"Fed-Ex 500 Round 3",
"ATP",
"Spain - La Liga",
"Boxing",
"WTA",
"Fed-Ex 500 Events",
"England - Premier League",
"France - Ligue 1",
"NCAA",
"NFL",
"Italy - Serie A",
"NBA",
"Germany - Bundesliga",
"UEFA - Champions League",
"UFC"
]
}
Example Response (detailed)
https://api.opticodds.com/api/v2/leagues?all=true&detailed=true
{
{"id": "nfl", "label": "NFL"},
{"id": "uefa_-_champions_league", "label": "UEFA - Champions League"},
...
}