Head to head

GET https://handball.highlightly.net/head-2-head Handball API
GET https://sports.highlightly.net/handball/head-2-head All Sports API

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 ten matches either way round.

Each meeting comes back in the same shape as a match on matches, with the full state and the score by half, so the record between the two sides can be rendered without a second request.

Every meeting also names its league and season.

Pair this with last five games for the usual pre match comparison, one side showing form and the other showing history.

A head to head comparison between two teams

Parameters

Parameter Type Description
teamIdOnerequired number No description in the spec.e.g. 881569
teamIdTworequired number No description in the spec.e.g. 892632

Request

curl --request GET \
  --url 'https://handball.highlightly.net/head-2-head?teamIdOne=881569&teamIdTwo=892632' \
  --header 'x-rapidapi-key: YOUR_API_KEY'
const params = new URLSearchParams({
  teamIdOne: '881569',
  teamIdTwo: '892632'
})
const response = await fetch(`https://handball.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://handball.highlightly.net/head-2-head',
    params={
        'teamIdOne': '881569',
        'teamIdTwo': '892632',
    },
    headers={
        'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
    },
    timeout=10,
)

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

Response

idnumberrequired
weekobject
datestringrequired
countryHandballCountryResponserequired3 fields
codestringrequiredCountry code specified by the ISO 3166 standard.
namestringrequired
logostringrequired
awayTeamHandballTeamResponserequired3 fields
idnumberrequired
logostring
namestringrequired
homeTeamHandballTeamResponserequired3 fields
idnumberrequired
logostring
namestringrequired
leagueHandballMatchLeagueResponserequired4 fields
idnumberrequired
seasonnumberrequired
namestringrequired
logostring
stateHandballMatchStateResponserequired5 fields
descriptionstringrequiredState of the match.Not startedFirst halfHalf timeSecond halfExtra timeBreak timePenaltiesSuspendedInterruptedFinishedPostponedCancelledAbandonedAwardedUnknownTo be announcedFinished after penaltiesFinished after extra time
scoreHandballMatchScoreResponserequired3 fields
currentstringHome - Away match score.
firstHalfstringHome - Away match score in the first half.
secondHalfstringHome - Away match score in the second half.

Example response

200 application/json
[
  {
    "id": 126347903,
    "week": "9",
    "date": "2023-12-27T18:30:00.000Z",
    "country": {
      "code": "DE",
      "name": "Germany",
      "logo": "https://example.com/logos/country/DE.png"
    },
    "awayTeam": {
      "id": 332674,
      "logo": "https://example.com/logos/team/332674.png",
      "name": "Solingen W"
    },
    "homeTeam": {
      "id": 332674,
      "logo": "https://example.com/logos/team/332674.png",
      "name": "Solingen W"
    },
    "league": {
      "id": 36526,
      "season": 2023,
      "name": "1. Bundesliga Women",
      "logo": "https://example.com/logos/league/36526.png"
    },
    "state": {
      "description": "Finished",
      "score": {
        "current": "26 - 26",
        "firstHalf": "13 - 15",
        "secondHalf": "13 - 11"
      }
    }
  }
]

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.