Last five games

GET https://basketball.highlightly.net/last-five-games Basketball API
GET https://sports.highlightly.net/basketball/last-five-games All Sports API

Retrieve the last five finished games for one team.

Refresh interval
Immediately once a game is considered finished
Pagination
Not paginated

teamId is required and comes from teams.

Each game comes back in the same shape as a match on matches, including the full state with the quarter by quarter score. A form guide showing the result and the final score needs no follow up request.

This endpoint is built for the form section shown before a fixture, alongside head to head.

A form guide built from recent results

Parameters

Parameter Type Description
teamIdrequired number No description in the spec.e.g. 1635

Request

curl --request GET \
  --url 'https://basketball.highlightly.net/last-five-games?teamId=1635' \
  --header 'x-rapidapi-key: YOUR_API_KEY'
const params = new URLSearchParams({
  teamId: '1635'
})
const response = await fetch(`https://basketball.highlightly.net/last-five-games?${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/last-five-games',
    params={
        'teamId': '1635',
    },
    headers={
        'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
    },
    timeout=10,
)

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

Response

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.

Example response

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

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.