Head to head
Retrieve the last ten matches played between two teams.
- Pagination
- Not paginated
Both teamIdOne and teamIdTwo are required, and both come from
teams. The order does not matter, so
the same pair returns the same matches either way round.
Each meeting comes back in the same shape as a match on
matches, with the full
state and the set by set score, so the record between the two
sides can be rendered without a second request.
Because the score carries set by set detail, a head to head table can show more than who won. Two sides with an even record look closer or further apart once you read the sets behind each result.
Pair this with last five games for the usual pre match comparison, one side showing form and the other showing history.
Parameters
| Parameter | Type | Description |
|---|---|---|
teamIdOnerequired
|
number |
No description in the spec.e.g. 630524
|
teamIdTworequired
|
number |
No description in the spec.e.g. 631375
|
Request
curl --request GET \
--url 'https://volleyball.highlightly.net/head-2-head?teamIdOne=630524&teamIdTwo=631375' \
--header 'x-rapidapi-key: YOUR_API_KEY'
const params = new URLSearchParams({
teamIdOne: '630524',
teamIdTwo: '631375'
})
const response = await fetch(`https://volleyball.highlightly.net/head-2-head?${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://volleyball.highlightly.net/head-2-head',
params={
'teamIdOne': '630524',
'teamIdTwo': '631375',
},
headers={
'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
},
timeout=10,
)
response.raise_for_status()
data = response.json()
Response
idnumberrequired
weekstring
datestringrequired
countryVolleyballCountryResponserequired3 fields
codestringrequiredCountry code specified by the ISO 3166 standard.
namestringrequired
logostringrequired
awayTeamVolleyballTeamResponserequired3 fields
idnumberrequired
logostring
namestringrequired
homeTeamVolleyballTeamResponserequired3 fields
idnumberrequired
logostring
namestringrequired
leagueVolleyballMatchLeagueResponserequired4 fields
idnumberrequired
seasonnumberrequired
namestringrequired
logostring
stateVolleyballMatchStateResponserequired8 fields
descriptionstringrequiredState of the match.Not startedFirst setSecond setThird setFourth setFifth setAwardedPostponedCancelledInterruptedAbandonedFinishedUnknownTo be announced
scoreVolleyballMatchScoreResponserequired6 fields
currentstringHome - Away score for the match.
firstSetstringHome - Away score for the first set.
secondSetstringHome - Away score for the second set.
thirdSetstringHome - Away score for the third set.
fourthSetstringHome - Away score for the fourth set.
fifthSetstringHome - Away score for the fifth set.
Example response
[
{
"id": 126347903,
"week": "12",
"date": "2023-12-30T17:00:00.000Z",
"country": {
"code": "IT",
"name": "Italy",
"logo": "https://example.com/logos/country/IT.png"
},
"awayTeam": {
"id": 630524,
"logo": "https://example.com/logos/team/630524.png",
"name": "Trentino"
},
"homeTeam": {
"id": 630524,
"logo": "https://example.com/logos/team/630524.png",
"name": "Trentino"
},
"league": {
"id": 83331,
"season": 2023,
"name": "SuperLega",
"logo": "https://example.com/logos/league/83331.png"
},
"state": {
"description": "Second set",
"score": {
"current": "3 - 1",
"firstSet": "19 - 25",
"secondSet": "25 - 12",
"thirdSet": "22 - 17",
"fourthSet": "22 - 17",
"fifthSet": "25 - 19"
}
}
}
]
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. |