Documentation / Guides
Getting started
From no key to your first result in about two minutes.
- Get a key. Enter your email on the sign-up page. The key arrives straight away and starts with
tta_live_. It is shown once, so copy it somewhere safe. - Make a call. Ask for yesterday's results, which every plan can read.
- Read the answer. Loop over
data; each item is a match with its event, round, both sides and the score.
curl
curl https://api.tabletennisapi.com/v1/results/yesterday \
-H "Authorization: Bearer $TT_KEY"Python
import requests res = requests.get("https://api.tabletennisapi.com/v1/results/yesterday", headers={"Authorization": f"Bearer {key}"}).json() for m in res["data"]: print(m["sides"][0]["name"], m["score"]["a"], "-", m["score"]["b"], m["sides"][1]["name"])
Check your key
/v1/usage tells you your plan, calls today, your limits and the dates your plan reads. It never counts against your allowance, so it is the safe first call from any new program.
Keep the key on your server. Code that runs in a visitor's browser shows its key to anyone who looks.