Highlights
Highlights are the core of the MLB & NCAA Baseball API. They cover everything from a single home run through to full game recaps and pre and post game interviews.
- Refresh interval
- Once a minute
- Plan
- May be restricted on Basic/Free
- Pagination
- limit and offset
Verified and unverified clips
Clips are aggregated from many different platforms. Depending on the source and what verification it has been through, each one falls into one of two types.
| type | What it means |
|---|---|
VERIFIED |
The clip comes from a reputable source that has been inspected. In most cases the author owns the copyright to the video. Verified highlights are uploaded between 1 and 48 hours after a match finishes. The hosting platform can still impose geo restrictions or block embedding, so check geo restrictions before showing one. |
UNVERIFIED |
The clip may not have been through verification, or is user uploaded. These cover a wider spectrum, including last minute scores, memorable plays and recaps. They are more real time and can appear while the game is still being played. How long they survive depends on the hosting platform. |
Reading a highlight
Every highlight carries a title describing what the video shows. Some also
carry a description that expands on it.
The source field records where the clip was aggregated from, for example
youtube, twitter, reddit or espn.
For some sources a channel is present as well, which is the uploading
channel's title. Together these let you narrow down which videos you want to show.
Where embedUrl is present you can embed the video directly in your own site
or app, once embeddable on
geo restrictions
confirms the hosting platform allows it.
Categories
The category field describes what kind of content the clip contains.
Categorisation happens automatically when a highlight is aggregated. A clip that cannot
be placed confidently is labelled other rather than being forced into a
category it does not belong to, so filtering on category in your own code
will not return unrelated content.
| Category | Contains |
|---|---|
match-highlights |
Edited recap of a match, including full game highlights and summaries in any language. |
home-run |
Home run. |
grand-slam |
Grand slam. |
walk-off |
Walk off game winner. |
hit-rbi |
Hits and RBI plays. |
pitching-highlight |
Strikeouts, gems and other pitching performances. |
defensive-highlight |
Diving catches, double plays and robbed home runs. |
stolen-base |
Stolen bases and baserunning plays. |
save-closer |
A closer shutting the game down. |
error-miscue |
Errors, misplays and miscues. |
injury |
A player injured on the play, carted or helped off, or exiting the game. |
viral-moment |
Celebrations, mascots, milestones, tributes and other spectacle moments. |
pre-match-content |
Previews, predictions and build up content ahead of a match. |
post-match-content |
Reactions, interviews and analysis after a match. |
spring-training |
Spring training content. |
other |
Clips that do not fit any other category. |
Plan coverage
On the Basic plan, MLB highlights are excluded. A Pro plan or higher removes the restriction and returns highlights from every league this API covers.
Querying
At least one primary query parameter must be specified before you can retrieve data.
timezone, limit and offset are secondary and do
not count on their own.
Combine timezone with date to get highlights relevant to your
own location rather than UTC. Teams can be filtered by id, name, abbreviation or display
name, so homeTeamAbbreviation works without resolving an id first.
limit sets how many highlights come back. When the number of matching
highlights exceeds it, request the next page by increasing offset. The
pagination object in every response tells you the
totalCount to page through.
Parameters
| Parameter | Type | Description |
|---|---|---|
leagueNameoptional
|
string |
No description in the spec.e.g. NCAA
|
dateoptional |
string |
Date that follows the YYYY-MM-DD format.e.g. 2022-06-10
|
timezoneoptional |
stringdefault Etc/UTC
|
Valid timezone identifier.e.g. Europe/London
|
seasonoptional |
number |
No description in the spec.e.g. 2022
|
matchIdoptional |
number |
No description in the spec.e.g. 343056
|
homeTeamIdoptional
|
number |
No description in the spec.e.g. 10291525
|
awayTeamIdoptional
|
number |
No description in the spec.e.g. 10291566
|
homeTeamNameoptional
|
string |
No description in the spec.e.g. Pirates
|
awayTeamNameoptional
|
string |
No description in the spec.e.g. Longhorns
|
homeTeamAbbreviationoptional
|
string |
No description in the spec.e.g. ECU
|
awayTeamAbbreviationoptional
|
string |
No description in the spec.e.g. TEX
|
homeTeamDisplayNameoptional
|
string |
No description in the spec.e.g. East Carolina
|
awayTeamDisplayNameoptional
|
string |
No description in the spec.e.g. Texas
|
limitoptional |
numberdefault 40
|
No description in the spec.e.g. 40
|
offsetoptional |
numberdefault 0
|
No description in the spec.e.g. 0
|
Request
curl --request GET \
--url 'https://baseball.highlightly.net/highlights?leagueName=NCAA&date=2022-06-10' \
--header 'x-rapidapi-key: YOUR_API_KEY'
const params = new URLSearchParams({
leagueName: 'NCAA',
date: '2022-06-10'
})
const response = await fetch(`https://baseball.highlightly.net/highlights?${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/highlights',
params={
'leagueName': 'NCAA',
'date': '2022-06-10',
},
headers={
'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
},
timeout=10,
)
response.raise_for_status()
data = response.json()
Response
dataBaseballHighlightResponse[]required28 fields
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
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": [
{
"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"
}
],
"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. |