Get head-to-head statistics, direct H2H matches, and recent form between two teams
h2hGames) - All historical meetings between the two teamshomeCompetitor.recentGames / awayCompetitor.recentGames) - Each team’s recent matches against any opponent| Data Type | Location | Description |
|---|---|---|
| Direct H2H Matches | game.h2hGames[] | All matches where these two teams faced each other (past + scheduled) |
| Home Team Recent Form | game.homeCompetitor.recentGames[] | Home team’s recent matches vs any opponent |
| Away Team Recent Form | game.awayCompetitor.recentGames[] | Away team’s recent matches vs any opponent |
| Bookmakers & Odds | bookmakers[] | Available betting options |
| Competition Info | competitions[] | Competition metadata |
| Country Info | countries[] | Country metadata |
| Parameter | Type | Required | Description |
|---|---|---|---|
gameId | number | Yes | The game identifier from game.id in fixtures/results |
matchupId | string | Yes | Matchup identifier from game.matchupId in fixtures/results |
timezoneName | string | No | Timezone for date/time values (auto-resolved, or specify e.g., America/New_York) |
startTime fields use ISO 8601 format with a dynamic timezone offset based on the resolved or specified timezone.matchupId uses hyphens to separate IDs:
homeCompetitorId-awayCompetitorId (e.g., "131-132")homeCompetitorId-awayCompetitorId-competitionId (e.g., "131-132-7")matchupId exactly as returned from fixtures/results endpoints.
| Field | Type | Description |
|---|---|---|
game | Object | Main game object containing all game details |
bookmakers | Array | List of available bookmakers with odds |
sports | Array | Sports information |
countries | Array | Country information |
competitions | Array | Competition information |
| Field | Type | Description |
|---|---|---|
id | Number | Unique game identifier |
sportId | Number | Sport type ID (1 = Football) |
competitionId | Number | Competition ID |
seasonNum | Number | Season number |
stageNum | Number | Stage number |
groupNum | Number | Group number |
roundName | String | Round name (e.g., “Round”) |
stageName | String | Stage name (e.g., “Semi Finals”) |
competitionDisplayName | String | Full competition name for display |
startTime | String | Game start time (ISO 8601 format with timezone offset based on auto-resolved or specified timezone) |
statusGroup | Number | Status group code (1 = Not Started, 2 = Scheduled, 3 = Live / In Progress, 4 = Ended, 5 = Cancelled, 6 = Postponed, 8 = Abandoned) |
statusText | String | Human-readable status (e.g., “After Penalties”) |
shortStatusText | String | Short status text (e.g., “AP”) |
gameTimeAndStatusDisplayType | Number | Display type indicator |
justEnded | Boolean | Whether game just ended |
gameTime | Number | Game time in minutes |
gameTimeDisplay | String | Formatted game time for display |
hasLineups | Boolean | Whether lineups are available |
hasMissingPlayers | Boolean | Whether there are missing players |
hasFieldPositions | Boolean | Whether field positions are available |
lineupsStatus | Number | Lineups status code |
lineupsStatusText | String | Lineups status text |
hasTVNetworks | Boolean | Whether TV networks are available |
winDescription | String | Description of the winner |
homeCompetitor | Object | Home team/competitor details |
awayCompetitor | Object | Away team/competitor details |
h2hGames | Array | Head-to-head historical games between the two teams |
isHomeAwayInverted | Boolean | Whether home/away is inverted |
hasStats | Boolean | Whether stats are available |
hasStandings | Boolean | Whether standings are available |
hasBrackets | Boolean | Whether brackets are available |
hasPreviousMeetings | Boolean | Whether previous meetings are available |
hasRecentMatches | Boolean | Whether recent matches are available |
winner | Number | Winner indicator (0 = draw/scheduled, 1 = home, 2 = away) |
homeAwayTeamOrder | Number | Team order indicator |
hasNews | Boolean | Whether news is available |
hasPointByPoint | Boolean | Whether point-by-point data is available |
hasVideo | Boolean | Whether video is available |
homeCompetitor and awayCompetitor.
| Field | Type | Description |
|---|---|---|
id | Number | Competitor ID |
countryId | Number | Country ID |
sportId | Number | Sport ID |
name | String | Competitor name |
symbolicName | String | Short symbolic name (e.g., “BOL”) |
nameForURL | String | URL-friendly name |
type | Number | Competitor type |
popularityRank | Number | Popularity ranking |
imageVersion | Number | Image version number |
score | Number | Current score |
isWinner | Boolean | Whether competitor is winner |
outcome | Number | Outcome code |
color | String | Primary color (hex) |
awayColor | String | Away color (hex) |
hasSquad | Boolean | Whether squad info available |
hasTransfers | Boolean | Whether transfer info available |
competitorNum | Number | Competitor number |
hideOnSearch | Boolean | Hide on search flag |
hideOnCatalog | Boolean | Hide on catalog flag |
mainCompetitionId | Number | Main competition ID |
recentGames | Array | Array of recent games (against any opponent) |
h2hGames[] and recentGames[] arrays.
| Field | Type | Description |
|---|---|---|
id | Number | Game ID |
sportId | Number | Sport ID |
competitionId | Number | Competition ID |
seasonNum | Number | Season number |
stageNum | Number | Stage number |
roundNum | Number | Round number |
roundName | String | Round name |
competitionDisplayName | String | Competition display name |
startTime | String | Start time (ISO 8601 with timezone offset) |
statusGroup | Number | Status group (1 = Not Started, 2 = Scheduled, 3 = Live / In Progress, 4 = Ended, 5 = Cancelled, 6 = Postponed, 8 = Abandoned) |
statusText | String | Status text |
shortStatusText | String | Short status |
gameTimeAndStatusDisplayType | Number | Display type |
odds | Object | Odds information |
homeCompetitor | Object | Home competitor (nested) |
awayCompetitor | Object | Away competitor (nested) |
outcome | Number | Game outcome |
extraData | Array | Extra data (scores, etc.) |
winner | Number | Winner indicator (1 = home, 2 = away, -1 = draw, 0 = scheduled) |
scores | Array | Score array [homeScore, awayScore] |
homeAwayTeamOrder | Number | Team order |
hasPointByPoint | Boolean | Point-by-point available |
hasVideo | Boolean | Video available |
| Field | Type | Description |
|---|---|---|
lineId | Number | Odds line ID |
gameId | Number | Game ID |
bookmakerId | Number | Bookmaker ID |
lineTypeId | Number | Line type ID |
lineType | Object | Line type details |
link | String | Bookmaker link |
bookmaker | Object | Bookmaker details |
options | Array | Betting options |
outcomeOptionNum | Number | Outcome option number |
isConcluded | Boolean | Whether odds concluded |
| Field | Type | Description |
|---|---|---|
num | Number | Option number |
name | String | Option name (1, X, 2) |
rate | Object | Odds rates |
bookmakerId | Number | Bookmaker ID |
originalRate | Object | Original odds rates |
link | String | Betting link |
trend | Number | Trend indicator |
isWon | Boolean | Whether this option won |
| Field | Type | Description |
|---|---|---|
decimal | Number | Decimal odds format |
fractional | String | Fractional odds format |
american | String | American odds format |
| Field | Type | Description |
|---|---|---|
id | Number | Bookmaker ID |
name | String | Bookmaker name |
link | String | Bookmaker link |
nameForURL | String | URL-friendly name |
actionButton | Object | Action button details |
color | String | Brand color (hex) |
imageVersion | Number | Image version |
promotionText | String | Promotion text |
| Field | Type | Description |
|---|---|---|
id | Number | Competition ID |
countryId | Number | Country ID |
sportId | Number | Sport ID |
name | String | Competition name |
longName | String | Long competition name |
hasStandings | Boolean | Has standings |
hasBrackets | Boolean | Has brackets |
hasStats | Boolean | Has statistics |
nameForURL | String | URL-friendly name |
popularityRank | Number | Popularity rank |
imageVersion | Number | Image version |
currentStageType | Number | Current stage type |
color | String | Competition color |
competitorsType | Number | Competitors type |
currentPhaseNum | Number | Current phase |
currentSeasonNum | Number | Current season |
currentStageNum | Number | Current stage |
isInternational | Boolean | Is international |
hasHistory | Boolean | Has history |
| Scenario | Cause | What to Display |
|---|---|---|
Empty h2hGames | Teams have never played each other | ”No previous meetings” |
Empty recentGames | New team or limited data | ”No recent match history” |
Only scheduled in h2hGames | No completed H2H yet | Show upcoming match, “First meeting” |
| Issue | Cause | Solution |
|---|---|---|
400 Bad Request | Missing parameters | Include both gameId and matchupId |
401 Unauthorized | Invalid API key | Check x-api-key header |
404 Not Found | Invalid game ID | Verify gameId from fixtures |
Empty h2hGames | No historical meetings | Display “First meeting” message |
| Wrong scores | Using recentGames for H2H | Use h2hGames for direct meetings |
| Only 10 matches shown | Default pagination | All matches returned; handle in frontend |
Your SportsAPI Pro API key
First team ID
678
Second team ID
679
Number of historical games to return
10
Head-to-head history retrieved successfully