v2

Advanced API

H2H Advanced

The H2H Advanced module provides deep head-to-head analytics between two players β€” including aggregated stats, full historical match records, surface breakdowns, rivalry rankings, upcoming meeting data, and recent event results.

ℹ️
Player name format All {player} path parameters use the player's display name with URL encoding (spaces become %20).
Examples: Novak%20Djokovic, Rafael%20Nadal, Carlos%20Alcaraz
ℹ️
Player Images: Some endpoints return player image paths (e.g., player1Image, player2Image). These can be accessed via the proxy at /tennis/v2/ms-api/uploads/Photo/{type}/{id}.jpg. Example: https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/uploads/Photo/atp/05992.jpg

Endpoint Summary

MethodPathDescription
GET.../h2h/profile/{type}/{player1}/{player2}/{limit}Combined H2H profile for two players
GET.../h2h/stats/{type}/{player1}/{player2}Aggregated H2H statistics
GET.../h2h/recent-stats/{type}/{player}Recent match statistics for one player
GET.../h2h/history/{type}/{player1}/{player2}Full match history between two players
GET.../h2h/current/{type}/{player}/{player2}Current event stats between two players
GET.../h2h/breakdown/{type}/{player}Win/loss breakdown for a player
GET.../h2h/surfaceBreakdown/{type}/{player}Surface-by-surface breakdown
GET.../h2h/recent/{type}/{player}Recent matches for a player
GET.../h2h/upcoming/{type}/{player1}/{player2}Upcoming match between two players
GET.../h2h/filters/{player1}/{player2}/{type}/vsH2H filter options (vs mode)
GET.../h2h/filters/{player1}/{player2}/{type}H2H filter options
GET.../h2h/player-vs-player/recent-event/{type}/{player1}/{player2}Most recent event between two players
GET.../h2h/rivalries/{type}/{player}Top rivalries for a player
GET.../h2h/last-match-played/{type}/{player}Last match played by a player
GET.../h2h/sport/{sportId}/data/{siteType}/transformedTransformed sport event data
GET.../h2h/playerType/{player}Determine if player is ATP or WTA

H2H Profile

GET /tennis/v2/ms-api/h2h/profile/{type}/{player1}/{player2}/{limit} Returns combined profiles and H2H summary for two players

Path Parameters

ParameterTypeDescription
type Requiredstringatp or wta
player1 RequiredstringFirst player display name (URL-encoded)
player2 RequiredstringSecond player display name (URL-encoded)
limit Requiredbooleantrue to limit recent matches, false for full history

Query Parameters

ParameterTypeDescription
includeAll OptionalbooleanInclude all historical data

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/profile/atp/Novak%20Djokovic/Carlos%20Alcaraz/false' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "player1": {
    "id": 5992,
    "name": "Novak Djokovic",
    "playerStatus": "Active",
    "country": "Serbia",
    "contryAcr": "SRB",
    "playerStat": {
      "maintourWin": 29,
      "maintourLose": 8,
      "finalsWin": 6,
      "finalsLose": 2,
      "masterWin": 40,
      "masterLose": 20,
      "slamWin": 24,
      "slamLose": 14,
      "cupsWin": 11,
      "cupsLose": 4,
      "futuresWin": 2,
      "futuresLose": 0,
      "challengersWin": 3,
      "challengersLose": 0,
      "totalWins": 1274,
      "totalLose": 261
    },
    "image": "/tennis/api2/uploads/Photo/atp/05992.jpg",
    "image_p_name": "/tennis/api2/uploads/Photo/atp_name/novak_djokovic.jpg",
    "birthday": "1987-05-22T00:00:00.000Z",
    "currentRank": 7,
    "plays": "Right-Handed"
  }
}

Response Properties

PropertyTypeDescription
player1 / player2objectProfile summary for each player
player1.idnumberPlayer ID
player1.namestringPlayer name
player1.playerStatusstringPlayer status (e.g., "Active")
player1.countrystringCountry name
player1.contryAcrstringCountry code
player1.playerStatobjectDetailed player statistics
player1.playerStat.maintourWinnumberMain tour wins
player1.playerStat.maintourLosenumberMain tour losses
player1.playerStat.totalWinsnumberTotal career wins
player1.playerStat.totalLosenumberTotal career losses
player1.imagestringPlayer image path
player1.image_p_namestringPlayer image path with name
player1.birthdaystringDate of birth (ISO 8601)
player1.currentRanknumberCurrent ranking
player1.playsstringPlaying hand

