Highlights

GET https://basketball.highlightly.net/highlights Basketball API
GET https://sports.highlightly.net/basketball/highlights All Sports API

Highlights are the core of the Basketball API. They cover everything from a single dunk through to full game recaps, plus pre and post match interviews.

Refresh interval
Once a minute
Plan
May be restricted on Basic/Free
Pagination
limit and offset, 40 per page

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 match 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. Certain entries 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.

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 selecting clips by their category value will not surface unrelated content.

Category Contains
match-highlights Edited recap of a match, including full game highlights and summaries in any language.
dunk Dunks and alley-oops.
three-pointer Three point makes.
and-one Basket plus the foul, including four point plays.
scoring-play Other made baskets such as layups, jumpers, floaters and free throws.
block Blocked shots.
steal Steals and takeaways.
assist-play Assists and playmaking passes.
crossover-handles Crossovers, ankle breakers and dribble moves.
buzzer-beater-game-winner Buzzer beaters and game winning shots.
big-performance Stat line performances such as career highs, double doubles and triple doubles.
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.
press-conference Official press conferences and media availability.
other Clips that do not fit any other category.

Highlights rendered in a client application

Plan coverage

On the Basic and Free plans, highlights are excluded from these leagues.

Country League
USA NBA
Europe Euroleague
Spain ACB
Russia VTB United League Promo-Cup
Russia VTB Super Cup
DE BBL
France LNB

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 considered secondary and do not count on their own.

Combine timezone with date to get highlights relevant to your own location rather than UTC.

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
countryCodeoptional string Country code specified by the ISO 3166 standard.e.g. AU
countryNameoptional string No description in the spec.e.g. Australia
leagueNameoptional string No description in the spec.e.g. NBL
leagueIdoptional number No description in the spec.e.g. 1635
dateoptional string Date that follows the YYYY-MM-DD format.e.g. 2023-10-01
timezoneoptional stringdefault Etc/UTC Valid timezone identifier.e.g. Europe/London
seasonoptional number No description in the spec.e.g. 2023
matchIdoptional number No description in the spec.e.g. 299340885
homeTeamIdoptional number No description in the spec.e.g. 7592
awayTeamIdoptional number No description in the spec.e.g. 1635
homeTeamNameoptional string No description in the spec.e.g. Adelaide
awayTeamNameoptional string No description in the spec.e.g. Melbourne United
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://basketball.highlightly.net/highlights?countryCode=AU&countryName=Australia' \
  --header 'x-rapidapi-key: YOUR_API_KEY'
const params = new URLSearchParams({
  countryCode: 'AU',
  countryName: 'Australia'
})
const response = await fetch(`https://basketball.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://basketball.highlightly.net/highlights',
    params={
        'countryCode': 'AU',
        'countryName': 'Australia',
    },
    headers={
        'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
    },
    timeout=10,
)

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

Response

dataBasketballHighlightResponse[]required42 fields
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
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

200 application/json
{
  "data": [
    {
      "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"
    }
  ],
  "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.