Documentation / Teams
Head to head
GET /v1/teams/{team_id}/head-to-head/{other_id}Every meeting of two teams your plan covers, newest first, with the first team's record against the second.
GET
https://api.icehockeyapi.com/v1/teams/{team_id}/head-to-head/{other_id}https://api.icehockeyapi.com/v1/teams/tm_kpzj338v/head-to-head/tm_ampzcavy?per_page=3curl "https://api.icehockeyapi.com/v1/teams/tm_kpzj338v/head-to-head/tm_ampzcavy?per_page=3" \ -H "X-API-Key: YOUR_KEY"
200 OKExample answer from the data, 12 Oct
{
"data": [
{
"id": "gm_seyr9d88",
"date": "2026-10-11",
"start_time": "2026-10-11T22:00:00Z",
"league": {
"id": "lg_6t11wec7",
"name": "NHL"
},
"season": {
"id": "ss_0n4zhhna",
"label": "2026-27"
},
"stage": "regular",
"status": "final",
"home_team": {
"id": "tm_kpzj338v",
"name": "New York Rangers",
"short_name": "NYR",
"country": "North America"
},
"away_team": {
"id": "tm_ampzcavy",
"name": "Vancouver Canucks",
"short_name": "VAN",
"country": "North America"
},
"home_goals": 6,
"away_goals": 2,
"ended_in": "regulation",
"venue": {
"id": "vn_aymp6wpr",
"name": "Madison Square Garden",
"city": null,
"country": null
},
"attendance": null
},
{
"id": "gm_t1petegv",
"date": "2025-12-16",
"start_time": "2025-12-17T00:00:00Z",
"league": {
"id": "lg_6t11wec7",
"name": "NHL"
},
"season": {
"id": "ss_22q138a1",
"label": "2025-26"
},
"stage": "regular",
"status": "final",
"home_team": {
"id": "tm_kpzj338v",
"name": "New York Rangers",
"short_name": "NYR",
"country": "North America"
},
"away_team": {
"id": "tm_ampzcavy",
"name": "Vancouver Canucks",
"short_name": "VAN",
"country": "North America"
},
"home_goals": 0,
"away_goals": 3,
"ended_in": "regulation",
"venue": {
"id": "vn_aymp6wpr",
"name": "Madison Square Garden",
"city": null,
"country": null
},
"attendance": 17452
},
{
"id": "gm_r1hzkhjf",
"date": "2025-10-28",
"start_time": "2025-10-29T02:00:00Z",
"league": {
"id": "lg_6t11wec7",
"name": "NHL"
},
"season": {
"id": "ss_22q138a1",
"label": "2025-26"
},
"stage": "regular",
"status": "final",
"home_team": {
"id": "tm_ampzcavy",
"name": "Vancouver Canucks",
"short_name": "VAN",
"country": "North America"
},
"away_team": {
"id": "tm_kpzj338v",
"name": "New York Rangers",
"short_name": "NYR",
"country": "North America"
},
"home_goals": 0,
"away_goals": 2,
"ended_in": "regulation",
"venue": {
"id": "vn_egvm20q6",
"name": "Rogers Arena",
"city": null,
"country": null
},
"attendance": 18919
}
],
"meta": {
"count": 3,
"next_cursor": "eyJvIjozLCJuIjozfQ",
"page": 1,
"per_page": 3,
"total": 144,
"total_pages": 48,
"next_page": 2,
"prev_page": null,
"record": {
"team": {
"id": "tm_kpzj338v",
"name": "New York Rangers",
"short_name": "NYR",
"country": "North America"
},
"against": {
"id": "tm_ampzcavy",
"name": "Vancouver Canucks",
"short_name": "VAN",
"country": "North America"
},
"games": 144,
"wins": 92,
"losses": 44,
"ties": 8,
"overtime_wins": 4,
"overtime_losses": 2,
"shootout_wins": 1,
"shootout_losses": 1,
"goals_for": 558,
"goals_against": 415,
"goal_difference": 143
},
"plan": "Complete"
}
}Run works once the API is live; the code above works now.
Parameters
| Name | In | Type | What it does |
|---|---|---|---|
team_id required | path | id | A team, from /v1/teams. |
other_id required | path | id | The other team's |
page | query | int | The page, from 1. |
per_page | query | int | Records a page, default 50, at most 200. |
cursor | query | string | meta.next_cursor from the previous answer. |
Returns
| Field | Type |
|---|---|
id | string |
date | string |
start_time | string |
league | object |
league.id | string |
league.name | string |
season | object |
season.id | string |
season.label | string |
stage | string |
status | string |
home_team | object |
home_team.id | string |
home_team.name | string |
home_team.short_name | string |
home_team.country | string |
away_team | object |
away_team.id | string |
away_team.name | string |
away_team.short_name | string |
away_team.country | string |
home_goals | int |
away_goals | int |
ended_in | string |
venue | object |
venue.id | string |
venue.name | string |
venue.city | null |
venue.country | null |
attendance | null |