H2H Statistics

GET /tennis/v2/ms-api/h2h/stats/{type}/{player1}/{player2} Aggregated statistics for all matches played between two players

Query Parameters

ParameterTypeDescription
year OptionalnumberFilter to a specific year
surface OptionalstringFilter by surface: hard, clay, grass
tournament OptionalstringFilter by tournament name

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/stats/atp/Novak%20Djokovic/Carlos%20Alcaraz' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "matchesCount": 10,
  "player1": {
    "name": "Novak Djokovic",
    "matchesWon": 5,
    "acesCount": 44,
    "doubleFaultsCount": 30,
    "avgTime": "3:8:5",
    "firstServe": 769,
    "firstServeOf": 1167,
    "firstServePercentage": 66,
    "winningOnFirstServe": 520,
    "winningOnFirstServeOf": 769,
    "winningOnFirstServePercentage": 68,
    "winningOnSecondServe": 217,
    "winningOnSecondServeOf": 398,
    "winningOnSecondServePercentage": 55
  }
}

Response Properties

PropertyTypeDescription
matchesCountnumberTotal matches between the players
player1 / player2objectDetailed statistics for each player
player1.namestringPlayer name
player1.matchesWonnumberMatches won by this player
player1.acesCountnumberTotal aces
player1.doubleFaultsCountnumberTotal double faults
player1.avgTimestringAverage match time
player1.firstServenumberFirst serves made
player1.firstServeOfnumberTotal serve points
player1.firstServePercentagenumberFirst serve percentage
player1.winningOnFirstServePercentagenumberWin percentage on first serve
player1.winningOnSecondServePercentagenumberWin percentage on second serve

Match History

GET /tennis/v2/ms-api/h2h/history/{type}/{player1}/{player2} Returns a full list of past matches played between two players

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/history/atp/Novak%20Djokovic/Carlos%20Alcaraz' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "singles": [
    {
      "roundId": 12,
      "result": "2-6 6-2 6-3 7-5",
      "date": "2026-02-01T00:00:00.000Z",
      "player1Id": 68074,
      "player2Id": 5992,
      "tournamentId": 21305,
      "draw": 1,
      "best_of"null,
      "player1": {
        "id": 68074,
        "name": "Carlos Alcaraz",
        "countryAcr": "ESP",
        "currentRank": 2
      },
      "player2": {
        "id": 5992,
        "name": "Novak Djokovic",
        "countryAcr": "SRB",
        "currentRank": 7
      }
    }
  ]
}

Response Properties

PropertyTypeDescription
singlesarrayArray of singles matches
singles[].roundIdnumberRound identifier
singles[].resultstringMatch score/result
singles[].datestringMatch date (ISO 8601)
singles[].player1IdnumberPlayer 1 ID
singles[].player2IdnumberPlayer 2 ID
singles[].tournamentIdnumberTournament ID
singles[].drawnumberDraw type
singles[].best_ofnumber | nullBest of sets
singles[].player1objectPlayer 1 information
singles[].player1.idnumberPlayer ID
singles[].player1.namestringPlayer name
singles[].player1.countryAcrstringCountry code
singles[].player1.currentRanknumberCurrent ranking
singles[].player2objectPlayer 2 information
singles[].player2.idnumberPlayer ID
singles[].player2.namestringPlayer name
singles[].player2.countryAcrstringCountry code
singles[].player2.currentRanknumberCurrent ranking

Recent Matches

GET /tennis/v2/ms-api/h2h/recent/{type}/{player} Returns the most recent matches played by a single player

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/recent/atp/Carlos%20Alcaraz' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
[
  {
    "date": "2025-06-08",
    "opponent": "Jannik Sinner",
    "tournament": "Roland Garros",
    "surface": "Clay",
    "result": "W",
    "score": "6-3 6-2 6-4"
  }
]

Response Properties

PropertyTypeDescription
datestringMatch date
opponentstringOpponent display name
tournamentstringTournament name
surfacestringCourt surface
resultstring"W" for win, "L" for loss
scorestringMatch score

