tennisdatabaseAPI

Tennis API documentation

Ctrl K
DocsMatchesLive match
Matches

Live match

GEThttps://api.tennisdatabaseapi.com/v1/live/{id}

One match in play: the live score and every game so far, point by point, with who served, breaks, break points and set points. After it leaves Live, its last score stays here 7 days (meta.in_live false).

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/{id}

1Parameters

NameInTypeWhat it is
idrequiredpathidAn id from another answer, such as mt_ and 8 characters. Ids are our own and never change.

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/{id}"

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

FieldTypeWhat it holds
id, status, score, player_1, player_2mixedAs in Live scores
point_by_pointarrayEvery game so far, in order: set, game, tiebreak, server, won_by (null for the game in progress), break, games_after, points (player_1 first), break_points and set_points (the point numbers). A tie-break is one game with tiebreak true, its points the running tie-break score, player_1 first
point_by_point_read_atstringWhen the games were last read: at once when the score changes, at least every 2 minutes

5Errors

401unauthorizedNo key, or a key that is unknown or revoked.
403upgrade_requiredThe free key: this endpoint is on the Live plan and above.
404not_foundNo such id.
422unknown_parameterA parameter this endpoint does not take.
429rate_limitedToo many calls this minute, or the allowance used (quota_exceeded).