/v1/live

Matches being played now, with the game in progress. Refreshed about every 10 seconds.

GEThttps://api.tabletennisapi.com/v1/live
Plans:LiveComplete

Parameters

NameInTypeRequiredWhat it doesExample
disciplinequerystringoptionalMS, WS, MD, WD, XD; teams MT, WT, XTMS

Run it live

GET /v1/liveA 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/live
Not run yet
Press Run it to see the answer here.

Response

The same Match objects as GET /v1/matches, which shows a real answer. This one changes from minute to minute: press Run it to see it now.

Example

curl
curl https://api.tabletennisapi.com/v1/live \
  -H "Authorization: Bearer $TT_KEY"
Python
import os, requests
res = requests.get("https://api.tabletennisapi.com/v1/live",
    headers={"Authorization": "Bearer " + os.environ["TT_KEY"]}).json()
JavaScript
const res = await fetch("https://api.tabletennisapi.com/v1/live", {
  headers: { Authorization: "Bearer " + process.env.TT_KEY },
});
const { data, meta } = await res.json();
PHP
$ch = curl_init("https://api.tabletennisapi.com/v1/live");
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/live", 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 live 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, swift5

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