---
title: "Get head 2 head games"
method: GET
path: "/hockey/head-2-head"
tags: ["Hockey.Head 2 Head"]
---

# Get head 2 head games

`GET /hockey/head-2-head`

## Request

- Base URL: `https://sports.highlightly.net`
- URL: `https://sports.highlightly.net/hockey/head-2-head`
- Auth: none declared. Required headers: `x-rapidapi-host`, `x-rapidapi-key`
- TypeScript: <https://skmtc.dev/highlightly/apis/sports-api-highlightly/docs/hockey/head-2-head/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a list of the **last ten** head 2 head games between two teams. Compare the two teams to find out who is stronger based on their past match results. 

Specify `teamIdOne` and `teamIdTwo` query parameters to retrieve the data. The order of team ids does not matter.

Below is an example of what you can achieve with the data:

![H2H example](https://highlightly.net/assets/img/documentation/hockey/h2h.png)

## Query parameters

- `teamIdOne` number, required
- `teamIdTwo` number, required

## Headers

- `x-rapidapi-host` string, required
- `x-rapidapi-key` string, required

## Response `200`

- HockeyMatchResponseDto[]
  - `id` number, required
  - `week` string
  - `date` string, required
  - `country` HockeyCountryResponseDto, required
    - `code` string, required: Country code specified by the ISO 3166 standard.
    - `name` string, required
    - `logo` string, required
  - `awayTeam` HockeyTeamResponseDto, required
    - `id` number, required
    - `logo` string
    - `name` string, required
  - `homeTeam` HockeyTeamResponseDto, required
    - `id` number, required
    - `logo` string
    - `name` string, required
  - `league` HockeyMatchLeagueResponseDto, required
    - `id` number, required
    - `season` number, required
    - `name` string, required
    - `logo` string
  - `state` HockeyMatchStateResponseDto, required
    - `description` 'Not started' | '1st period' | '2nd period' | '3rd period' | 'Over time' | 'Penalties' | 'Break time' | 'Awarded' | 'Postponed' | 'Cancelled' | 'Interrupted' | 'Abandoned' | 'Finished' | 'To be announced' | 'Finished after penalties' | 'Finished after over time' | 'Unknown', required: Current state of the game.
    - `score` HockeyMatchScoreResponseDto, required
      - `current` string: Home - Away score for the match.
      - `overTime` string: Home - Away score in overtime.
      - `penalties` string: Home - Away score in penalties.
      - `firstPeriod` string: Home - Away score in 1st period.
      - `secondPeriod` string: Home - Away score in 2nd period.
      - `thirdPeriod` string: Home - Away score in 3rd period.

## Other responses

- `400`: Bad request descriptive error.
- `500`: Internal server error.

---

[API](https://skmtc.dev/highlightly/apis/sports-api-highlightly.md) - [All operations](https://skmtc.dev/highlightly/apis/sports-api-highlightly/llms.txt) - [OpenAPI document](https://skmtc.dev/highlightly/apis/sports-api-highlightly/revisions/c8a366d3091f?raw)
