Matches
Live scores
GET
https://api.tennisdatabaseapi.com/v1/liveLive and CompleteThe singles matches in play now, read every 15 seconds: sets, games, the game in progress with who serves and its points, how long ago each was read, and those finished in the last 15 minutes.
Free key not includedLive includedArchive not includedComplete included
Try itRuns against the live API with your key. Your key stays in this browser.API
GEThttps://api.tennisdatabaseapi.com/v1/live
1Parameters
| Name | What it is |
|---|---|
tour | Men or women: men, women. |
tier | The level of the event: slam, tour, challenger, itf, utr, team, other. |
tournament | A tournament id. |
status | In play, or finished in the last 15 minutes: live, finished. |
page, per_page | Paging: 50 a page unless you ask, at most 50. See Paging. |
cursor | The meta.next_cursor of the page before, to walk a long list. |
Anything else in the address answers 422 unknown_parameter, with the list of parameters this endpoint takes.
2Request
curl -H "Authorization: Bearer $TDA_KEY" \ "https://api.tennisdatabaseapi.com/v1/live"
$ch = curl_init('https://api.tennisdatabaseapi.com/v1/live'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('TDA_KEY')], CURLOPT_RETURNTRANSFER => true, ]); $answer = json_decode(curl_exec($ch), true); print_r($answer['data']);
import os, requests r = requests.get( "https://api.tennisdatabaseapi.com/v1/live", headers={"Authorization": f"Bearer {os.environ['TDA_KEY']}"}, ) print(r.json()["data"])
const r = await fetch("https://api.tennisdatabaseapi.com/v1/live", { headers: { Authorization: `Bearer ${process.env.TDA_KEY}` }, }); const { data } = await r.json(); console.log(data);
The code follows the form in Try it, with your key in it once you have entered one. Without a key it reads $TDA_KEY.
3Answer
The example answers are being prepared. Try it above shows the real answer meanwhile.
4Fields
| Field | What it holds |
|---|---|
id, status | The live match, lv_ and 10 characters, and live (in play) or finished (ended in the last 15 minutes; it is then in Matches on a day under its own match id) |
start_time, tour, tournament, round | As in Fixtures: when play began, UTC, and the tournament with its id, name, tier, season and surface |
player_1, player_2 | In the order of play: player (id, name, country), the current rank and elo |
score | sets won by each, games of each set so far, and current_game: the set, the game, tiebreak, who is serving (server), the points (player_1 first; tiebreak points as counts) and point_at, when they last changed; null once the match has ended |
elo_chance | The chance each player's Elo rating gave them before the match. A rating, not a tip |
games_played | Games finished so far |
read_at, age_seconds, score_changed_at | When the match was last read (every 15 seconds while it is in play), how many seconds ago that was, and when its score last changed |
meta.read_at, meta.read_age_seconds | When the list of live matches was last read, and how long ago |
5Errors
bad_request | A value out of range, such as a date or a tier that is not one of the list. |
unauthorized | No key, or a key that is unknown or revoked. |
upgrade_required | The free key: this endpoint is on the Live plan and above. |
unknown_parameter | A parameter this endpoint does not take. |
rate_limited | Too many calls this minute, or the allowance used (quota_exceeded). |