Recent Stats

GET /tennis/v2/ms-api/h2h/recent-stats/{type}/{player} Returns aggregated serve and return statistics from a player's recent matches

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/recent-stats/atp/Carlos%20Alcaraz' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "firstServePct": 68.4,
  "firstServeWonPct": 79.1,
  "secondServeWonPct": 57.3,
  "breakPointsSavedPct": 65.0,
  "returnPointsWonPct": 43.8
}

Response Properties

PropertyTypeDescription
firstServePctnumberFirst serve in percentage
firstServeWonPctnumberPoints won on first serve (%)
secondServeWonPctnumberPoints won on second serve (%)
breakPointsSavedPctnumberBreak points saved (%)
returnPointsWonPctnumberReturn points won (%)

Breakdown

GET /tennis/v2/ms-api/h2h/breakdown/{type}/{player} Returns a player's win/loss record broken down by round, level, and opponent category

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/breakdown/atp/Novak%20Djokovic' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
[
  {
    "category": "Finals",
    "wins": 58,
    "losses": 18,
    "winPct": 76.3
  }
]

Response Properties

PropertyTypeDescription
categorystringBreakdown category, e.g. "Finals", "Semi-Finals", "Top 10"
winsintegerMatches won in this category
lossesintegerMatches lost in this category
winPctnumberWin percentage

Surface Breakdown

GET /tennis/v2/ms-api/h2h/surfaceBreakdown/{type}/{player} Returns a player's win/loss record broken down by court surface

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/surfaceBreakdown/atp/Novak%20Djokovic' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
[
  { "surface": "Hard", "wins": 418, "losses": 76, "winPct": 84.6 },
  { "surface": "Clay", "wins": 312, "losses": 55, "winPct": 85.0 },
  { "surface": "Grass", "wins": 174, "losses": 24, "winPct": 87.9 }
]

Response Properties

PropertyTypeDescription
surfacestring"Hard", "Clay", "Grass", or "Carpet"
winsintegerWins on this surface
lossesintegerLosses on this surface
winPctnumberWin percentage

Upcoming Match

GET /tennis/v2/ms-api/h2h/upcoming/{type}/{player1}/{player2} Returns the next scheduled match between two players if one exists

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/upcoming/atp/Novak%20Djokovic/Carlos%20Alcaraz' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "tournament": "Wimbledon",
  "round": "Final",
  "scheduledDate": "2025-07-13",
  "surface": "Grass"
}

Response Properties

PropertyTypeDescription
tournamentstringTournament name
roundstringScheduled round
scheduledDatestringDate in YYYY-MM-DD
surfacestringCourt surface

Current Event Stats

GET /tennis/v2/ms-api/h2h/current/{type}/{player}/{player2} Returns current event statistics between two players

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/current/atp/Novak%20Djokovic/Carlos%20Alcaraz' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "player1": "Novak Djokovic",
  "player2": "Carlos Alcaraz",
  "currentEvent": "Wimbledon Final",
  "stats": {
    "player1Wins": 3,
    "player2Wins": 5
  }
}

Response Properties

PropertyTypeDescription
player1 / player2stringPlayer display names
currentEventstringName of the current event
statsobjectCurrent statistics for both players

Last Match Played

GET /tennis/v2/ms-api/h2h/last-match-played/{type}/{player} Returns the single most recent match played by a player

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/last-match-played/atp/sinner-jannik' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "date": "2025-06-08",
  "opponent": "Carlos Alcaraz",
  "tournament": "Roland Garros",
  "result": "L",
  "score": "3-6 2-6 4-6"
}

Response Properties

PropertyTypeDescription
datestringMatch date
opponentstringOpponent display name
tournamentstringTournament name
resultstring"W" or "L"
scorestringMatch score

Player Type Lookup

GET /tennis/v2/ms-api/h2h/playerType/{player} Returns whether a player belongs to the ATP or WTA tour β€” useful before making typed requests

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/playerType/swiatek-iga' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "player": "swiatek-iga",
  "type": "wta"
}

Response Properties

PropertyTypeDescription
playerstringThe player slug passed in the request
typestring"atp" or "wta"

Top Rivalries

