{
    "openapi": "3.1.0",
    "info": {
        "title": "Table Tennis API",
        "version": "1.0.0",
        "description": "Live scores, results, events and players from professional table tennis (professional events since December 2024). Updated 9 October 2026. The whole documentation: https://tabletennisapi.com/documentation/manual.md",
        "contact": {
            "name": "Support",
            "url": "https://tabletennisapi.com/support"
        },
        "termsOfService": "https://tabletennisapi.com/terms"
    },
    "servers": [
        {
            "url": "https://api.tabletennisapi.com"
        }
    ],
    "externalDocs": {
        "url": "https://tabletennisapi.com/documentation"
    },
    "security": [
        {
            "bearer": []
        },
        {
            "apiKey": []
        }
    ],
    "tags": [
        {
            "name": "Account"
        },
        {
            "name": "Events"
        },
        {
            "name": "Matches"
        },
        {
            "name": "Players"
        },
        {
            "name": "Rankings"
        }
    ],
    "paths": {
        "/v1/usage": {
            "get": {
                "operationId": "usage",
                "summary": "Your plan, calls today, limits and the dates your plan reads. Not counted against your allowance",
                "description": "Your plan, calls today, limits and the dates your plan reads. Not counted against your allowance. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Account"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/usage"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Usage"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/events": {
            "get": {
                "operationId": "events",
                "summary": "Events: past, running and scheduled, newest first",
                "description": "Events: past, running and scheduled, newest first. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Events"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/events"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Event"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Events ending on or after this day (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Events starting on or before this day (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Words in the event name, such as \"Champions\" or \"Doha\"",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Host country, three letters (CHN, QAT)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tier",
                        "in": "query",
                        "required": false,
                        "description": "1 the top senior events, 2 other senior events, 3 feeders, 4 youth, 5 other",
                        "schema": {
                            "type": "integer",
                            "enum": [
                                1,
                                2,
                                3,
                                4,
                                5
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows a page",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "meta.next_cursor from the previous answer, as given",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/events/{id}": {
            "get": {
                "operationId": "event",
                "summary": "One event: name, dates, venue, and its disciplines with match counts",
                "description": "One event: name, dates, venue, and its disciplines with match counts. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Events"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/event"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/EventDetail"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The event id",
                        "schema": {
                            "type": "string",
                            "pattern": "^ev_[0-9a-z]{8}$"
                        },
                        "example": "ev_w5hw10am"
                    }
                ]
            }
        },
        "/v1/events/{id}/matches": {
            "get": {
                "operationId": "event_matches",
                "summary": "An event's matches, in order of play",
                "description": "An event's matches, in order of play. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Events"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/event-matches"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Match"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The event id",
                        "schema": {
                            "type": "string",
                            "pattern": "^ev_[0-9a-z]{8}$"
                        },
                        "example": "ev_w5hw10am"
                    },
                    {
                        "name": "discipline",
                        "in": "query",
                        "required": false,
                        "description": "MS, WS, MD, WD, XD; teams MT, WT, XT",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "MS",
                                "WS",
                                "MD",
                                "WD",
                                "XD",
                                "MT",
                                "WT",
                                "XT"
                            ]
                        }
                    },
                    {
                        "name": "age_group",
                        "in": "query",
                        "required": false,
                        "description": "Youth age group: U11, U13, U15, U17, U19. \"senior\" for seniors only",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "para_class",
                        "in": "query",
                        "required": false,
                        "description": "Para sport class, such as MS6",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "round",
                        "in": "query",
                        "required": false,
                        "description": "Round: final, semi_final, quarter_final, round_of_16 ... round_of_128, group, qualifying_1 to qualifying_4, qualifying_knockout or bronze",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "final",
                                "semi_final",
                                "quarter_final",
                                "round_of_16",
                                "round_of_32",
                                "round_of_64",
                                "round_of_128",
                                "group",
                                "qualifying_1",
                                "qualifying_2",
                                "qualifying_3",
                                "qualifying_4",
                                "qualifying_knockout",
                                "bronze"
                            ]
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "finished, live, scheduled or unconfirmed (played, no official result)",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "finished",
                                "live",
                                "scheduled",
                                "unconfirmed"
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows a page",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "meta.next_cursor from the previous answer, as given",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/matches": {
            "get": {
                "operationId": "matches",
                "summary": "Matches on a day or across dates, every event",
                "description": "Matches on a day or across dates, every event. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Matches"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/matches"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Match"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "One day (YYYY-MM-DD), the local day of play. Default: today",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "First day, with to",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Last day, with from (at most 31 days)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "discipline",
                        "in": "query",
                        "required": false,
                        "description": "MS, WS, MD, WD, XD; teams MT, WT, XT",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "MS",
                                "WS",
                                "MD",
                                "WD",
                                "XD",
                                "MT",
                                "WT",
                                "XT"
                            ]
                        }
                    },
                    {
                        "name": "age_group",
                        "in": "query",
                        "required": false,
                        "description": "Youth age group: U11 to U19. \"senior\" for seniors only",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tier",
                        "in": "query",
                        "required": false,
                        "description": "Event tier, 1 to 5",
                        "schema": {
                            "type": "integer",
                            "enum": [
                                1,
                                2,
                                3,
                                4,
                                5
                            ]
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "finished, live, scheduled or unconfirmed (played, no official result)",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "finished",
                                "live",
                                "scheduled",
                                "unconfirmed"
                            ]
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Matches with a player from this country (three letters)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows a page",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "meta.next_cursor from the previous answer, as given",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/matches/{id}": {
            "get": {
                "operationId": "match",
                "summary": "One match: players, score, every game, length, table, format, real start, timeouts and cards",
                "description": "One match: players, score, every game, length, table, format, real start, timeouts and cards. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Matches"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/match"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Match"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The match id",
                        "schema": {
                            "type": "string",
                            "pattern": "^mt_[0-9a-z]{8}$"
                        },
                        "example": "mt_fs5ttbe2"
                    }
                ]
            }
        },
        "/v1/matches/{id}/points": {
            "get": {
                "operationId": "match_points",
                "summary": "Point by point: every score in every game as our live tracking saw it, about every 10 seconds, with who served. For matches followed live from October 2026",
                "description": "Point by point: every score in every game as our live tracking saw it, about every 10 seconds, with who served. For matches followed live from October 2026. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Matches"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/match-points"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/PointStep"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The match id",
                        "schema": {
                            "type": "string",
                            "pattern": "^mt_[0-9a-z]{8}$"
                        },
                        "example": "mt_fs5ttbe2"
                    }
                ]
            }
        },
        "/v1/live": {
            "get": {
                "operationId": "live",
                "summary": "Matches being played now, with the game in progress. Refreshed about every 10 seconds",
                "description": "Matches being played now, with the game in progress. Refreshed about every 10 seconds. Plans: Live, Complete.",
                "tags": [
                    "Matches"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/live"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Match"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "discipline",
                        "in": "query",
                        "required": false,
                        "description": "MS, WS, MD, WD, XD; teams MT, WT, XT",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "MS",
                                "WS",
                                "MD",
                                "WD",
                                "XD",
                                "MT",
                                "WT",
                                "XT"
                            ]
                        }
                    }
                ]
            }
        },
        "/v1/results/yesterday": {
            "get": {
                "operationId": "results_yesterday",
                "summary": "Yesterday's finished matches, every event. On every plan",
                "description": "Yesterday's finished matches, every event. On every plan. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Matches"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/results-yesterday"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Match"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "discipline",
                        "in": "query",
                        "required": false,
                        "description": "MS, WS, MD, WD, XD; teams MT, WT, XT",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "MS",
                                "WS",
                                "MD",
                                "WD",
                                "XD",
                                "MT",
                                "WT",
                                "XT"
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows a page",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "meta.next_cursor from the previous answer, as given",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/players": {
            "get": {
                "operationId": "players",
                "summary": "Find players by name or country",
                "description": "Find players by name or country. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Players"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/players"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Player"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Part of the name, at least 2 letters",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Three letters (CHN, JPN)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows a page",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "meta.next_cursor from the previous answer, as given",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/players/{id}": {
            "get": {
                "operationId": "player",
                "summary": "One player: name, country and their record by discipline",
                "description": "One player: name, country and their record by discipline. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Players"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/player"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/PlayerDetail"
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The player id",
                        "schema": {
                            "type": "string",
                            "pattern": "^pl_[0-9a-z]{8}$"
                        },
                        "example": "pl_51t63nz3"
                    }
                ]
            }
        },
        "/v1/players/{id}/matches": {
            "get": {
                "operationId": "player_matches",
                "summary": "A player's matches, newest first, singles and doubles",
                "description": "A player's matches, newest first, singles and doubles. Plans: Live, Archive, Complete.",
                "tags": [
                    "Players"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/player-matches"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Match"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The player id",
                        "schema": {
                            "type": "string",
                            "pattern": "^pl_[0-9a-z]{8}$"
                        },
                        "example": "pl_51t63nz3"
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "First day (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Last day (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "discipline",
                        "in": "query",
                        "required": false,
                        "description": "MS, WS, MD, WD, XD; teams MT, WT, XT",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "MS",
                                "WS",
                                "MD",
                                "WD",
                                "XD",
                                "MT",
                                "WT",
                                "XT"
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows a page",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "meta.next_cursor from the previous answer, as given",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/h2h/{a}/{b}": {
            "get": {
                "operationId": "h2h",
                "summary": "Two players against each other: wins, games, and every meeting",
                "description": "Two players against each other: wins, games, and every meeting. Plans: Live, Archive, Complete.",
                "tags": [
                    "Players"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/h2h"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Match"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "a",
                        "in": "path",
                        "required": true,
                        "description": "The first player id",
                        "schema": {
                            "type": "string",
                            "pattern": "^pl_[0-9a-z]{8}$"
                        },
                        "example": "pl_51t63nz3"
                    },
                    {
                        "name": "b",
                        "in": "path",
                        "required": true,
                        "description": "The second player id",
                        "schema": {
                            "type": "string",
                            "pattern": "^pl_[0-9a-z]{8}$"
                        },
                        "example": "pl_yp1ww51h"
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows a page",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "meta.next_cursor from the previous answer, as given",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/rankings": {
            "get": {
                "operationId": "rankings",
                "summary": "World rankings: the top 100 of a list for a week, with points and movement. The latest week unless you ask for one",
                "description": "World rankings: the top 100 of a list for a week, with points and movement. The latest week unless you ask for one. Plans: Free key, Live, Archive, Complete.",
                "tags": [
                    "Rankings"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/rankings"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Ranking"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "discipline",
                        "in": "query",
                        "required": false,
                        "description": "MS, WS, MD, WD or XD",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "MS",
                                "WS",
                                "MD",
                                "WD",
                                "XD"
                            ]
                        }
                    },
                    {
                        "name": "doubles",
                        "in": "query",
                        "required": false,
                        "description": "For MD, WD and XD: pair (pairs ranked together) or player (each player ranked on their own doubles results)",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pair",
                                "player"
                            ]
                        }
                    },
                    {
                        "name": "list",
                        "in": "query",
                        "required": false,
                        "description": "senior or youth",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "senior",
                                "youth"
                            ]
                        }
                    },
                    {
                        "name": "week",
                        "in": "query",
                        "required": false,
                        "description": "A past week, such as 2026-41 (year and week). Weeks are held from the first week we read on",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Only players from this country (three letters); keeps their world rank",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        },
        "/v1/players/{id}/rankings": {
            "get": {
                "operationId": "player_rankings",
                "summary": "A player's world ranking week by week, on every list they are in, newest first",
                "description": "A player's world ranking week by week, on every list they are in, newest first. Plans: Live, Archive, Complete.",
                "tags": [
                    "Rankings"
                ],
                "externalDocs": {
                    "url": "https://tabletennisapi.com/documentation/endpoints/player-rankings"
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/PlayerRanking"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "bad_request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "upgrade_required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not_found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "unknown_parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "rate_limited or quota_exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The player id",
                        "schema": {
                            "type": "string",
                            "pattern": "^pl_[0-9a-z]{8}$"
                        },
                        "example": "pl_51t63nz3"
                    },
                    {
                        "name": "discipline",
                        "in": "query",
                        "required": false,
                        "description": "MS, WS, MD, WD or XD",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "MS",
                                "WS",
                                "MD",
                                "WD",
                                "XD"
                            ]
                        }
                    },
                    {
                        "name": "doubles",
                        "in": "query",
                        "required": false,
                        "description": "For MD, WD and XD: pair or player",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pair",
                                "player"
                            ]
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Weeks published on or after this day (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Weeks published on or before this day (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows a page",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, from 1",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "meta.next_cursor from the previous answer, as given",
                        "schema": {
                            "type": "string"
                        }
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearer": {
                "type": "http",
                "scheme": "bearer",
                "description": "Authorization: Bearer <key>"
            },
            "apiKey": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key"
            }
        },
        "schemas": {
            "Player": {
                "type": "object",
                "required": [
                    "id",
                    "name",
                    "country"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Player id, such as pl_thrm642n. Stable: store it"
                    },
                    "name": {
                        "type": "string",
                        "description": "Name, family name first where that is the custom"
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Association, three letters (CHN, JPN, SWE)"
                    }
                }
            },
            "PlayerDetail": {
                "type": "object",
                "required": [
                    "id",
                    "name",
                    "country",
                    "born",
                    "hand",
                    "height_cm",
                    "record",
                    "world_ranks"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Player id, such as pl_thrm642n. Stable: store it"
                    },
                    "name": {
                        "type": "string",
                        "description": "Name, family name first where that is the custom"
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Association, three letters (CHN, JPN, SWE)"
                    },
                    "born": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Date of birth, YYYY-MM-DD, or YYYY when only the year is recorded, where it is publicly recorded (mostly senior players). Never given for anyone under 18; otherwise null"
                    },
                    "hand": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Playing hand: right, left or both, where it is publicly recorded; otherwise null"
                    },
                    "height_cm": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Height in centimetres, where it is publicly recorded; otherwise null"
                    },
                    "record": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Record"
                        },
                        "description": "Finished matches by discipline, over the dates your plan reads"
                    },
                    "world_ranks": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WorldRank"
                        },
                        "description": "World ranks this week, on every list the player is in (empty when unranked). Week by week: GET /v1/players/{id}/rankings"
                    }
                }
            },
            "WorldRank": {
                "type": "object",
                "required": [
                    "discipline",
                    "doubles",
                    "list",
                    "rank",
                    "points",
                    "week"
                ],
                "properties": {
                    "discipline": {
                        "type": "string",
                        "description": "MS, WS, MD, WD or XD"
                    },
                    "doubles": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "For doubles: pair or player; null for singles"
                    },
                    "list": {
                        "type": "string",
                        "description": "senior or youth"
                    },
                    "rank": {
                        "type": "integer",
                        "description": "World rank"
                    },
                    "points": {
                        "type": "integer",
                        "description": "Ranking points"
                    },
                    "week": {
                        "type": "string",
                        "description": "Year and week of the list, such as 2026-41"
                    }
                }
            },
            "Record": {
                "type": "object",
                "required": [
                    "discipline",
                    "played",
                    "won",
                    "lost",
                    "first",
                    "last"
                ],
                "properties": {
                    "discipline": {
                        "type": "string",
                        "description": "MS, WS, MD, WD, XD, MT, WT or XT"
                    },
                    "played": {
                        "type": "integer",
                        "description": "Finished matches"
                    },
                    "won": {
                        "type": "integer",
                        "description": "Won"
                    },
                    "lost": {
                        "type": "integer",
                        "description": "Lost (draws, matches not played and matches stopped count in played only)"
                    },
                    "first": {
                        "type": "string",
                        "description": "First match day, YYYY-MM-DD"
                    },
                    "last": {
                        "type": "string",
                        "description": "Latest match day, YYYY-MM-DD"
                    }
                }
            },
            "Ranking": {
                "type": "object",
                "required": [
                    "rank",
                    "previous_rank",
                    "movement",
                    "points",
                    "player",
                    "partner",
                    "age_group"
                ],
                "properties": {
                    "rank": {
                        "type": "integer",
                        "description": "World rank on the list that week"
                    },
                    "previous_rank": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Rank the week before, null when not ranked then"
                    },
                    "movement": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Places climbed since the week before (negative when fallen), null when not ranked then"
                    },
                    "points": {
                        "type": "integer",
                        "description": "Ranking points"
                    },
                    "player": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Player"
                            }
                        ],
                        "description": "The player; on the pair lists, the first of the pair"
                    },
                    "partner": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/Player"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The second player on the pair lists, otherwise null"
                    },
                    "age_group": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The player's youth age group (U19, U17, U15, U13) where they are one, otherwise null"
                    }
                }
            },
            "PlayerRanking": {
                "type": "object",
                "required": [
                    "week",
                    "published",
                    "discipline",
                    "doubles",
                    "list",
                    "rank",
                    "previous_rank",
                    "movement",
                    "points",
                    "partner"
                ],
                "properties": {
                    "week": {
                        "type": "string",
                        "description": "Year and week of the list, such as 2026-41"
                    },
                    "published": {
                        "type": "string",
                        "description": "Day the list was published, YYYY-MM-DD"
                    },
                    "discipline": {
                        "type": "string",
                        "description": "MS, WS, MD, WD or XD"
                    },
                    "doubles": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "For doubles: pair (ranked as a pair) or player (ranked on their own doubles results); null for singles"
                    },
                    "list": {
                        "type": "string",
                        "description": "senior or youth"
                    },
                    "rank": {
                        "type": "integer",
                        "description": "World rank that week"
                    },
                    "previous_rank": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Rank the week before"
                    },
                    "movement": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Places climbed since the week before (negative when fallen)"
                    },
                    "points": {
                        "type": "integer",
                        "description": "Ranking points"
                    },
                    "partner": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/Player"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "The partner on a pair list, otherwise null"
                    }
                }
            },
            "Event": {
                "type": "object",
                "required": [
                    "id",
                    "name",
                    "start_date",
                    "end_date",
                    "venue",
                    "city",
                    "country",
                    "tier",
                    "utc_offset_min",
                    "matches"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Event id, such as ev_qdy6dadc. Stable: store it"
                    },
                    "name": {
                        "type": "string",
                        "description": "Event name"
                    },
                    "start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "First day, YYYY-MM-DD"
                    },
                    "end_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Last day, YYYY-MM-DD"
                    },
                    "venue": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Venue name"
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Host city"
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Host country, three letters"
                    },
                    "tier": {
                        "type": "integer",
                        "description": "1 top senior events (Grand Smash, Champions, Finals, World Cup), 2 other senior (Star Contender, Contender), 3 feeders, 4 youth, 5 para and other"
                    },
                    "utc_offset_min": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The venue's offset from UTC in minutes on its first day (480 for UTC+8): from its matches, or from the host country's clock where the whole country keeps one"
                    },
                    "matches": {
                        "type": "integer",
                        "description": "Matches held at the event, in every discipline"
                    }
                }
            },
            "EventDetail": {
                "type": "object",
                "required": [
                    "id",
                    "name",
                    "start_date",
                    "end_date",
                    "venue",
                    "city",
                    "country",
                    "tier",
                    "utc_offset_min",
                    "matches",
                    "disciplines"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Event id, such as ev_qdy6dadc. Stable: store it"
                    },
                    "name": {
                        "type": "string",
                        "description": "Event name"
                    },
                    "start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "First day, YYYY-MM-DD"
                    },
                    "end_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Last day, YYYY-MM-DD"
                    },
                    "venue": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Venue name"
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Host city"
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Host country, three letters"
                    },
                    "tier": {
                        "type": "integer",
                        "description": "1 top senior events (Grand Smash, Champions, Finals, World Cup), 2 other senior (Star Contender, Contender), 3 feeders, 4 youth, 5 para and other"
                    },
                    "utc_offset_min": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The venue's offset from UTC in minutes on its first day (480 for UTC+8): from its matches, or from the host country's clock where the whole country keeps one"
                    },
                    "matches": {
                        "type": "integer",
                        "description": "Matches held at the event, in every discipline"
                    },
                    "disciplines": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Discipline"
                        },
                        "description": "Every discipline held, with its match count"
                    }
                }
            },
            "Discipline": {
                "type": "object",
                "required": [
                    "discipline",
                    "age_group",
                    "para_class",
                    "matches"
                ],
                "properties": {
                    "discipline": {
                        "type": "string",
                        "description": "MS, WS, MD, WD, XD, MT, WT or XT"
                    },
                    "age_group": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "U11 to U19 for youth, null for seniors"
                    },
                    "para_class": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Para sport class, such as MS6"
                    },
                    "matches": {
                        "type": "integer",
                        "description": "Matches in it"
                    }
                }
            },
            "Match": {
                "type": "object",
                "required": [
                    "id",
                    "event",
                    "date",
                    "start_time",
                    "discipline",
                    "age_group",
                    "para_class",
                    "round",
                    "round_name",
                    "rubber",
                    "status",
                    "best_of",
                    "points_per_game",
                    "win_by",
                    "utc_offset_min",
                    "sides",
                    "score",
                    "winner",
                    "result_note",
                    "games",
                    "duration_s",
                    "table",
                    "started_at",
                    "timeouts",
                    "cards",
                    "video_review",
                    "challenges_each",
                    "serving"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Match id, such as mt_qrvrky4e. Stable: store it"
                    },
                    "event": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/EventRef"
                            }
                        ],
                        "description": "The event it belongs to"
                    },
                    "date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Local day of play at the venue, YYYY-MM-DD"
                    },
                    "start_time": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Start in UTC, such as 2026-03-14T09:40:00Z"
                    },
                    "discipline": {
                        "type": "string",
                        "description": "MS, WS, MD, WD, XD singles and doubles; MT, WT, XT team ties"
                    },
                    "age_group": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "U11 to U19 for youth matches, null for seniors"
                    },
                    "para_class": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Para sport class, such as MS6"
                    },
                    "round": {
                        "type": "string",
                        "description": "final, semi_final, quarter_final, round_of_16, round_of_32, round_of_64, round_of_128, group, qualifying_1 to qualifying_4, qualifying_knockout, bronze, or other"
                    },
                    "round_name": {
                        "type": "string",
                        "description": "Round in words, such as Final, Round of 16 or Group 7"
                    },
                    "rubber": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "In a team tie, which match of the tie this is: 1, 2, 3 ...; null otherwise"
                    },
                    "status": {
                        "type": "string",
                        "description": "finished (official result), live (in play now), scheduled, or unconfirmed (played, no official result published)"
                    },
                    "best_of": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Games needed to decide it: 5 or 7"
                    },
                    "points_per_game": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Points that win a game, usually 11"
                    },
                    "win_by": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Lead a game must be won by, usually 2"
                    },
                    "utc_offset_min": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The venue's offset from UTC in minutes at the match (480 for UTC+8), so start_time and started_at can be shown in venue time"
                    },
                    "sides": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Side"
                        },
                        "description": "Side a and side b, always in that order"
                    },
                    "score": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Score"
                            }
                        ],
                        "description": "Games won by each side"
                    },
                    "winner": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "a or b once finished, otherwise null"
                    },
                    "result_note": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "When the match has no ordinary result: walkover, retired, disqualified, not played (no game started), draw (a fixed number of games, level) or stopped (a game left unfinished); otherwise null"
                    },
                    "games": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/Game"
                        },
                        "description": "Points in every game, in order. Null on the free key"
                    },
                    "duration_s": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Length in seconds: from the match card, or measured by our live tracking (to about 10 seconds) for a match followed from its start when the card records none. Null when neither has it, and on the free key"
                    },
                    "table": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Number of the table it was played on. Null on the free key"
                    },
                    "started_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "When the first point was played, in UTC (start_time is the scheduled start). Where the match card records it; null otherwise"
                    },
                    "timeouts": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/Calls"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "Timeouts taken by each side: 0 or 1. Null when not recorded"
                    },
                    "cards": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Cards"
                            }
                        ],
                        "description": "Cards shown to each side: yellow, yellow-red, yellow-red 2; empty lists when none"
                    },
                    "video_review": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether video review was in use for the match"
                    },
                    "challenges_each": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Video review challenges each side may make, where review was in use"
                    },
                    "serving": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "While live: a or b, who served the latest point. Null otherwise"
                    }
                }
            },
            "Calls": {
                "type": "object",
                "required": [
                    "a",
                    "b"
                ],
                "properties": {
                    "a": {
                        "type": "integer",
                        "description": "Side a"
                    },
                    "b": {
                        "type": "integer",
                        "description": "Side b"
                    }
                }
            },
            "Cards": {
                "type": "object",
                "required": [
                    "a",
                    "b"
                ],
                "properties": {
                    "a": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Side a, in the order shown"
                    },
                    "b": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Side b, in the order shown"
                    }
                }
            },
            "PointStep": {
                "type": "object",
                "required": [
                    "game",
                    "a",
                    "b",
                    "server",
                    "seen_at"
                ],
                "properties": {
                    "game": {
                        "type": "integer",
                        "description": "Game number, from 1"
                    },
                    "a": {
                        "type": "integer",
                        "description": "Points side a had in that game at this moment"
                    },
                    "b": {
                        "type": "integer",
                        "description": "Points side b had in that game at this moment"
                    },
                    "server": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "a or b: who served the point that made this score"
                    },
                    "seen_at": {
                        "type": "string",
                        "description": "When our live tracking first saw this score, in UTC. It looks about every 10 seconds, so two points close together can show as one step of two"
                    }
                }
            },
            "EventRef": {
                "type": "object",
                "required": [
                    "id",
                    "name"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Event id"
                    },
                    "name": {
                        "type": "string",
                        "description": "Event name"
                    }
                }
            },
            "Side": {
                "type": "object",
                "required": [
                    "side",
                    "name",
                    "country",
                    "players"
                ],
                "properties": {
                    "side": {
                        "type": "string",
                        "description": "a or b"
                    },
                    "name": {
                        "type": "string",
                        "description": "Player, pair or team name"
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Three letters; null for mixed pairs from two associations"
                    },
                    "players": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Player"
                        },
                        "description": "One player in singles, two in doubles, the squad in team ties"
                    }
                }
            },
            "Score": {
                "type": "object",
                "required": [
                    "a",
                    "b"
                ],
                "properties": {
                    "a": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Games won by side a"
                    },
                    "b": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Games won by side b"
                    }
                }
            },
            "Game": {
                "type": "object",
                "required": [
                    "a",
                    "b"
                ],
                "properties": {
                    "a": {
                        "type": "integer",
                        "description": "Points won by side a"
                    },
                    "b": {
                        "type": "integer",
                        "description": "Points won by side b"
                    }
                }
            },
            "Usage": {
                "type": "object",
                "required": [
                    "plan",
                    "key_prefix",
                    "calls_today",
                    "calls_this_month",
                    "limits",
                    "resets_at",
                    "data_window"
                ],
                "properties": {
                    "plan": {
                        "type": "string",
                        "description": "Your plan"
                    },
                    "key_prefix": {
                        "type": "string",
                        "description": "The start of the key that made the call"
                    },
                    "calls_today": {
                        "type": "integer",
                        "description": "Calls counted today (UTC), across all your keys: they share one allowance"
                    },
                    "calls_this_month": {
                        "type": "integer",
                        "description": "Calls counted this month (UTC), across all your keys"
                    },
                    "limits": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Limits"
                            }
                        ],
                        "description": "Your limits"
                    },
                    "resets_at": {
                        "type": "string",
                        "description": "When the daily allowance resets, UTC"
                    },
                    "data_window": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/DataWindow"
                            }
                        ],
                        "description": "The days your plan reads, by local day of play"
                    }
                }
            },
            "Limits": {
                "type": "object",
                "required": [
                    "per_minute",
                    "per_day"
                ],
                "properties": {
                    "per_minute": {
                        "type": "integer",
                        "description": "Calls a minute"
                    },
                    "per_day": {
                        "type": "integer",
                        "description": "Calls a day"
                    }
                }
            },
            "DataWindow": {
                "type": "object",
                "required": [
                    "from",
                    "to"
                ],
                "properties": {
                    "from": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "First day, YYYY-MM-DD; null for all history"
                    },
                    "to": {
                        "type": "string",
                        "description": "Last day, YYYY-MM-DD, or \"today and scheduled\""
                    }
                }
            },
            "Meta": {
                "type": "object",
                "properties": {
                    "count": {
                        "description": "Rows in this answer"
                    },
                    "next_cursor": {
                        "description": "Pass back as cursor for the next rows; null when there are no more"
                    },
                    "page": {
                        "description": "This page (when page was sent, or on a first call)"
                    },
                    "per_page": {
                        "description": "Rows a page, 1 to 200 (default 50)"
                    },
                    "total": {
                        "description": "Rows in the whole list"
                    },
                    "total_pages": {
                        "description": "Pages in the whole list"
                    },
                    "next_page": {
                        "description": "The next page number, or null"
                    },
                    "prev_page": {
                        "description": "The previous page number, or null"
                    },
                    "note": {
                        "description": "A plain message, such as which fields your plan leaves null"
                    },
                    "seconds_behind": {
                        "description": "/v1/live only: seconds since the live data last refreshed"
                    },
                    "last_change": {
                        "description": "/v1/live only: when the live data last refreshed, UTC"
                    },
                    "poll_seconds": {
                        "description": "/v1/live only: how often it refreshes"
                    },
                    "summary": {
                        "description": "/v1/h2h only: played, wins_a, wins_b, player_a, player_b over every meeting your plan reads"
                    }
                },
                "additionalProperties": true
            },
            "Error": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message",
                            "docs"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "enum": [
                                    "bad_request",
                                    "unauthorized",
                                    "upgrade_required",
                                    "not_found",
                                    "unknown_parameter",
                                    "rate_limited",
                                    "quota_exceeded",
                                    "server_error"
                                ]
                            },
                            "message": {
                                "type": "string"
                            },
                            "docs": {
                                "type": "string",
                                "format": "uri"
                            },
                            "pricing": {
                                "type": "string",
                                "format": "uri",
                                "description": "With upgrade_required"
                            },
                            "resets_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "With quota_exceeded"
                            }
                        }
                    }
                }
            }
        }
    }
}
