Documentation / Endpoints / Reference and account
/v1/usage
Your plan, calls today, limits and the dates your plan reads. Not counted against your allowance.
GEThttps://api.tabletennisapi.com/v1/usage
Plans:Free keyLiveArchiveComplete
No parameters.
Run it live
GET /v1/usageA 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/usage
Not run yet
Press Run it to see the answer here.
Response
A real answer from the data. Every field is described in the manual.
200 OKapplication/json
{
"data": {
"plan": "Complete",
"key_prefix": "tta_live_7k2m",
"calls_today": 214,
"calls_this_month": 5120,
"limits": {
"per_minute": 120,
"per_day": 50000
},
"resets_at": "2026-11-08T00:00:00Z",
"data_window": {
"from": null,
"to": "today and scheduled"
}
},
"meta": []
}Example
curl
curl https://api.tabletennisapi.com/v1/usage \
-H "Authorization: Bearer $TT_KEY"Python
import os, requests res = requests.get("https://api.tabletennisapi.com/v1/usage", headers={"Authorization": "Bearer " + os.environ["TT_KEY"]}).json()
JavaScript
const res = await fetch("https://api.tabletennisapi.com/v1/usage", { headers: { Authorization: "Bearer " + process.env.TT_KEY }, }); const { data, meta } = await res.json();
PHP
$ch = curl_init("https://api.tabletennisapi.com/v1/usage"); 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/usage", 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 usage 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.