Head to head of a match
GET /api/matches/{id}/headtohead. Previous meetings between the two pairs of a match. Built for match previews.Head to head search
POST /api/matches/headtohead. Any combination of pairs and players. Built for rivalry pages and comparisons.Both endpoints require a Pro subscription.
Who you can compare
The search endpoint takesteam_1 and team_2, each a list of one or two player IDs. The number of IDs on each side decides what the head to head means:
The player against player head to head is usually the one worth showing. Two players who have faced each other twenty times may have done it with four or five different partners, and the pair against pair query only sees the meetings where both partnerships were the same.
The head to head of a match
When you already have a match, you do not need to look up the players.GET /api/matches/{id}/headtohead takes the two pairs of that match and returns their previous meetings, the same as a pair against pair search. The match itself is left out, so you can call it on a scheduled match to build its preview, or on a finished one to put the result in context.
Every match in the API links to it from connections.headtohead.
What the response contains
Both endpoints return a paginated list of matches, with the same fields as any other match listing:- Only matches with a result count:
finishedandretired. Aretiredmatch counts as a win for the pair that stayed on court. Walkovers are left out, since nothing was played. See statuses. - Matches are sorted by
played_at, most recent first. - Results are paginated with the usual
pageandper_pageparameters. - When the sides have never met, you get an empty page (
data: []), not a404.
Filters
On the search endpoint the filters go in the JSON body next to
team_1 and team_2. On the match endpoint they go in the query string.
Turning matches into a record
The endpoints return the matches, not a tally. Building the win-loss record is up to you, and there is one trap:team_1 in a returned match is not necessarily your team_1. Each match keeps the sides as they were on the draw, so the player you sent in team_1 may appear under players.team_2 in half of the results. winner, score and seeds all refer to the match’s own sides.
Find which side your player is on in each match before you read winner:
Head to head and the prediction model
A head to head is history; a prediction is the current strength of both sides. They answer different questions and often disagree. A pair that leads a head to head 5-1 may be the underdog today, because those wins came two seasons ago, with other partners, or before one of the opponents reached their peak. The prediction model deliberately ignores head to head records. If you want to show both, put them side by side rather than mixing them: “Leads the head to head 5-1, 38% to win today” tells the reader more than any blend of the two. To explain a head to head rather than just count it, pair it with:- Pair stats, to see how each pair wins its matches.
- Pair synergy, to see whether a partnership is worth more than its two players.
- Player form, to see who arrives in better shape.
What people build with it
- Match previews. Call the match endpoint for every scheduled match of the day and show the record next to the order of play.
- Rivalry pages. A player against player head to head, with the record over time and the list of meetings, is a page fans look for before every big final.
- “Best ever” arguments. When two candidates have faced each other, the head to head is the strongest evidence there is. See who is the best padel player.
- Partner history. Omit
team_2to list every match a pair has played together, or every match of a single player.
Frequently asked questions
Why does the head to head between two pairs have so few matches?
Why does the head to head between two pairs have so few matches?
Because pairs change often. The pair against pair head to head only counts the meetings where both partnerships were exactly the same. Send one player on each side to get every meeting between the two players, whoever they played with.
Are qualifying matches included?
Are qualifying matches included?
Not by default. Both endpoints return main draw matches unless you set
draw. Use draw=all to include qualifying, group stage and placement matches.Does a retirement count?
Does a retirement count?
Yes. A
retired match has a winner and counts as a win for the pair that stayed on court. Walkovers are left out because no match was played.Does the match endpoint include the match itself?
Does the match endpoint include the match itself?
No. It returns the meetings before and after that match, never the match you asked about.
Next steps
Match prediction model
Calibrated win probabilities from the Elo ratings of both pairs.
Player form and pair synergy
Whether a player is in form and whether a pair beats the sum of its parts.
Padel statistics
Match, player and pair stats to explain what the head to head shows.
Search head to head
Full parameter and response reference.