Standings
Retrieve standings for a specific league, conference or division.
- Refresh interval
- Up to an hour after a match for the associated league and season is finished
- Pagination
- limit and offset
There are several ways to fetch the data. Use abbreviation or
leagueName to pick the league, leagueType such as
MLB, and year to choose the season.
Leagues
abbreviation is the short code and leagueName is the written
out form. Either works.
| League name | Abbreviation |
|---|---|
| American League (MLB) | AL |
| National League (MLB) | NL |
| NCAA Division I (CBASE) | NCAA |
Choosing a season
year narrows standings to a single season.
Parameters
| Parameter | Type | Description |
|---|---|---|
leagueTypeoptional
|
string |
No description in the spec.e.g. MLB
|
limitoptional |
numberdefault 10
|
No description in the spec.e.g. 5
|
offsetoptional |
numberdefault 0
|
No description in the spec.e.g. 0
|
leagueNameoptional
|
string |
No description in the spec.e.g. National League (MLB)
|
abbreviationoptional
|
string |
No description in the spec.e.g. NL
|
yearoptional |
number |
No description in the spec.e.g. 2024
|
Request
curl --request GET \
--url 'https://baseball.highlightly.net/standings?leagueType=MLB&leagueName=National%20League%20(MLB)' \
--header 'x-rapidapi-key: YOUR_API_KEY'
const params = new URLSearchParams({
leagueType: 'MLB',
leagueName: 'National League (MLB)'
})
const response = await fetch(`https://baseball.highlightly.net/standings?${params}`, {
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://baseball.highlightly.net/standings',
params={
'leagueType': 'MLB',
'leagueName': 'National League (MLB)',
},
headers={
'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
},
timeout=10,
)
response.raise_for_status()
data = response.json()
Response
dataBaseballStandingsResponse[]required15 fields
leagueNamestringrequired
abbreviationstringrequired
yearnumberrequired
leagueTypestringrequired
seasonTypestringrequired
startDatestringrequired
endDatestringrequired
dataBaseballStandingsTeamResponse[]required7 fields
idnumberrequired
logostring
namestringrequired
statsBaseballStandingsTeamStatsResponse[]required3 fields
descriptionstringrequired
abbreviationstringrequired
displayValuestringrequired
paginationPaginationResponserequired3 fields
totalCountnumberrequiredAvailable number of items, relevant to the provided query.
offsetnumberrequired
limitnumberrequired
planPlanResponserequired2 fields
tierstringrequiredYour current API subscription tier.
messagestringrequiredExplanation message regarding your current tier.
Example response
{
"data": [
{
"leagueName": "Cactus League (MLB)",
"abbreviation": "CAC",
"year": 2024,
"leagueType": "MLB",
"seasonType": "Spring Training",
"startDate": "2024-02-15T08:00:00.000Z",
"endDate": "2024-03-27T06:59:00.000Z",
"data": [
{
"id": 58,
"logo": "https://example.com/baseball/images/teams/58.png",
"name": "Dodgers",
"stats": [
{
"description": "Number of Overtime Losses",
"abbreviation": "OTL",
"displayValue": "0"
}
]
}
]
}
],
"pagination": {
"totalCount": 490,
"offset": 20,
"limit": 100
},
"plan": {
"tier": "BASIC",
"message": "Some results might be hidden with FREE tier. Check your API coverage for more information: https://rapidapi.com/highlightly-api-highlightly-api-default/api/sport-highlights-api/details"
}
}
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. |