/v1/h2h/{a}/{b}

Two players against each other: wins, games, and every meeting.

GEThttps://api.tabletennisapi.com/v1/h2h/{a}/{b}
Plans:LiveArchiveComplete

Parameters

NameInTypeRequiredWhat it doesExample
apathidrequiredThe first player id, as returned by any listpl_51t63nz3
bpathidrequiredThe second player id, as returned by any listpl_yp1ww51h

Run it live

GET /v1/h2h/{a}/{b}A real call to the API, from your browser
Your key stays in this page: it is sent only to api.tabletennisapi.com and never stored. Left empty, the call runs on a free key with its dates and fields, 20 calls a minute.
GEThttps://api.tabletennisapi.com/v1/h2h/{a}/{b}
Not run yet
Press Run it to see the answer here.

Response

A real answer from the data, two rows shown. Every field is described in the manual.

200 OKapplication/json
{
    "data": [
        {
            "id": "mt_y4m2qe95",
            "event": {
                "id": "ev_5mgjtt6p",
                "name": "China Smash 2026 Presented by Beijing Shijingshan Culture & Tourism Group"
            },
            "date": "2026-10-07",
            "start_time": "2026-10-07T12:55:00Z",
            "discipline": "XD",
            "age_group": null,
            "para_class": null,
            "round": "quarter_final",
            "round_name": "Quarter-finals",
            "rubber": null,
            "status": "finished",
            "best_of": 5,
            "points_per_game": 11,
            "win_by": 2,
            "utc_offset_min": 480,
            "sides": [
                {
                    "side": "a",
                    "name": "Huang Youzheng/Chen Yi",
                    "country": "CHN",
                    "players": [
                        {
                            "id": "pl_j4gj3bdr",
                            "name": "Huang Youzheng",
                            "country": "CHN"
                        },
                        {
                            "id": "pl_yp1ww51h",
                            "name": "Chen Yi",
                            "country": "CHN"
                        }
                    ]
                },
                {
                    "side": "b",
                    "name": "Matsushima Sora/Harimoto Miwa",
                    "country": "JPN",
                    "players": [
                        {
                            "id": "pl_5p9a00yg",
                            "name": "Matsushima Sora",
                            "country": "JPN"
                        },
                        {
                            "id": "pl_51t63nz3",
                            "name": "Harimoto Miwa",
                            "country": "JPN"
                        }
                    ]
                }
            ],
            "score": {
                "a": 2,
                "b": 3
            },
            "winner": "b",
            "result_note": null,
            "games": [
                {
                    "a": 11,
                    "b": 5
                },
                {
                    "a": 9,
                    "b": 11
                },
                {
                    "a": 11,
                    "b": 9
                },
                {
                    "a": 5,
                    "b": 11
                },
                {
                    "a": 5,
                    "b": 11
                }
            ],
            "duration_s": 2145,
            "table": 1,
            "started_at": "2026-10-07T13:42:25Z",
            "timeouts": {
                "a": 1,
                "b": 1
            },
            "cards": {
                "a": [],
                "b": []
            },
            "video_review": true,
            "challenges_each": 2,
            "serving": null
        },
        {
            "id": "mt_fs5ttbe2",
            "event": {
                "id": "ev_w5hw10am",
                "name": "Champions Macao 2026 Presented by Galaxy Entertainment Group"
            },
            "date": "2026-09-13",
            "start_time": "2026-09-13T10:30:00Z",
            "discipline": "WS",
            "age_group": null,
            "para_class": null,
            "round": "final",
            "round_name": "Final",
            "rubber": null,
            "status": "finished",
            "best_of": 7,
            "points_per_game": 11,
            "win_by": 2,
            "utc_offset_min": 480,
            "sides": [
                {
                    "side": "a",
                    "name": "Harimoto Miwa",
                    "country": "JPN",
                    "players": [
                        {
                            "id": "pl_51t63nz3",
                            "name": "Harimoto Miwa",
                            "country": "JPN"
                        }
                    ]
                },
                {
                    "side": "b",
                    "name": "Chen Yi",
                    "country": "CHN",
                    "players": [
                        {
                            "id": "pl_yp1ww51h",
                            "name": "Chen Yi",
                            "country": "CHN"
                        }
                    ]
                }
            ],
            "score": {
                "a": 4,
                "b": 3
            },
            "winner": "a",
            "result_note": null,
            "games": [
                {
                    "a": 11,
                    "b": 7
                },
                {
                    "a": 11,
                    "b": 7
                },
                {
                    "a": 9,
                    "b": 11
                },
                {
                    "a": 8,
                    "b": 11
                },
                {
                    "a": 11,
                    "b": 13
                },
                {
                    "a": 11,
                    "b": 9
                },
                {
                    "a": 12,
                    "b": 10
                }
            ],
            "duration_s": 4103,
            "table": 1,
            "started_at": null,
            "timeouts": {
                "a": 1,
                "b": 1
            },
            "cards": {
                "a": [],
                "b": []
            },
            "video_review": false,
            "challenges_each": 99,
            "serving": null
        }
    ],
    "meta": {
        "count": 2,
        "next_cursor": "eyJvIjoyLCJwIjoyfQ",
        "page": 1,
        "per_page": 2,
        "total": 13,
        "total_pages": 7,
        "next_page": 2,
        "prev_page": null,
        "summary": {
            "played": 13,
            "wins_a": 11,
            "wins_b": 2,
            "player_a": "pl_51t63nz3",
            "player_b": "pl_yp1ww51h"
        }
    }
}

Example

curl
curl https://api.tabletennisapi.com/v1/h2h/pl_51t63nz3/pl_yp1ww51h \
  -H "Authorization: Bearer $TT_KEY"
Python
import os, requests
res = requests.get("https://api.tabletennisapi.com/v1/h2h/pl_51t63nz3/pl_yp1ww51h",
    headers={"Authorization": "Bearer " + os.environ["TT_KEY"]}).json()

Answers come back as data and meta; errors as error. See Errors and Pagination.