Head-to-head endpoints

Rivalry records with surface, Grand Slam and finals splits, and multi-player matrices.

Real-time scores, the full archive since 1968 and webhooks are on Pro. Free keys: 500 calls/month, live 60 s delayed, last 30 days.

Credit metering & bulk CSVs: 0–90 day, live, and bio metadata queries cost 1 credit (ceil(ids/10) for batches). Queries spanning >= 91 days cost 5x narrow (+5/?include=) or 10 * ceil(limit/25) bulk (+5 * ceil(limit/25)/?include=) against both monthly credits and your >90d sub-cap (Free/Starter 0, Legacy 25k, Pro 50k, Scale/Business REST 100k, Business CSV $299/mo & Enterprise unlimited; 429 HISTORICAL_ARCHIVE_CAP_EXCEEDED only on >90d while <=90d & live stay 200 OK). For full backtests at 0 REST credits, Business CSV ($299/mo) delivers Master Baseline + Daily Delta CSVs.
GET/tennis/h2h

Head-to-Head Rivalry Record

Head-to-head record, surface, level and format splits, tiebreaks, deciding sets and meetings.

Send one form, required: `players=a,b` (also `players=a&players=b`), or `player1_id` and `player2_id`. The document marks each as optional only because either one will do. `limit` (or `page_size`) and `page` page the `matches` list only, newest first; tallies always cover every played meeting. `current_rank` is null when a player is not on the latest list; read `last_rank`.

Counts are played matches, as the ATP and WTA publish a head-to-head: retirements and defaults count, walkovers and exhibitions do not. Each is reported in `summary.walkovers` and `summary.exhibitions` (`total`, `player1_wins`, `player2_wins`, `matches`), so `level=E` selects no counted meeting and lists them there. `/matches?opponent_id=` is the full log and still lists both: subtract `summary.walkovers.total` and `summary.exhibitions.total` to compare it with `total_matches`.

ParameterInTypeDescription
player1_idquerystringFirst player ID. Required unless `players` is given.
player2_idquerystringSecond player ID. Required unless `players` is given.
playersquerystring[]Both player IDs in one parameter, as an alternative to player1_id and player2_id: players=a,b or players=a&players=b
surfacequerystringFilter by surface (Hard, Clay, Grass, Carpet)
levelquerystringFilter by tournament tier (G, M, A, F, D, C)
year_fromqueryintegerStart year
year_toqueryintegerEnd year
limitqueryintegerMax meetings in `matches` (newest first). Tallies always cover every meeting.min 1 · max 500
page_sizequeryintegerAlias for limitmin 1 · max 500
pagequeryintegerPage of the meetings list (1-based), with limit/page_sizemin 1 · default 1
bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.citoapi.com/api/v1/tennis/h2h?player1_id=atp_206173&player2_id=atp_207989"

Real response (HTTP 200), captured from the production API; long arrays cut to two items.

