Get highlight by ID
GET
https://basketball.highlightly.net/highlights/{id}
Basketball API
Retrieve one highlight by its id.
Use this to check whether a highlight you have already stored still exists, or whether its information has been updated since you fetched it.
The match the clip belongs to comes back with it, including its
state, which carries the score, so a stored highlight can be
shown in context without a second request.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequired
|
numberpath | Requested highlight id. |
Request
curl --request GET \
--url 'https://basketball.highlightly.net/highlights/{id}' \
--header 'x-rapidapi-key: YOUR_API_KEY'
const response = await fetch('https://basketball.highlightly.net/highlights/{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://basketball.highlightly.net/highlights/{id}',
headers={
'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
},
timeout=10,
)
response.raise_for_status()
data = response.json()
Response
idnumberrequired
typestringrequired
imgUrlstringPreview picture of the highlight.
titlestringrequired
descriptionstring
urlstringrequiredUrl location of the video highlight.
embedUrlstringUrl of embeddable video highlight.
matchBasketballMatchResponserequired31 fields
idnumberrequired
weekstring
stagestringrequired
datestringrequired
countryBasketballCountryResponserequired3 fields
codestringrequiredCountry code specified by the ISO 3166 standard.
namestringrequired
logostringrequired
awayTeamBasketballTeamResponserequired3 fields
idnumberrequired
logostring
namestringrequired
homeTeamBasketballTeamResponserequired3 fields
idnumberrequired
logostring
namestringrequired
leagueBasketballMatchLeagueResponserequired4 fields
idnumberrequired
seasonnumberrequired
namestringrequired
logostring
stateBasketballMatchStateResponserequired9 fields
descriptionstringrequiredState of the match.Not startedFirst quarterSecond quarterThird quarterFourth quarterOver timeBreak timeHalf timeFinishedFinished after over timePostponedCancelledSuspendedAwardedAbandonedUnknownTo be announced
clocknumberCurrent minute of the current period.
scoreBasketballMatchScoreResponserequired6 fields
currentstringHome - Away score for the match. Includes overtime as well.
q1stringHome - Away score in 1st quarter.
q2stringHome - Away score in 2nd quarter.
q3stringHome - Away score in 3rd quarter.
q4stringHome - Away score in 4th quarter.
overTimestringHome - Away score in overtime.
channelstringChannel title of a given highlight.
sourcestringAggregation source from social media and other equivalent platforms.
categorystringAssumed highlight category
Example response
200 application/json
[
{
"id": 28,
"type": "VERIFIED",
"imgUrl": "https://example.com/images/preview/28.png",
"title": "NBL: Adelaide vs Melbourne United",
"description": "Game recap of the match.",
"url": "https://example.com/highlight/213123safas132e",
"embedUrl": "https://example.com/embed/213123safas132e",
"match": {
"id": 489389,
"week": "1",
"stage": "Final",
"date": "2023-10-01T03:00:00.000Z",
"country": {
"code": "AU",
"name": "Australia",
"logo": "https://example.com/logos/country/AU.png"
},
"awayTeam": {
"id": 7592,
"logo": "https://example.com/logos/team/7592.png",
"name": "Adelaide"
},
"homeTeam": {
"id": 7592,
"logo": "https://example.com/logos/team/7592.png",
"name": "Adelaide"
},
"league": {
"id": 1635,
"season": 2023,
"name": "NBL",
"logo": "https://example.com/logos/league/1635.png"
},
"state": {
"description": "Finished",
"clock": 9,
"score": {
"current": "105 - 104",
"q1": "22 - 15",
"q2": "17 - 33",
"q3": "11 - 27",
"q4": "33 - 14",
"overTime": "22 - 15"
}
}
},
"channel": "NBA",
"source": "youtube",
"category": "match-highlights"
}
]
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. |