Get league by ID

GET https://volleyball.highlightly.net/leagues/{id} Volleyball API
GET https://sports.highlightly.net/volleyball/leagues/{id} All Sports API

Retrieve one league by its id.

Use this to check whether a league you have stored still exists, or whether its information has been updated since you fetched it.

The seasons list comes back with it, so this also refreshes the seasons available for a league you already track, before requesting standings.

Parameters

Parameter Type Description
idrequired numberpath Requested league id.

Request

curl --request GET \
  --url 'https://volleyball.highlightly.net/leagues/{id}' \
  --header 'x-rapidapi-key: YOUR_API_KEY'
const response = await fetch('https://volleyball.highlightly.net/leagues/{id}', {
  headers: {
    'x-rapidapi-key': process.env.HIGHLIGHTLY_API_KEY
  }
})

if (!response.ok) {
  throw new Error(`Highlightly responded ${response.status}`)
}

const data = await response.json()
import os
import requests

response = requests.get(
    'https://volleyball.highlightly.net/leagues/{id}',
    headers={
        'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
    },
    timeout=10,
)

response.raise_for_status()
data = response.json()

Response

idnumberrequired
logostring
namestringrequired
countryVolleyballCountryResponserequired3 fields
codestringrequiredCountry code specified by the ISO 3166 standard.
namestringrequired
logostringrequired
seasonsVolleyballSeasonResponse[]required1 field
seasonnumberrequired

Example response

200 application/json
[
  {
    "id": 83331,
    "logo": "https://example.com/logos/league/83331.png",
    "name": "SuperLega",
    "country": {
      "code": "IT",
      "name": "Italy",
      "logo": "https://example.com/logos/country/IT.png"
    },
    "seasons": [
      {
        "season": 2023
      }
    ]
  }
]

Values are the examples declared in the OpenAPI spec, not a captured live response.

Errors

Status Description
400 Bad request descriptive error.
500 Internal server error.

Using a league id

League ids come from leagues. These endpoints accept one.

Endpoint Parameter
Highlights leagueId
Matches leagueId
Odds leagueId
Standings leagueId