Documentation / Endpoints / Rankings
/v1/rankings
World rankings: the top 100 of a list for a week, with points and movement. The latest week unless you ask for one.
GEThttps://api.tabletennisapi.com/v1/rankings
Plans:Free keyLiveArchiveComplete
Parameters
| Name | In | Type | Required | What it does | Example |
|---|---|---|---|---|---|
discipline | query | string | optional | MS, WS, MD, WD or XD | MS |
doubles | query | string | optional | For MD, WD and XD: pair (pairs ranked together) or player (each player ranked on their own doubles results) | pair |
list | query | string | optional | senior or youth | senior |
week | query | string | optional | A past week, such as 2026-41 (year and week). Weeks are held from the first week we read on | 2026-48 |
country | query | string | optional | Only players from this country (three letters); keeps their world rank | CHN |
Run it live
GET /v1/rankingsA real call to the API, from your browser
Your key is kept in this browser only, so every docs page has it, and is sent only to api.tabletennisapi.com. Left empty, the call runs on a free key with its dates and fields, 20 calls a minute.
GEThttps://api.tabletennisapi.com/v1/rankings
Not run yet
Press Run it to see the answer here.
Response
A real answer from the data, two rows shown. Every field is described in the manual.
200 OKapplication/json
{
"data": [
{
"rank": 1,
"previous_rank": 1,
"movement": 0,
"points": 7598,
"player": {
"id": "pl_5p9a00yg",
"name": "Matsushima Sora",
"country": "JPN"
},
"partner": null,
"age_group": "U19"
},
{
"rank": 2,
"previous_rank": 2,
"movement": 0,
"points": 6963,
"player": {
"id": "pl_mc5w19rn",
"name": "Harimoto Tomokazu",
"country": "JPN"
},
"partner": null,
"age_group": null
}
],
"meta": {
"week": "2026-49",
"published": "2026-11-30",
"discipline": "MS",
"doubles": null,
"list": "senior",
"count": 100,
"latest_week": "2026-49",
"next_list": "2026-12-07"
}
}Example
curl
curl https://api.tabletennisapi.com/v1/rankings \
-H "Authorization: Bearer $TT_KEY"Python
import os, requests res = requests.get("https://api.tabletennisapi.com/v1/rankings", headers={"Authorization": "Bearer " + os.environ["TT_KEY"]}).json()
JavaScript
const res = await fetch("https://api.tabletennisapi.com/v1/rankings", { headers: { Authorization: "Bearer " + process.env.TT_KEY }, }); const { data, meta } = await res.json();
PHP
$ch = curl_init("https://api.tabletennisapi.com/v1/rankings"); curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TT_KEY")]]); $res = json_decode(curl_exec($ch), true);
Go
req, _ := http.NewRequest("GET", "https://api.tabletennisapi.com/v1/rankings", nil) req.Header.Set("Authorization", "Bearer "+os.Getenv("TT_KEY")) res, err := http.DefaultClient.Do(req)
Generate a client
Prefer a typed client? Every endpoint, parameter and field is in openapi.json (OpenAPI 3.1), so any OpenAPI generator builds one in your language; this call is rankings in it. Or import the Postman collection and run every call with no code.
Generate a client
npx @openapitools/openapi-generator-cli generate \
-i https://tabletennisapi.com/openapi.json \
-g python -o tabletennis-client
# or -g typescript-fetch, php, go, java, csharp, ruby, kotlin, swift5Answers come back as data and meta; errors as error. See Errors and Pagination.