Last five games
Retrieve the last five finished games for a team.
- Refresh interval
- Immediately once a game is considered finished
- Pagination
- Not paginated
Specify teamId, which comes from
teams.
This is the endpoint behind a form guide. Call it for both sides of an upcoming fixture and you have the recent form section commonly shown above a match preview. For the record between those two specific teams, use head to head instead.
Parameters
| Parameter | Type | Description |
|---|---|---|
teamIdrequired
|
number |
No description in the spec.e.g. 5700782
|
Request
curl --request GET \
--url 'https://soccer.highlightly.net/last-five-games?teamId=5700782' \
--header 'x-rapidapi-key: YOUR_API_KEY'
const params = new URLSearchParams({
teamId: '5700782'
})
const response = await fetch(`https://soccer.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://soccer.highlightly.net/last-five-games',
params={
'teamId': '5700782',
},
headers={
'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
},
timeout=10,
)
response.raise_for_status()
data = response.json()
Response
idnumberrequired
roundstringrequired
datestringrequired
countryCountryResponserequired3 fields
codestringrequiredCountry code specified by the ISO 3166 standard.
namestringrequired
logostringrequired
awayTeamTeamResponserequired4 fields
idnumberrequired
logostring
namestringrequired
typestringclubnational
homeTeamTeamResponserequired4 fields
idnumberrequired
logostring
namestringrequired
typestringclubnational
leagueMatchLeagueResponserequired4 fields
idnumberrequired
seasonnumberrequired
namestringrequired
logostring
stateMatchStateResponserequired5 fields
descriptionstringrequiredState of the match.To be announcedNot startedFirst halfHalf timeSecond halfExtra timeBreak timePenaltiesSuspendedInterruptedFinishedFinished after penaltiesFinished after extra timePostponedCancelledAbandonedAwardedIn progressUnknown
clocknumberCurrent minute of the match.
scoreMatchScoreResponserequired2 fields
currentstringHome - Away score up to penalties.
penaltiesstringHome - Away team score after the penalties phase.
Example response
[
{
"id": 489389,
"round": "Regular Season - 32",
"date": "2023-05-20T15:30:00.000Z",
"country": {
"code": "FR",
"name": "France",
"logo": "https://example.com/logos/country/FR.png"
},
"awayTeam": {
"id": 553,
"logo": "https://example.com/logos/team/553.png",
"name": "Montpellier",
"type": "club"
},
"homeTeam": {
"id": 553,
"logo": "https://example.com/logos/team/553.png",
"name": "Montpellier",
"type": "club"
},
"league": {
"id": 133,
"season": 2023,
"name": "Ligue 1",
"logo": "https://example.com/logos/league/133.png"
},
"state": {
"description": "Second half",
"clock": 67,
"score": {
"current": "3 - 1",
"penalties": "6 - 4"
}
}
}
]
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. |