/v1/results/yesterday

Yesterday's finished matches, every event. On every plan.

GEThttps://api.tabletennisapi.com/v1/results/yesterday
Plans:Free keyLiveArchiveComplete On the free key, games, duration_s and table come back as null

Parameters

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

Run it live

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