json
{
  "success": true,
  "player1": {
    "id": "atp_206173",
    "name": "Jannik Sinner",
    "ioc": "ITA",
    "current_rank": 2,
    "last_rank": 2,
    "last_rank_date": "2026-11-09",
    "career_high_rank": 1,
    "wins": 7,
    "canonical_id": "atp_206173"
  },
  "player2": {
    "id": "atp_207989",
    "name": "Carlos Alcaraz",
    "ioc": "ESP",
    "current_rank": 3,
    "last_rank": 3,
    "last_rank_date": "2026-11-09",
    "career_high_rank": 1,
    "wins": 11,
    "canonical_id": "atp_207989"
  },
  "summary": {
    "total_matches": 18,
    "player1_wins": 7,
    "player2_wins": 11,
    "player1_lead": -4,
    "finals_matches": 9,
    "player1_finals_wins": 4,
    "player2_finals_wins": 5,
    "grand_slam_matches": 6,
    "player1_grand_slam_wins": 2,
    "player2_grand_slam_wins": 4,
    "walkovers": {
      "total": 0,
      "player1_wins": 0,
      "player2_wins": 0,
      "matches": [],
      "note": "Not played, so left out of total_matches, the win counts, every breakdown and matches, as in the head-to-head records the ATP and WTA publish."
    },
    "exhibitions": {
      "total": 0,
      "player1_wins": 0,
      "player2_wins": 0,
      "matches": [],
      "note": "Exhibition events, left out of total_matches, the win counts, every breakdown and matches, as in the head-to-head records the ATP and WTA publish."
    }
  },
  "surface_breakdown": {
    "hard": {
      "player1_wins": 3,
      "player2_wins": 7,
      "total": 10
    },
    "clay": {
      "player1_wins": 2,
      "player2_wins": 4,
      "total": 6
    },
    "grass": {
      "player1_wins": 2,
      "player2_wins": 0,
      "total": 2
    },
    "carpet": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "unknown": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    }
  },
  "level_breakdown": {
    "grand_slam": {
      "player1_wins": 2,
      "player2_wins": 4,
      "total": 6
    },
    "masters_1000": {
      "player1_wins": 2,
      "player2_wins": 5,
      "total": 7
    },
    "tour_finals": {
      "player1_wins": 1,
      "player2_wins": 0,
      "total": 1
    },
    "atp_500_250": {
      "player1_wins": 2,
      "player2_wins": 1,
      "total": 3
    },
    "olympics_davis_cup": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "challenger": {
      "player1_wins": 0,
      "player2_wins": 1,
      "total": 1
    },
    "itf": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "team_events": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "junior": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "exhibition": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "other": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    }
  },
  "format_breakdown": {
    "best_of_3": {
      "player1_wins": 5,
      "player2_wins": 7,
      "total": 12
    },
    "best_of_5": {
      "player1_wins": 2,
      "player2_wins": 4,
      "total": 6
    },
    "other": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    }
  },
  "tiebreak_record": {
    "player1_tiebreaks_won": 7,
    "player2_tiebreaks_won": 9,
    "total_tiebreaks": 16
  },
  "deciding_sets": {
    "player1_deciding_set_wins": 2,
    "player2_deciding_set_wins": 6,
    "total_deciding_sets": 8
  },
  "breakdown_totals": {
    "total_matches": 18,
    "surface": 18,
    "level": 18,
    "format": 18,
    "reconciles": true
  },
  "matches": [
    {
      "id": "atp_2026_0410_373",
      "date": "2026-04-12",
      "tournament_name": "Monte Carlo Masters",
      "surface": "Clay",
      "level": "M",
      "level_bucket": "masters_1000",
      "round": "F",
      "winner_id": "atp_206173",
      "winner_name": "Jannik Sinner",
      "score": "7-6(5) 6-3",
      "canonical_id": "atp_2026_0410_373",
      "name": "Monte Carlo Masters",
      "starts_at": "2026-04-12T00:00:00+00:00"
    },
    {
      "id": "atp_2025_0605_385",
      "date": "2025-11-09",
      "tournament_name": "ATP Finals",
      "surface": "Hard",
      "level": "F",
      "level_bucket": "tour_finals",
      "round": "F",
      "winner_id": "atp_206173",
      "winner_name": "Jannik Sinner",
      "score": "7-6(4) 7-5",
      "canonical_id": "atp_2025_0605_385",
      "name": "ATP Finals",
      "starts_at": "2025-11-09T00:00:00+00:00"
    }
  ],
  "matches_pagination": {
    "total": 18,
    "returned": 18,
    "page": 1,
    "page_size": 18,
    "total_pages": 1,
    "has_next": false,
    "has_prev": false
  }
}
GET/tennis/h2h/matrix

Multi-Player H2H Grid

Win grid for a group of 2 to 16 players. Send `player_ids` or `players`, comma-separated or repeated. `current_rank` is null when a player is not on the latest list; read `last_rank`.

ParameterInTypeDescription
player_idsquerystring[]Player IDs, either repeated (player_ids=a&player_ids=b) or comma-separated (player_ids=a,b), matching /players/batch. Required unless `players` is given.
playersquerystring[]Same as player_ids; used when player_ids is not sent.
bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.citoapi.com/api/v1/tennis/h2h/matrix?player_ids=atp_206173,atp_207989"

Real response (HTTP 200), captured from the production API; long arrays cut to two items.

json
{
  "success": true,
  "players": [
    {
      "id": "atp_206173",
      "name": "Jannik Sinner",
      "ioc": "ITA",
      "current_rank": 2,
      "last_rank": 2,
      "last_rank_date": "2026-11-09",
      "career_high_rank": 1,
      "wins": 7,
      "canonical_id": "atp_206173"
    },
    {
      "id": "atp_207989",
      "name": "Carlos Alcaraz",
      "ioc": "ESP",
      "current_rank": 3,
      "last_rank": 3,
      "last_rank_date": "2026-11-09",
      "career_high_rank": 1,
      "wins": 11,
      "canonical_id": "atp_207989"
    }
  ],
  "matrix": {
    "atp_206173": {
      "atp_206173": "-",
      "atp_207989": "7-11"
    },
    "atp_207989": {
      "atp_206173": "11-7",
      "atp_207989": "-"
    }
  }
}
GET/tennis/h2h/{player1_id}/{player2_id}

Head-to-Head (path form)

Path form of /h2h: /h2h/{a}/{b}. Same response and filters.

ParameterInTypeDescription
player1_id*pathstring
player2_id*pathstring
surfacequerystringHard, Clay, Grass, Carpet
levelquerystringTier code: G, M, A, F, D, C
year_fromqueryintegerFirst year
year_toqueryintegerLast year
limitqueryintegerMax meetings in `matches` (newest first). Tallies always cover every meeting.min 1 · max 500
page_sizequeryintegerAlias for limitmin 1 · max 500
pagequeryintegerPage of the meetings list (1-based), with limit/page_sizemin 1 · default 1
bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.citoapi.com/api/v1/tennis/h2h/atp_206173/atp_207989"