GET /tennis/v2/ms-api/h2h/rivalries/{type}/{player} Returns the most frequent opponents for a player ranked by number of matches

Query Parameters

ParameterTypeDescription
limit OptionalnumberNumber of rivalries to return (default: 10)
includeAll OptionalbooleanInclude all career data (default: false)

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/rivalries/atp/Novak%20Djokovic?limit=5' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "player": "Novak Djokovic",
  "rivalries": [
    {
      "opponentName": "Rafael Nadal",
      "playerWins": 31,
      "opponentWins": 29,
      "totalMatches": 60
    },
    {
      "opponentName": "Roger Federer",
      "playerWins": 27,
      "opponentWins": 23,
      "totalMatches": 50
    }
  ]
}

Response Properties

PropertyTypeDescription
playerstringPlayer name
rivalriesarrayArray of rivalries
rivalries[].opponentNamestringOpponent's display name
rivalries[].playerWinsnumberWins by the queried player
rivalries[].opponentWinsnumberWins by the opponent
rivalries[].totalMatchesnumberTotal matches between them

H2H Filters

GET /tennis/v2/ms-api/h2h/filters/{player1}/{player2}/{type} Returns available filter options for H2H queries between two players

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/filters/Novak%20Djokovic/Carlos%20Alcaraz/atp' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "surfaces": ["Hard", "Clay", "Grass"],
  "rounds": ["Final", "Semi-Final"],
  "tournaments": ["Wimbledon", "Roland Garros"]
}

Response Properties

PropertyTypeDescription
surfacesarray<string>Available court surfaces to filter by
roundsarray<string>Available round names
tournamentsarray<string>Tournaments where they have played

Recent Event Between Players

GET /tennis/v2/ms-api/h2h/player-vs-player/recent-event/{type}/{player1}/{player2} Returns the most recent event/match between two specific players

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/player-vs-player/recent-event/atp/Novak%20Djokovic/Carlos%20Alcaraz' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "date": "2024-07-14",
  "tournament": "Wimbledon",
  "round": "Final",
  "winner": "Carlos Alcaraz",
  "score": "6-2 6-2 7-6"
}

Response Properties

PropertyTypeDescription
datestringMatch date in YYYY-MM-DD
tournamentstringTournament name
roundstringRound of the match
winnerstringWinner display name
scorestringMatch score

Transformed Sport Data

GET /tennis/v2/ms-api/h2h/sport/{sportId}/data/{siteType}/transformed Returns enriched sport event data with H2H context, suitable for third-party widget integrations

Path Parameters

ParameterTypeDescription
sportId RequiredstringSport identifier from the Newsport data provider
siteType RequiredstringTarget site context, e.g. sgt, ms

Query Parameters

ParameterTypeDescription
isUpcoming OptionalstringYes or No (default: No)
isSort OptionalstringYes or No (default: No)
page OptionalnumberPage number (default: 1)
limit OptionalnumberResults per page, max 200 (default: 50)
leagues OptionalstringComma-separated league filter
date OptionalstringFilter by date in YYYY-MM-DD format
time_range OptionalstringUnix timestamp range as start_end, e.g. 1700000000_1700086400

Example Request

cURL
curl --request GET \
  --url 'https://tennis-api-atp-wta-itf.p.rapidapi.com/tennis/v2/ms-api/h2h/sport/123/data/sgt/transformed?isUpcoming=Yes&limit=20' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: tennis-api-atp-wta-itf.p.rapidapi.com'

Example Response

JSON
{
  "data": [
    {
      "eventId": "abc123",
      "player1": "Novak Djokovic",
      "player2": "Carlos Alcaraz",
      "h2hWins1": 3,
      "h2hWins2": 5,
      "startTime": 1720000000
    }
  ],
  "total": 48,
  "page": 1
}

Response Properties

PropertyTypeDescription
dataarrayArray of enriched event objects
data[].eventIdstringExternal event identifier from the sport data provider
data[].player1 / data[].player2stringPlayer display names as matched in the database
data[].h2hWins1 / data[].h2hWins2integerAll-time H2H win counts for each player
data[].startTimeintegerMatch start time as a Unix timestamp
totalintegerTotal events matching the query
pageintegerCurrent page number