Get highlight by ID
GET
https://baseball.highlightly.net/highlights/{id}
MLB & NCAA 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. Clips are hosted on third party platforms and can be removed or edited after aggregation, so a highlight you cached last week may no longer resolve.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequired
|
numberpath | Requested highlight id. |
Request
curl --request GET \
--url 'https://baseball.highlightly.net/highlights/{id}' \
--header 'x-rapidapi-key: YOUR_API_KEY'
const response = await fetch('https://baseball.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://baseball.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.
matchBaseballHighlightMatchResponserequired17 fields
idnumberrequired
roundstringrequired
datestringrequired
leaguestringrequired
seasonnumberrequired
awayTeamBaseballHighlightMatchTeamResponserequired5 fields
idnumberrequired
logostring
namestring
displayNamestringrequired
abbreviationstringrequired
homeTeamBaseballHighlightMatchTeamResponserequired5 fields
idnumberrequired
logostring
namestring
displayNamestringrequired
abbreviationstringrequired
channelstringChannel title of a given highlight.
sourcestringAggregation source from social media and other equivalent platforms.
categorystringAssumed highlight category
Example response
200 application/json
[
{
"id": 27,
"type": "VERIFIED",
"imgUrl": "https://example.com/images/preview/27.png",
"title": "NCAA: Bears vs Patriots",
"description": "Tom Poole sends one deep to right to give Dallas Baptist an insurance run over Baylor.",
"url": "https://example.com/highlight/v23r23fds2cff",
"embedUrl": "https://example.com/embed/v23r23fds2cff",
"match": {
"id": 394,
"round": "regular-season",
"date": "2024-03-06T00:30:00.000Z",
"league": "NCAA",
"season": 2024,
"awayTeam": {
"id": 219,
"logo": "https://example.com/logos/team/219.png",
"name": "Bears",
"displayName": "Baylor",
"abbreviation": "BAY"
},
"homeTeam": {
"id": 219,
"logo": "https://example.com/logos/team/219.png",
"name": "Bears",
"displayName": "Baylor",
"abbreviation": "BAY"
}
},
"channel": "MLB",
"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. |