Real response (HTTP 200), captured from the production API; long arrays cut to two items.

json
{
  "success": true,
  "player1": {
    "id": "atp_206173",
    "name": "Jannik Sinner",
    "ioc": "ITA",
    "current_rank": 2,
    "last_rank": 2,
    "last_rank_date": "2026-11-09",
    "career_high_rank": 1,
    "wins": 7,
    "canonical_id": "atp_206173"
  },
  "player2": {
    "id": "atp_207989",
    "name": "Carlos Alcaraz",
    "ioc": "ESP",
    "current_rank": 3,
    "last_rank": 3,
    "last_rank_date": "2026-11-09",
    "career_high_rank": 1,
    "wins": 11,
    "canonical_id": "atp_207989"
  },
  "summary": {
    "total_matches": 18,
    "player1_wins": 7,
    "player2_wins": 11,
    "player1_lead": -4,
    "finals_matches": 9,
    "player1_finals_wins": 4,
    "player2_finals_wins": 5,
    "grand_slam_matches": 6,
    "player1_grand_slam_wins": 2,
    "player2_grand_slam_wins": 4,
    "walkovers": {
      "total": 0,
      "player1_wins": 0,
      "player2_wins": 0,
      "matches": [],
      "note": "Not played, so left out of total_matches, the win counts, every breakdown and matches, as in the head-to-head records the ATP and WTA publish."
    },
    "exhibitions": {
      "total": 0,
      "player1_wins": 0,
      "player2_wins": 0,
      "matches": [],
      "note": "Exhibition events, left out of total_matches, the win counts, every breakdown and matches, as in the head-to-head records the ATP and WTA publish."
    }
  },
  "surface_breakdown": {
    "hard": {
      "player1_wins": 3,
      "player2_wins": 7,
      "total": 10
    },
    "clay": {
      "player1_wins": 2,
      "player2_wins": 4,
      "total": 6
    },
    "grass": {
      "player1_wins": 2,
      "player2_wins": 0,
      "total": 2
    },
    "carpet": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "unknown": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    }
  },
  "level_breakdown": {
    "grand_slam": {
      "player1_wins": 2,
      "player2_wins": 4,
      "total": 6
    },
    "masters_1000": {
      "player1_wins": 2,
      "player2_wins": 5,
      "total": 7
    },
    "tour_finals": {
      "player1_wins": 1,
      "player2_wins": 0,
      "total": 1
    },
    "atp_500_250": {
      "player1_wins": 2,
      "player2_wins": 1,
      "total": 3
    },
    "olympics_davis_cup": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "challenger": {
      "player1_wins": 0,
      "player2_wins": 1,
      "total": 1
    },
    "itf": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "team_events": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "junior": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "exhibition": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    },
    "other": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    }
  },
  "format_breakdown": {
    "best_of_3": {
      "player1_wins": 5,
      "player2_wins": 7,
      "total": 12
    },
    "best_of_5": {
      "player1_wins": 2,
      "player2_wins": 4,
      "total": 6
    },
    "other": {
      "player1_wins": 0,
      "player2_wins": 0,
      "total": 0
    }
  },
  "breakdown_totals": {
    "total_matches": 18,
    "surface": 18,
    "level": 18,
    "format": 18,
    "reconciles": true
  },
  "tiebreak_record": {
    "player1_tiebreaks_won": 7,
    "player2_tiebreaks_won": 9,
    "total_tiebreaks": 16
  },
  "deciding_sets": {
    "player1_deciding_set_wins": 2,
    "player2_deciding_set_wins": 6,
    "total_deciding_sets": 8
  },
  "matches": [
    {
      "id": "atp_2026_0410_373",
      "date": "2026-04-12",
      "tournament_name": "Monte Carlo Masters",
      "surface": "Clay",
      "level": "M",
      "level_bucket": "masters_1000",
      "round": "F",
      "winner_id": "atp_206173",
      "winner_name": "Jannik Sinner",
      "score": "7-6(5) 6-3",
      "canonical_id": "atp_2026_0410_373",
      "name": "Monte Carlo Masters",
      "starts_at": "2026-04-12T00:00:00+00:00"
    },
    {
      "id": "atp_2025_0605_385",
      "date": "2025-11-09",
      "tournament_name": "ATP Finals",
      "surface": "Hard",
      "level": "F",
      "level_bucket": "tour_finals",
      "round": "F",
      "winner_id": "atp_206173",
      "winner_name": "Jannik Sinner",
      "score": "7-6(4) 7-5",
      "canonical_id": "atp_2025_0605_385",
      "name": "ATP Finals",
      "starts_at": "2025-11-09T00:00:00+00:00"
    }
  ],
  "matches_pagination": {
    "total": 18,
    "returned": 18,
    "page": 1,
    "page_size": 18,
    "total_pages": 1,
    "has_next": false,
    "has_prev": false
  }
}

Real-time scores, the full archive since 1968 and webhooks are on Pro. Free keys: 500 calls/month, live 60 s delayed, last 30 days.