diff --git a/CHANGELOG.md b/CHANGELOG.md
index ba72133..467e0b5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,11 @@ All notable changes to the specification are recorded here.
The API surface is versioned as `v1`. Changes within `v1` are **additive only**;
removing a field or changing its type would require `v2`.
+## [1.13.93] - 2026-11-26
+
+### Added
+- **A tennis data vocabulary page and JSON.** `tennis-data-vocabulary.html` says what each closed code the API returns means. It covers tournament tiers and categories, tours, rounds, surfaces, draws, formats, statuses, results, match events, rankings, points and charted shots. That is 26 vocabularies and 181 codes, each with its own link. `tennis-data-vocabulary.json` carries the same table for code that validates or labels values. Both are built from `openapi.yaml`. The build fails when a code in the spec has no meaning, or when a meaning names a code the spec no longer has. The docs home, the topic menu, `sitemap.xml` and `llms.txt` link the page. Nothing on the wire changed.
+
## [1.13.92] - 2026-11-26
### Clarified
diff --git a/docs/ai-sdk.html b/docs/ai-sdk.html
index e487d17..9c456f5 100644
--- a/docs/ai-sdk.html
+++ b/docs/ai-sdk.html
@@ -200,7 +200,7 @@
diff --git a/docs/auth-quota-and-health.html b/docs/auth-quota-and-health.html
index 67c3f13..8557939 100644
--- a/docs/auth-quota-and-health.html
+++ b/docs/auth-quota-and-health.html
@@ -199,10 +199,10 @@
Skip to content
-Live Tennis API DocsGet a free key ↗Explore the documentation
+Live Tennis API DocsGet a free key ↗Explore the documentation
-
Live Tennis API · docs · version 1.13.92
+
Live Tennis API · docs · version 1.13.93
Tennis API authentication, quota and status
How do you authenticate, and how do you see what quota is left? Send your key as X-API-Key on every request. GET /usage returns your own consumption against your plan's quota and works on every tier including FREE, so a client can check its own headroom before a burst. GET /health is the unauthenticated liveness probe.
2 endpoints on this page. Base URL
@@ -256,6 +256,7 @@
Generated from openapi.yaml by
livetennisapi/openapi. Every endpoint on
diff --git a/docs/broadcast-graphics.html b/docs/broadcast-graphics.html
index 098566c..f0ac31b 100644
--- a/docs/broadcast-graphics.html
+++ b/docs/broadcast-graphics.html
@@ -199,10 +199,10 @@
How do you put live tennis scores into a broadcast graphics template?GET /broadcast/match/{matchId} returns ONE flat object for one match and GET /broadcast/live the same object for every live match in a single call. Both are ULTRA. A graphics template binds each field to a fixed path, so three things are contractual: the object is flat, every key is present on every read (null, never missing), and the score is already in display form — p1_points reads "40" or "AD" and set_line is one string. Built for 1 Hz: every response carries a strong ETag, so If-None-Match makes an unchanged state a 304 with no body. Detect a new state on sequence, never on served_at, which changes on every read.
2 endpoints on this page. Base URL
@@ -276,6 +276,7 @@
Generated from openapi.yaml by
livetennisapi/openapi. Every endpoint on
diff --git a/docs/changelog.atom b/docs/changelog.atom
index e535604..6db9f3b 100644
--- a/docs/changelog.atom
+++ b/docs/changelog.atom
@@ -11,6 +11,19 @@
https://docs.livetennisapi.com/icon-256.pngMIT licence, https://github.com/livetennisapi/openapi/blob/main/LICENSE
+https://docs.livetennisapi.com/changelog.html#v1.13.93
+1.13.93: A tennis data vocabulary page and JSON
+2026-11-26T00:00:00Z
+2026-11-26T00:00:00Z
+
+
+Added: A tennis data vocabulary page and JSON.
+<h3>Added</h3>
+<ul>
+<li><strong>A tennis data vocabulary page and JSON.</strong> <code>tennis-data-vocabulary.html</code> says what each closed code the API returns means. It covers tournament tiers and categories, tours, rounds, surfaces, draws, formats, statuses, results, match events, rankings, points and charted shots. That is 26 vocabularies and 181 codes, each with its own link. <code>tennis-data-vocabulary.json</code> carries the same table for code that validates or labels values. Both are built from <code>openapi.yaml</code>. The build fails when a code in the spec has no meaning, or when a meaning names a code the spec no longer has. The docs home, the topic menu, <code>sitemap.xml</code> and <code>llms.txt</code> link the page. Nothing on the wire changed.</li>
+</ul>
+
+https://docs.livetennisapi.com/changelog.html#v1.13.921.13.92: A push connection that goes silent2026-11-26T00:00:00Z
diff --git a/docs/changelog.html b/docs/changelog.html
index ee34c8e..7c77627 100644
--- a/docs/changelog.html
+++ b/docs/changelog.html
@@ -4,7 +4,7 @@
Live Tennis API — Changelog
-
+
@@ -16,7 +16,7 @@
@@ -201,15 +201,20 @@
Skip to content
-Live Tennis API DocsGet a free key ↗Explore the documentation
+Live Tennis API DocsGet a free key ↗Explore the documentation
Live Tennis API · docs
Changelog
-
Every change to the specification, dated and versioned. The API surface is v1; changes within it are additive only. Current version 1.13.92, last change . Also as the full reference, OpenAPI YAML / JSON, and the dated facts file.
+
Every change to the specification, dated and versioned. The API surface is v1; changes within it are additive only. Current version 1.13.93, last change . Also as the full reference, OpenAPI YAML / JSON, and the dated facts file.
Corrections to published data values are not spec changes, so they are listed in the corrections log.
To follow new versions in a feed reader, subscribe to the Atom feed or the JSON Feed.
+
1.13.93
+
Added
+
+
A tennis data vocabulary page and JSON.tennis-data-vocabulary.html says what each closed code the API returns means. It covers tournament tiers and categories, tours, rounds, surfaces, draws, formats, statuses, results, match events, rankings, points and charted shots. That is 26 vocabularies and 181 codes, each with its own link. tennis-data-vocabulary.json carries the same table for code that validates or labels values. Both are built from openapi.yaml. The build fails when a code in the spec has no meaning, or when a meaning names a code the spec no longer has. The docs home, the topic menu, sitemap.xml and llms.txt link the page. Nothing on the wire changed.
+
1.13.92
Clarified
diff --git a/docs/changelog.json b/docs/changelog.json
index 8fd9f90..937a78c 100644
--- a/docs/changelog.json
+++ b/docs/changelog.json
@@ -14,6 +14,32 @@
}
],
"items": [
+ {
+ "id": "https://docs.livetennisapi.com/changelog.html#v1.13.93",
+ "url": "https://docs.livetennisapi.com/changelog.html#v1.13.93",
+ "title": "1.13.93: A tennis data vocabulary page and JSON",
+ "summary": "Added: A tennis data vocabulary page and JSON.",
+ "content_html": "
Added
\n
\n
A tennis data vocabulary page and JSON.tennis-data-vocabulary.html says what each closed code the API returns means. It covers tournament tiers and categories, tours, rounds, surfaces, draws, formats, statuses, results, match events, rankings, points and charted shots. That is 26 vocabularies and 181 codes, each with its own link. tennis-data-vocabulary.json carries the same table for code that validates or labels values. Both are built from openapi.yaml. The build fails when a code in the spec has no meaning, or when a meaning names a code the spec no longer has. The docs home, the topic menu, sitemap.xml and llms.txt link the page. Nothing on the wire changed.
\n
",
+ "date_published": "2026-11-26T00:00:00Z",
+ "tags": [
+ "Added"
+ ],
+ "_livetennisapi": {
+ "about": "https://docs.livetennisapi.com/llms.txt",
+ "version": "1.13.93",
+ "date": "2026-11-26",
+ "sections": [
+ {
+ "name": "Added",
+ "items": [
+ "A tennis data vocabulary page and JSON. tennis-data-vocabulary.html says what each closed code the API returns means. It covers tournament tiers and categories, tours, rounds, surfaces, draws, formats, statuses, results, match events, rankings, points and charted shots. That is 26 vocabularies and 181 codes, each with its own link. tennis-data-vocabulary.json carries the same table for code that validates or labels values. Both are built from openapi.yaml. The build fails when a code in the spec has no meaning, or when a meaning names a code the spec no longer has. The docs home, the topic menu, sitemap.xml and llms.txt link the page. Nothing on the wire changed."
+ ],
+ "notes": []
+ }
+ ],
+ "client_libraries": []
+ }
+ },
{
"id": "https://docs.livetennisapi.com/changelog.html#v1.13.92",
"url": "https://docs.livetennisapi.com/changelog.html#v1.13.92",
diff --git a/docs/client-libraries.html b/docs/client-libraries.html
index 5c56fa4..9c85901 100644
--- a/docs/client-libraries.html
+++ b/docs/client-libraries.html
@@ -200,7 +200,7 @@
Skip to content
-Live Tennis API DocsGet a free key ↗Explore the documentation
+Live Tennis API DocsGet a free key ↗Explore the documentation
diff --git a/docs/errors-and-rate-limits.html b/docs/errors-and-rate-limits.html
index 9049fe5..0102392 100644
--- a/docs/errors-and-rate-limits.html
+++ b/docs/errors-and-rate-limits.html
@@ -200,7 +200,7 @@
Skip to content
-Live Tennis API DocsGet a free key ↗Explore the documentation
+Live Tennis API DocsGet a free key ↗Explore the documentation
diff --git a/docs/historical-results-archive.html b/docs/historical-results-archive.html
index 69bf313..ed7926b 100644
--- a/docs/historical-results-archive.html
+++ b/docs/historical-results-archive.html
@@ -199,10 +199,10 @@
Skip to content
-Live Tennis API DocsGet a free key ↗Explore the documentation
+Live Tennis API DocsGet a free key ↗Explore the documentation
-
Live Tennis API · docs · version 1.13.92
+
Live Tennis API · docs · version 1.13.93
Historical tennis results API — 1968 onward
How far back does the historical tennis data go, and what is in it? The results archive covers 1968 to 2022: GET /history/archive/matches for results, /archive/players for bios, /archive/career for career aggregates and GET /h2h for head-to-head across both the archive and our own completed matches. All BASIC. Matches from 2013 onward additionally carry a reconstructed point-by-point tape at /archive/matches/{archiveId}/tape (ULTRA).
6 endpoints on this page. Base URL
@@ -316,6 +316,7 @@
Generated from openapi.yaml by
livetennisapi/openapi. Every endpoint on
diff --git a/docs/index.html b/docs/index.html
index 54c1add..529d53a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -370,7 +370,7 @@
How do you read live tennis scores from the API? Poll GET /matches?status=live for the slate, then GET /matches/{matchId}/score for the lowest-latency read of one match. Both are on the FREE plan. Scores carry sets, games, points and the server; /events and /points give the same match as a stream of changes rather than a snapshot, so a client can catch up without re-reading state.
11 endpoints on this page. Base URL
@@ -440,6 +440,7 @@
Generated from openapi.yaml by
livetennisapi/openapi. Every endpoint on
diff --git a/docs/llms.txt b/docs/llms.txt
index 67331cc..fc2a82b 100644
--- a/docs/llms.txt
+++ b/docs/llms.txt
@@ -37,6 +37,7 @@ endpoints, generated from the same spec as the reference:
- How do you export tennis data to CSV, JSON Lines or Parquet? https://docs.livetennisapi.com/export-formats.html
- Which client libraries does the Live Tennis API have? https://docs.livetennisapi.com/client-libraries.html
- How does the Live Tennis API score object map to IPTC SportsML? https://docs.livetennisapi.com/sportsml.html
+- What does each tennis data code mean? https://docs.livetennisapi.com/tennis-data-vocabulary.html
## Webhook troubleshooting
Symptom, cause and fix for each delivery problem: https://docs.livetennisapi.com/push-feed-and-webhooks.html#troubleshooting
diff --git a/docs/openapi.json b/docs/openapi.json
index fc71ebe..daa911f 100644
--- a/docs/openapi.json
+++ b/docs/openapi.json
@@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "Live Tennis API",
- "version": "1.13.92",
+ "version": "1.13.93",
"contact": {
"name": "Live Tennis API",
"url": "https://livetennisapi.com"
diff --git a/docs/players-and-tournaments.html b/docs/players-and-tournaments.html
index ca1eca7..5b4826e 100644
--- a/docs/players-and-tournaments.html
+++ b/docs/players-and-tournaments.html
@@ -199,10 +199,10 @@
How do you look up a player, a tournament or a ranking?GET /players searches by name and GET /players/{playerId} returns one player's bio, current ranking and cached statistics — both FREE. GET /players/{playerId}/stats (PRO) is the player's win/loss record over our completed matches, split by surface, level and season, with ULTRA adding summed serve and return statistics. GET /tournaments is the catalogue that Match.tournament_id joins against, so a match can be resolved to its event without a second lookup. GET /rankings serves rank-ordered listings on PRO. The per-player as-of records, including the Elo tape, are ULTRA.
8 endpoints on this page. Base URL
@@ -333,6 +333,7 @@
Generated from openapi.yaml by
livetennisapi/openapi. Every endpoint on
diff --git a/docs/point-by-point-history.html b/docs/point-by-point-history.html
index 6499540..4fcd87c 100644
--- a/docs/point-by-point-history.html
+++ b/docs/point-by-point-history.html
@@ -199,10 +199,10 @@
Which endpoints return point-by-point tennis data, and how complete is it?GET /history/matches/{matchId} returns the tape for one completed match: the ordered score states we hold for it. The model's win probability sits on the rows that were observed live, and coverage is declared per match. GET /history/matches lists completed matches with their tape coverage, and GET /history/coverage is the measured completeness rollup per tour and draw bucket — a number we publish rather than estimate, with its own as_of. GET /history/packages serves the same data as pre-built monthly bulk files.
8 endpoints on this page. Base URL
@@ -336,6 +336,7 @@
Generated from openapi.yaml by
livetennisapi/openapi. Every endpoint on
diff --git a/docs/push-feed-and-webhooks.html b/docs/push-feed-and-webhooks.html
index adce71e..4f57ce5 100644
--- a/docs/push-feed-and-webhooks.html
+++ b/docs/push-feed-and-webhooks.html
@@ -199,10 +199,10 @@
How do you receive tennis data as it happens instead of polling? Two ways, both ULTRA. GET /ws-token mints a short-lived token for the high-fan-out push feed, which streams score and point changes as they are written. POST /webhooks registers an outbound HTTP callback for the same events; GET /webhooks lists your registrations and never returns the signing secret. Webhooks require a direct key, not a marketplace one.
4 endpoints on this page. Base URL
@@ -419,6 +419,7 @@
Generated from openapi.yaml by
livetennisapi/openapi. Every endpoint on
diff --git a/docs/reference.html b/docs/reference.html
index dc2d74b..13f9897 100644
--- a/docs/reference.html
+++ b/docs/reference.html
@@ -202,12 +202,12 @@
diff --git a/docs/shot-level-rally-data.html b/docs/shot-level-rally-data.html
index a1f09bd..8c34a46 100644
--- a/docs/shot-level-rally-data.html
+++ b/docs/shot-level-rally-data.html
@@ -199,10 +199,10 @@
Skip to content
-Live Tennis API DocsGet a free key ↗Explore the documentation
+Live Tennis API DocsGet a free key ↗Explore the documentation
-
Live Tennis API · docs · version 1.13.92
+
Live Tennis API · docs · version 1.13.93
Shot-by-shot tennis rally and charting API
Is there tennis data below the point — shot by shot? Yes, for charted matches. GET /rally/matches lists them and /rally/matches/{rallyMatchId} returns the rally construction; GET /history/matches/{matchId}/rally reaches the same data by our own match id so a live match and its charting share one identifier. GET /charting/players aggregates a player's career at shot level and /charting/matches/{chartingMatchId} returns every stat family for both players in one charted match. All ULTRA.
5 endpoints on this page. Base URL
@@ -298,6 +298,7 @@
diff --git a/docs/tennis-data-vocabulary.html b/docs/tennis-data-vocabulary.html
new file mode 100644
index 0000000..cbe6fe6
--- /dev/null
+++ b/docs/tennis-data-vocabulary.html
@@ -0,0 +1,364 @@
+
+
+
+
+
+Tennis data codes: tiers, rounds, surfaces | Live Tennis API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Skip to content
+Live Tennis API DocsGet a free key ↗Explore the documentation
+
+
+
Live Tennis API · docs · guide
+
Tennis data vocabulary: tiers, rounds, surfaces and results
+
What does each tennis data code mean? This page lists the closed codes the API returns for tournaments, rounds, surfaces, results, rankings and charted shots, with what each one means. It is built from the OpenAPI spec, so each list holds exactly the codes its field can carry.
+
Meanings checked against the spec on . Machine-readable copy: tennis-data-vocabulary.json, MIT licensed, like the spec.
+
+
+
+
How to use these codes
+
Each code on this page is one the API can return. Where a field can be null, null is never one of these codes in disguise. It means the value is not known or does not apply. The match outcome list can grow within v1, so treat a value you do not recognise as unknown. Each code has its own link, so a schema or a column note can point at one meaning. The same table is published as tennis-data-vocabulary.json for code that validates or labels the values.
+
+
Tournament tier
+
The level a tournament was played at in the match's own season, as the tour publishes it. A tournament keeps one id while its level changes between seasons, so the tier is read per season. On a tournament the field carries the current season's level. Null means the level is unknown.
+
Appears in Match.tier, Tournament.tier, GET /tournaments?tier=.
+
Tournament tier codes
Code
Meaning
grand_slam
Grand Slam
atp_finals
ATP Finals
atp_1000
ATP Masters 1000
atp_500
ATP 500
atp_250
ATP 250
next_gen_finals
Next Gen ATP Finals
united_cup
United Cup, every group and stage
davis_cup
Davis Cup, every group and stage
olympics
Olympic tennis event
laver_cup
Laver Cup
wta_finals
WTA Finals
wta_elite_trophy
WTA Elite Trophy, last held in 2023
wta_1000
WTA 1000
wta_500
WTA 500
wta_250
WTA 250
wta_125
WTA 125
bjk_cup
Billie Jean King Cup, every group and stage
challenger_175
ATP Challenger 175
challenger_125
ATP Challenger 125
challenger_100
ATP Challenger 100
challenger_75
ATP Challenger 75
challenger_50
ATP Challenger 50
itf_m15
ITF World Tennis Tour, men's M15
itf_m25
ITF World Tennis Tour, men's M25
itf_w15
ITF World Tennis Tour, women's W15
itf_w25
ITF women's W25, a 2023 category kept as printed that season
itf_w35
ITF World Tennis Tour, women's W35
itf_w40
ITF women's W40, a 2023 category kept as printed that season
itf_w50
ITF World Tennis Tour, women's W50
itf_w60
ITF women's W60, a 2023 category kept as printed that season
itf_w75
ITF World Tennis Tour, women's W75
itf_w80
ITF women's W80, a 2023 category kept as printed that season
itf_w100
ITF World Tennis Tour, women's W100
juniors
Junior events
utr
UTR events
exhibition
Exhibition with no ranking points
+
Tournament category
+
The coarse class of a tournament. It is set only where the catalogues agree on an exact name, and is null otherwise. Read the tier for the level.
+
Appears in Tournament.category.
+
Tournament category codes
Code
Meaning
grand_slam
Grand Slam
masters_1000
Masters 1000
tour_finals
Season-ending tour finals
atp_500
ATP 500
atp_250
ATP 250
wta_1000
WTA 1000
wta_500
WTA 500
wta_250
WTA 250
wta_125
WTA 125
challenger
ATP Challenger, any level
itf
ITF World Tennis Tour, any category
juniors
Junior events
+
Tour
+
The tour a match belongs to. The field and the filter come from one registry, so a match selected with ?tour=X carries X. Exhibitions, team events and mixed events have no public tour name, so their tour is null.
+
Appears in Match.tour, GET /broadcast/live?tour=, GET /players/{playerId}/stats?level=.
+
Tour codes
Code
Meaning
atp
ATP Tour
wta
WTA Tour
challenger
ATP Challenger Tour
itf
ITF World Tennis Tour
juniors
Junior events
+
Round code
+
The round in one controlled vocabulary, shared by live matches and the results archive. It is relative to the draw: a qualifying semi-final also reads SF, so read it together with is_qualifying. Null when the round label is not recognised. Q appears on matches only: the archive's round filter does not accept it.
+
Appears in Match.round_code, Fixture.round_code, GET /history/archive/matches?round=.
+
Round code codes
Code
Meaning
F
Final
SF
Semi-final
QF
Quarter-final
R16
Round of 16
R32
Round of 32
R64
Round of 64
R128
Round of 128
RR
Round robin
BR
Third-place or bronze-medal match
Q
Qualifying round that the label does not number
Q1
First qualifying round
Q2
Second qualifying round
Q3
Third qualifying round
Q4
Fourth qualifying round
ER
Unnumbered round
+
Archive level
+
Level codes used by the results archive, on its level field and its level filter. ITF events carry their category number instead of a letter, for example 15 or 25.
+
Appears in ArchiveMatch.level, GET /history/archive/matches?level=.
+
Archive level codes
Code
Meaning
G
Grand Slam
M
Masters
A
Other tour-level events
F
Season-ending finals
D
Davis Cup
C
Challenger
O
Olympics
+
Court surface
+
The court surface as stated for the event. It is never inferred from the surface a tournament used in other seasons. A Davis Cup, Billie Jean King Cup or Laver Cup match carries the surface of its own tie. The player stats filter also takes indoor, which keeps matches stated as played indoors on any surface.
+
Appears in Match.surface, Tournament.surface, GET /players/{playerId}/stats?surface=.
+
Court surface codes
Code
Meaning
hard
Hard court
clay
Clay court
grass
Grass court
+
Draw
+
Singles or doubles. Null means nothing states which, and is not singles.
+
Appears in Match.draw.
+
Draw codes
Code
Meaning
singles
Singles
doubles
Doubles
+
Match format
+
The number of sets the match is played over.
+
Appears in Match.format.
+
Match format codes
Code
Meaning
BO3
Best of three sets
BO5
Best of five sets
+
Match status
+
Where the match is in its lifecycle.
+
Appears in Match.status.
+
Match status codes
Code
Meaning
upcoming
Scheduled and not yet started
live
In play
completed
Played to a result
cancelled
Not played as scheduled
+
Match outcome
+
How a finished match was settled. Null while a match is upcoming or live.
+
Appears in Match.outcome.
+
Match outcome codes
Code
Meaning
completed
Ran its full course
retired
A player retired during play
walkover
Conceded before a ball was struck
default
A player was defaulted
abandoned
Called off unfinished, with no result awarded
unresolved
Closed unfinished with no result asserted, until a result is confirmed
+
Event status
+
The stated match state, published as written. Null means nothing was stated, not that the match finished normally.
+
Appears in Match.event_status.
+
Event status codes
Code
Meaning
Finished
Stated as finished
Retired
Ended by a retirement
Cancelled
Stated as cancelled
Walk Over
Walkover
Postponed
Stated as postponed
Interrupted
Suspended in play, for example rain, darkness or a medical stop
Unresolved
Closed before a result could be confirmed
+
Fixture status
+
Where a scheduled fixture stands. On a fixture bound to a match it is the match's status in this vocabulary. A walkover, a retirement, a default and a plain cancellation all read cancelled, and the fixture reason says which.
+
Appears in Fixture.status.
+
Fixture status codes
Code
Meaning
scheduled
Scheduled and not yet started
live
In play
finished
Played to a result
cancelled
Ended without being played out, or not played
postponed
Stated as postponed
+
Fixture reason
+
Why a fixture ended without being played out. Null on a scheduled, live or finished fixture, and on a row whose stated status is not one of these.
+
Appears in Fixture.reason.
+
Fixture reason codes
Code
Meaning
walkover
Conceded before a ball was struck
retired
A player retired during play
cancelled
A plain cancellation
default
A player was defaulted
postponed
Stated as postponed
+
Match event type
+
The timeline of a match. Medical timeouts, trainer calls and toilet breaks are stated by the scorer or chair umpire. The player field names the player where one is stated and is null otherwise.
+
Appears in Event.type, GET /matches/{matchId}/events, GET /events.
+
Match event type codes
Code
Meaning
break
A break of serve
set_won
A set won
game_won
A game won
momentum_run
A momentum run
stoppage_start
Play stopped
stoppage_end
Play resumed after a stoppage
pause_start
A pause began
pause_end
A pause ended
medical_timeout_start
A medical timeout began
medical_timeout_end
A medical timeout ended
trainer_called
The trainer was called
trainer_called_end
The trainer visit ended
toilet_break_start
A toilet break began
toilet_break_end
A toilet break ended
+
Ranking system
+
The ranking a row belongs to. Elo keeps four independent ladders, named by the surface field: all surfaces together, hard, clay and grass. ATP and WTA Elo are separate and never combined.
+
Appears in RankingRecord.system, GET /rankings?system=.
+
Ranking system codes
Code
Meaning
atp
ATP singles ranking
wta
WTA singles ranking
itf_jt
ITF junior ranking
itf_mt
ITF men's World Tennis Tour ranking
itf_wt
ITF women's World Tennis Tour ranking
utr
UTR rating
elo
Elo rating, by surface ladder
atp_doubles
ATP doubles ranking
wta_doubles
WTA doubles ranking
+
Elo surface ladder
+
Which of the four independent Elo ladders a rating belongs to. It is set on elo rows only and absent on every other system. A ladder the player has never played is left out of the response, not filled from another ladder.
+
Appears in RankingRecord.surface, GET /rankings?surface=.
+
Elo surface ladder codes
Code
Meaning
overall
All surfaces together
hard
Hard-court ladder
clay
Clay-court ladder
grass
Grass-court ladder
+
Point outcome
+
How a point ended, as stated for that point in the point-by-point history.
+
Appears in HistoryTapeRow.outcome.
+
Point outcome codes
Code
Meaning
ace
Ace
double_fault
Double fault
winner
Winner
forced_error
Forced error
unforced_error
Unforced error
+
Charted point outcome
+
How a charted point ended in the shot-level data.
+
Appears in RallyPoint.outcome.
+
Charted point outcome codes
Code
Meaning
winner
Winner
forced_error
Forced error
unforced_error
Unforced error
error
A miss charted without saying whether it was forced
other
Any other ending
+
Unreturned serve
+
How a serve went unreturned. Null when the return was in play.
+
Appears in RallyPoint.unreturned_kind.
+
Unreturned serve codes
Code
Meaning
ace
Ace
serve_winner
Serve winner charted without a direction, counted with aces
serve_forced_error
The serve forced a return error
return_forced_error
Forced return error
return_unforced_error
Unforced return error
return_error
Missed return, not charted as forced or unforced
+
Stroke
+
The kind of shot in charted rally data.
+
Appears in RallyShot.stroke.
+
Stroke codes
Code
Meaning
serve
Serve
groundstroke
Groundstroke
slice
Slice
volley
Volley
half_volley
Half volley
swinging_volley
Swinging volley
overhead
Overhead
drop_shot
Drop shot
lob
Lob
trick
Trick shot
unknown
Shot type not recorded
+
Wing
+
The side a shot was struck from.
+
Appears in RallyShot.wing.
+
Wing codes
Code
Meaning
forehand
Forehand
backhand
Backhand
+
Shot direction
+
Where the ball was sent.
+
Appears in RallyShot.direction.
+
Shot direction codes
Code
Meaning
forehand_side
To the forehand side
middle
Through the middle
backhand_side
To the backhand side
+
Shot depth
+
How deep the ball landed.
+
Appears in RallyShot.depth.
+
Shot depth codes
Code
Meaning
shallow
Shallow
mid
Mid-court
deep
Deep
+
Court position
+
Where the player stood to strike the shot. Null when it was not charted.
+
+
+
+
diff --git a/docs/tennis-data-vocabulary.json b/docs/tennis-data-vocabulary.json
new file mode 100644
index 0000000..7cfd2fc
--- /dev/null
+++ b/docs/tennis-data-vocabulary.json
@@ -0,0 +1,1189 @@
+{
+ "name": "Live Tennis API tennis data vocabulary",
+ "description": "The closed codes the Live Tennis API returns for tournaments, rounds, surfaces, results, rankings and charted shots, with their meanings.",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.json",
+ "page": "https://docs.livetennisapi.com/tennis-data-vocabulary.html",
+ "spec_version": "1.13.93",
+ "license": "MIT, https://github.com/livetennisapi/openapi/blob/main/LICENSE",
+ "attribution": "Live Tennis API, https://livetennisapi.com",
+ "vocabularies": [
+ {
+ "id": "tier",
+ "title": "Tournament tier",
+ "fields": [
+ "Match.tier",
+ "Tournament.tier",
+ "GET /tournaments?tier="
+ ],
+ "about": "The level a tournament was played at in the match's own season, as the tour publishes it. A tournament keeps one id while its level changes between seasons, so the tier is read per season. On a tournament the field carries the current season's level. Null means the level is unknown.",
+ "values": [
+ {
+ "code": "grand_slam",
+ "meaning": "Grand Slam",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-grand_slam"
+ },
+ {
+ "code": "atp_finals",
+ "meaning": "ATP Finals",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-atp_finals"
+ },
+ {
+ "code": "atp_1000",
+ "meaning": "ATP Masters 1000",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-atp_1000"
+ },
+ {
+ "code": "atp_500",
+ "meaning": "ATP 500",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-atp_500"
+ },
+ {
+ "code": "atp_250",
+ "meaning": "ATP 250",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-atp_250"
+ },
+ {
+ "code": "next_gen_finals",
+ "meaning": "Next Gen ATP Finals",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-next_gen_finals"
+ },
+ {
+ "code": "united_cup",
+ "meaning": "United Cup, every group and stage",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-united_cup"
+ },
+ {
+ "code": "davis_cup",
+ "meaning": "Davis Cup, every group and stage",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-davis_cup"
+ },
+ {
+ "code": "olympics",
+ "meaning": "Olympic tennis event",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-olympics"
+ },
+ {
+ "code": "laver_cup",
+ "meaning": "Laver Cup",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-laver_cup"
+ },
+ {
+ "code": "wta_finals",
+ "meaning": "WTA Finals",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-wta_finals"
+ },
+ {
+ "code": "wta_elite_trophy",
+ "meaning": "WTA Elite Trophy, last held in 2023",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-wta_elite_trophy"
+ },
+ {
+ "code": "wta_1000",
+ "meaning": "WTA 1000",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-wta_1000"
+ },
+ {
+ "code": "wta_500",
+ "meaning": "WTA 500",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-wta_500"
+ },
+ {
+ "code": "wta_250",
+ "meaning": "WTA 250",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-wta_250"
+ },
+ {
+ "code": "wta_125",
+ "meaning": "WTA 125",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-wta_125"
+ },
+ {
+ "code": "bjk_cup",
+ "meaning": "Billie Jean King Cup, every group and stage",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-bjk_cup"
+ },
+ {
+ "code": "challenger_175",
+ "meaning": "ATP Challenger 175",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-challenger_175"
+ },
+ {
+ "code": "challenger_125",
+ "meaning": "ATP Challenger 125",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-challenger_125"
+ },
+ {
+ "code": "challenger_100",
+ "meaning": "ATP Challenger 100",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-challenger_100"
+ },
+ {
+ "code": "challenger_75",
+ "meaning": "ATP Challenger 75",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-challenger_75"
+ },
+ {
+ "code": "challenger_50",
+ "meaning": "ATP Challenger 50",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-challenger_50"
+ },
+ {
+ "code": "itf_m15",
+ "meaning": "ITF World Tennis Tour, men's M15",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_m15"
+ },
+ {
+ "code": "itf_m25",
+ "meaning": "ITF World Tennis Tour, men's M25",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_m25"
+ },
+ {
+ "code": "itf_w15",
+ "meaning": "ITF World Tennis Tour, women's W15",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_w15"
+ },
+ {
+ "code": "itf_w25",
+ "meaning": "ITF women's W25, a 2023 category kept as printed that season",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_w25"
+ },
+ {
+ "code": "itf_w35",
+ "meaning": "ITF World Tennis Tour, women's W35",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_w35"
+ },
+ {
+ "code": "itf_w40",
+ "meaning": "ITF women's W40, a 2023 category kept as printed that season",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_w40"
+ },
+ {
+ "code": "itf_w50",
+ "meaning": "ITF World Tennis Tour, women's W50",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_w50"
+ },
+ {
+ "code": "itf_w60",
+ "meaning": "ITF women's W60, a 2023 category kept as printed that season",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_w60"
+ },
+ {
+ "code": "itf_w75",
+ "meaning": "ITF World Tennis Tour, women's W75",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_w75"
+ },
+ {
+ "code": "itf_w80",
+ "meaning": "ITF women's W80, a 2023 category kept as printed that season",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_w80"
+ },
+ {
+ "code": "itf_w100",
+ "meaning": "ITF World Tennis Tour, women's W100",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-itf_w100"
+ },
+ {
+ "code": "juniors",
+ "meaning": "Junior events",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-juniors"
+ },
+ {
+ "code": "utr",
+ "meaning": "UTR events",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-utr"
+ },
+ {
+ "code": "exhibition",
+ "meaning": "Exhibition with no ranking points",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tier-exhibition"
+ }
+ ]
+ },
+ {
+ "id": "category",
+ "title": "Tournament category",
+ "fields": [
+ "Tournament.category"
+ ],
+ "about": "The coarse class of a tournament. It is set only where the catalogues agree on an exact name, and is null otherwise. Read the tier for the level.",
+ "values": [
+ {
+ "code": "grand_slam",
+ "meaning": "Grand Slam",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-grand_slam"
+ },
+ {
+ "code": "masters_1000",
+ "meaning": "Masters 1000",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-masters_1000"
+ },
+ {
+ "code": "tour_finals",
+ "meaning": "Season-ending tour finals",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-tour_finals"
+ },
+ {
+ "code": "atp_500",
+ "meaning": "ATP 500",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-atp_500"
+ },
+ {
+ "code": "atp_250",
+ "meaning": "ATP 250",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-atp_250"
+ },
+ {
+ "code": "wta_1000",
+ "meaning": "WTA 1000",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-wta_1000"
+ },
+ {
+ "code": "wta_500",
+ "meaning": "WTA 500",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-wta_500"
+ },
+ {
+ "code": "wta_250",
+ "meaning": "WTA 250",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-wta_250"
+ },
+ {
+ "code": "wta_125",
+ "meaning": "WTA 125",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-wta_125"
+ },
+ {
+ "code": "challenger",
+ "meaning": "ATP Challenger, any level",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-challenger"
+ },
+ {
+ "code": "itf",
+ "meaning": "ITF World Tennis Tour, any category",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-itf"
+ },
+ {
+ "code": "juniors",
+ "meaning": "Junior events",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#category-juniors"
+ }
+ ]
+ },
+ {
+ "id": "tour",
+ "title": "Tour",
+ "fields": [
+ "Match.tour",
+ "GET /broadcast/live?tour=",
+ "GET /players/{playerId}/stats?level="
+ ],
+ "about": "The tour a match belongs to. The field and the filter come from one registry, so a match selected with ?tour=X carries X. Exhibitions, team events and mixed events have no public tour name, so their tour is null.",
+ "values": [
+ {
+ "code": "atp",
+ "meaning": "ATP Tour",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tour-atp"
+ },
+ {
+ "code": "wta",
+ "meaning": "WTA Tour",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tour-wta"
+ },
+ {
+ "code": "challenger",
+ "meaning": "ATP Challenger Tour",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tour-challenger"
+ },
+ {
+ "code": "itf",
+ "meaning": "ITF World Tennis Tour",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tour-itf"
+ },
+ {
+ "code": "juniors",
+ "meaning": "Junior events",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#tour-juniors"
+ }
+ ]
+ },
+ {
+ "id": "round",
+ "title": "Round code",
+ "fields": [
+ "Match.round_code",
+ "Fixture.round_code",
+ "GET /history/archive/matches?round="
+ ],
+ "about": "The round in one controlled vocabulary, shared by live matches and the results archive. It is relative to the draw: a qualifying semi-final also reads SF, so read it together with is_qualifying. Null when the round label is not recognised. Q appears on matches only: the archive's round filter does not accept it.",
+ "values": [
+ {
+ "code": "F",
+ "meaning": "Final",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-f"
+ },
+ {
+ "code": "SF",
+ "meaning": "Semi-final",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-sf"
+ },
+ {
+ "code": "QF",
+ "meaning": "Quarter-final",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-qf"
+ },
+ {
+ "code": "R16",
+ "meaning": "Round of 16",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-r16"
+ },
+ {
+ "code": "R32",
+ "meaning": "Round of 32",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-r32"
+ },
+ {
+ "code": "R64",
+ "meaning": "Round of 64",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-r64"
+ },
+ {
+ "code": "R128",
+ "meaning": "Round of 128",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-r128"
+ },
+ {
+ "code": "RR",
+ "meaning": "Round robin",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-rr"
+ },
+ {
+ "code": "BR",
+ "meaning": "Third-place or bronze-medal match",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-br"
+ },
+ {
+ "code": "Q",
+ "meaning": "Qualifying round that the label does not number",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-q"
+ },
+ {
+ "code": "Q1",
+ "meaning": "First qualifying round",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-q1"
+ },
+ {
+ "code": "Q2",
+ "meaning": "Second qualifying round",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-q2"
+ },
+ {
+ "code": "Q3",
+ "meaning": "Third qualifying round",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-q3"
+ },
+ {
+ "code": "Q4",
+ "meaning": "Fourth qualifying round",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-q4"
+ },
+ {
+ "code": "ER",
+ "meaning": "Unnumbered round",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#round-er"
+ }
+ ]
+ },
+ {
+ "id": "archive-level",
+ "title": "Archive level",
+ "fields": [
+ "ArchiveMatch.level",
+ "GET /history/archive/matches?level="
+ ],
+ "about": "Level codes used by the results archive, on its level field and its level filter. ITF events carry their category number instead of a letter, for example 15 or 25.",
+ "values": [
+ {
+ "code": "G",
+ "meaning": "Grand Slam",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#archive-level-g"
+ },
+ {
+ "code": "M",
+ "meaning": "Masters",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#archive-level-m"
+ },
+ {
+ "code": "A",
+ "meaning": "Other tour-level events",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#archive-level-a"
+ },
+ {
+ "code": "F",
+ "meaning": "Season-ending finals",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#archive-level-f"
+ },
+ {
+ "code": "D",
+ "meaning": "Davis Cup",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#archive-level-d"
+ },
+ {
+ "code": "C",
+ "meaning": "Challenger",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#archive-level-c"
+ },
+ {
+ "code": "O",
+ "meaning": "Olympics",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#archive-level-o"
+ }
+ ]
+ },
+ {
+ "id": "surface",
+ "title": "Court surface",
+ "fields": [
+ "Match.surface",
+ "Tournament.surface",
+ "GET /players/{playerId}/stats?surface="
+ ],
+ "about": "The court surface as stated for the event. It is never inferred from the surface a tournament used in other seasons. A Davis Cup, Billie Jean King Cup or Laver Cup match carries the surface of its own tie. The player stats filter also takes indoor, which keeps matches stated as played indoors on any surface.",
+ "values": [
+ {
+ "code": "hard",
+ "meaning": "Hard court",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#surface-hard"
+ },
+ {
+ "code": "clay",
+ "meaning": "Clay court",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#surface-clay"
+ },
+ {
+ "code": "grass",
+ "meaning": "Grass court",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#surface-grass"
+ }
+ ]
+ },
+ {
+ "id": "draw",
+ "title": "Draw",
+ "fields": [
+ "Match.draw"
+ ],
+ "about": "Singles or doubles. Null means nothing states which, and is not singles.",
+ "values": [
+ {
+ "code": "singles",
+ "meaning": "Singles",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#draw-singles"
+ },
+ {
+ "code": "doubles",
+ "meaning": "Doubles",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#draw-doubles"
+ }
+ ]
+ },
+ {
+ "id": "format",
+ "title": "Match format",
+ "fields": [
+ "Match.format"
+ ],
+ "about": "The number of sets the match is played over.",
+ "values": [
+ {
+ "code": "BO3",
+ "meaning": "Best of three sets",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#format-bo3"
+ },
+ {
+ "code": "BO5",
+ "meaning": "Best of five sets",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#format-bo5"
+ }
+ ]
+ },
+ {
+ "id": "status",
+ "title": "Match status",
+ "fields": [
+ "Match.status"
+ ],
+ "about": "Where the match is in its lifecycle.",
+ "values": [
+ {
+ "code": "upcoming",
+ "meaning": "Scheduled and not yet started",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#status-upcoming"
+ },
+ {
+ "code": "live",
+ "meaning": "In play",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#status-live"
+ },
+ {
+ "code": "completed",
+ "meaning": "Played to a result",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#status-completed"
+ },
+ {
+ "code": "cancelled",
+ "meaning": "Not played as scheduled",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#status-cancelled"
+ }
+ ]
+ },
+ {
+ "id": "outcome",
+ "title": "Match outcome",
+ "fields": [
+ "Match.outcome"
+ ],
+ "about": "How a finished match was settled. Null while a match is upcoming or live.",
+ "values": [
+ {
+ "code": "completed",
+ "meaning": "Ran its full course",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#outcome-completed"
+ },
+ {
+ "code": "retired",
+ "meaning": "A player retired during play",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#outcome-retired"
+ },
+ {
+ "code": "walkover",
+ "meaning": "Conceded before a ball was struck",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#outcome-walkover"
+ },
+ {
+ "code": "default",
+ "meaning": "A player was defaulted",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#outcome-default"
+ },
+ {
+ "code": "abandoned",
+ "meaning": "Called off unfinished, with no result awarded",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#outcome-abandoned"
+ },
+ {
+ "code": "unresolved",
+ "meaning": "Closed unfinished with no result asserted, until a result is confirmed",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#outcome-unresolved"
+ }
+ ]
+ },
+ {
+ "id": "event-status",
+ "title": "Event status",
+ "fields": [
+ "Match.event_status"
+ ],
+ "about": "The stated match state, published as written. Null means nothing was stated, not that the match finished normally.",
+ "values": [
+ {
+ "code": "Finished",
+ "meaning": "Stated as finished",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#event-status-finished"
+ },
+ {
+ "code": "Retired",
+ "meaning": "Ended by a retirement",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#event-status-retired"
+ },
+ {
+ "code": "Cancelled",
+ "meaning": "Stated as cancelled",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#event-status-cancelled"
+ },
+ {
+ "code": "Walk Over",
+ "meaning": "Walkover",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#event-status-walk-over"
+ },
+ {
+ "code": "Postponed",
+ "meaning": "Stated as postponed",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#event-status-postponed"
+ },
+ {
+ "code": "Interrupted",
+ "meaning": "Suspended in play, for example rain, darkness or a medical stop",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#event-status-interrupted"
+ },
+ {
+ "code": "Unresolved",
+ "meaning": "Closed before a result could be confirmed",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#event-status-unresolved"
+ }
+ ]
+ },
+ {
+ "id": "fixture-status",
+ "title": "Fixture status",
+ "fields": [
+ "Fixture.status"
+ ],
+ "about": "Where a scheduled fixture stands. On a fixture bound to a match it is the match's status in this vocabulary. A walkover, a retirement, a default and a plain cancellation all read cancelled, and the fixture reason says which.",
+ "values": [
+ {
+ "code": "scheduled",
+ "meaning": "Scheduled and not yet started",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-status-scheduled"
+ },
+ {
+ "code": "live",
+ "meaning": "In play",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-status-live"
+ },
+ {
+ "code": "finished",
+ "meaning": "Played to a result",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-status-finished"
+ },
+ {
+ "code": "cancelled",
+ "meaning": "Ended without being played out, or not played",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-status-cancelled"
+ },
+ {
+ "code": "postponed",
+ "meaning": "Stated as postponed",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-status-postponed"
+ }
+ ]
+ },
+ {
+ "id": "fixture-reason",
+ "title": "Fixture reason",
+ "fields": [
+ "Fixture.reason"
+ ],
+ "about": "Why a fixture ended without being played out. Null on a scheduled, live or finished fixture, and on a row whose stated status is not one of these.",
+ "values": [
+ {
+ "code": "walkover",
+ "meaning": "Conceded before a ball was struck",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-reason-walkover"
+ },
+ {
+ "code": "retired",
+ "meaning": "A player retired during play",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-reason-retired"
+ },
+ {
+ "code": "cancelled",
+ "meaning": "A plain cancellation",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-reason-cancelled"
+ },
+ {
+ "code": "default",
+ "meaning": "A player was defaulted",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-reason-default"
+ },
+ {
+ "code": "postponed",
+ "meaning": "Stated as postponed",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#fixture-reason-postponed"
+ }
+ ]
+ },
+ {
+ "id": "match-event",
+ "title": "Match event type",
+ "fields": [
+ "Event.type",
+ "GET /matches/{matchId}/events",
+ "GET /events"
+ ],
+ "about": "The timeline of a match. Medical timeouts, trainer calls and toilet breaks are stated by the scorer or chair umpire. The player field names the player where one is stated and is null otherwise.",
+ "values": [
+ {
+ "code": "break",
+ "meaning": "A break of serve",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-break"
+ },
+ {
+ "code": "set_won",
+ "meaning": "A set won",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-set_won"
+ },
+ {
+ "code": "game_won",
+ "meaning": "A game won",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-game_won"
+ },
+ {
+ "code": "momentum_run",
+ "meaning": "A momentum run",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-momentum_run"
+ },
+ {
+ "code": "stoppage_start",
+ "meaning": "Play stopped",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-stoppage_start"
+ },
+ {
+ "code": "stoppage_end",
+ "meaning": "Play resumed after a stoppage",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-stoppage_end"
+ },
+ {
+ "code": "pause_start",
+ "meaning": "A pause began",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-pause_start"
+ },
+ {
+ "code": "pause_end",
+ "meaning": "A pause ended",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-pause_end"
+ },
+ {
+ "code": "medical_timeout_start",
+ "meaning": "A medical timeout began",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-medical_timeout_start"
+ },
+ {
+ "code": "medical_timeout_end",
+ "meaning": "A medical timeout ended",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-medical_timeout_end"
+ },
+ {
+ "code": "trainer_called",
+ "meaning": "The trainer was called",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-trainer_called"
+ },
+ {
+ "code": "trainer_called_end",
+ "meaning": "The trainer visit ended",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-trainer_called_end"
+ },
+ {
+ "code": "toilet_break_start",
+ "meaning": "A toilet break began",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-toilet_break_start"
+ },
+ {
+ "code": "toilet_break_end",
+ "meaning": "A toilet break ended",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#match-event-toilet_break_end"
+ }
+ ]
+ },
+ {
+ "id": "ranking-system",
+ "title": "Ranking system",
+ "fields": [
+ "RankingRecord.system",
+ "GET /rankings?system="
+ ],
+ "about": "The ranking a row belongs to. Elo keeps four independent ladders, named by the surface field: all surfaces together, hard, clay and grass. ATP and WTA Elo are separate and never combined.",
+ "values": [
+ {
+ "code": "atp",
+ "meaning": "ATP singles ranking",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#ranking-system-atp"
+ },
+ {
+ "code": "wta",
+ "meaning": "WTA singles ranking",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#ranking-system-wta"
+ },
+ {
+ "code": "itf_jt",
+ "meaning": "ITF junior ranking",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#ranking-system-itf_jt"
+ },
+ {
+ "code": "itf_mt",
+ "meaning": "ITF men's World Tennis Tour ranking",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#ranking-system-itf_mt"
+ },
+ {
+ "code": "itf_wt",
+ "meaning": "ITF women's World Tennis Tour ranking",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#ranking-system-itf_wt"
+ },
+ {
+ "code": "utr",
+ "meaning": "UTR rating",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#ranking-system-utr"
+ },
+ {
+ "code": "elo",
+ "meaning": "Elo rating, by surface ladder",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#ranking-system-elo"
+ },
+ {
+ "code": "atp_doubles",
+ "meaning": "ATP doubles ranking",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#ranking-system-atp_doubles"
+ },
+ {
+ "code": "wta_doubles",
+ "meaning": "WTA doubles ranking",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#ranking-system-wta_doubles"
+ }
+ ]
+ },
+ {
+ "id": "elo-surface",
+ "title": "Elo surface ladder",
+ "fields": [
+ "RankingRecord.surface",
+ "GET /rankings?surface="
+ ],
+ "about": "Which of the four independent Elo ladders a rating belongs to. It is set on elo rows only and absent on every other system. A ladder the player has never played is left out of the response, not filled from another ladder.",
+ "values": [
+ {
+ "code": "overall",
+ "meaning": "All surfaces together",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#elo-surface-overall"
+ },
+ {
+ "code": "hard",
+ "meaning": "Hard-court ladder",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#elo-surface-hard"
+ },
+ {
+ "code": "clay",
+ "meaning": "Clay-court ladder",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#elo-surface-clay"
+ },
+ {
+ "code": "grass",
+ "meaning": "Grass-court ladder",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#elo-surface-grass"
+ }
+ ]
+ },
+ {
+ "id": "point-outcome",
+ "title": "Point outcome",
+ "fields": [
+ "HistoryTapeRow.outcome"
+ ],
+ "about": "How a point ended, as stated for that point in the point-by-point history.",
+ "values": [
+ {
+ "code": "ace",
+ "meaning": "Ace",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#point-outcome-ace"
+ },
+ {
+ "code": "double_fault",
+ "meaning": "Double fault",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#point-outcome-double_fault"
+ },
+ {
+ "code": "winner",
+ "meaning": "Winner",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#point-outcome-winner"
+ },
+ {
+ "code": "forced_error",
+ "meaning": "Forced error",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#point-outcome-forced_error"
+ },
+ {
+ "code": "unforced_error",
+ "meaning": "Unforced error",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#point-outcome-unforced_error"
+ }
+ ]
+ },
+ {
+ "id": "rally-outcome",
+ "title": "Charted point outcome",
+ "fields": [
+ "RallyPoint.outcome"
+ ],
+ "about": "How a charted point ended in the shot-level data.",
+ "values": [
+ {
+ "code": "winner",
+ "meaning": "Winner",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#rally-outcome-winner"
+ },
+ {
+ "code": "forced_error",
+ "meaning": "Forced error",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#rally-outcome-forced_error"
+ },
+ {
+ "code": "unforced_error",
+ "meaning": "Unforced error",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#rally-outcome-unforced_error"
+ },
+ {
+ "code": "error",
+ "meaning": "A miss charted without saying whether it was forced",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#rally-outcome-error"
+ },
+ {
+ "code": "other",
+ "meaning": "Any other ending",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#rally-outcome-other"
+ }
+ ]
+ },
+ {
+ "id": "unreturned",
+ "title": "Unreturned serve",
+ "fields": [
+ "RallyPoint.unreturned_kind"
+ ],
+ "about": "How a serve went unreturned. Null when the return was in play.",
+ "values": [
+ {
+ "code": "ace",
+ "meaning": "Ace",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#unreturned-ace"
+ },
+ {
+ "code": "serve_winner",
+ "meaning": "Serve winner charted without a direction, counted with aces",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#unreturned-serve_winner"
+ },
+ {
+ "code": "serve_forced_error",
+ "meaning": "The serve forced a return error",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#unreturned-serve_forced_error"
+ },
+ {
+ "code": "return_forced_error",
+ "meaning": "Forced return error",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#unreturned-return_forced_error"
+ },
+ {
+ "code": "return_unforced_error",
+ "meaning": "Unforced return error",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#unreturned-return_unforced_error"
+ },
+ {
+ "code": "return_error",
+ "meaning": "Missed return, not charted as forced or unforced",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#unreturned-return_error"
+ }
+ ]
+ },
+ {
+ "id": "stroke",
+ "title": "Stroke",
+ "fields": [
+ "RallyShot.stroke"
+ ],
+ "about": "The kind of shot in charted rally data.",
+ "values": [
+ {
+ "code": "serve",
+ "meaning": "Serve",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-serve"
+ },
+ {
+ "code": "groundstroke",
+ "meaning": "Groundstroke",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-groundstroke"
+ },
+ {
+ "code": "slice",
+ "meaning": "Slice",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-slice"
+ },
+ {
+ "code": "volley",
+ "meaning": "Volley",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-volley"
+ },
+ {
+ "code": "half_volley",
+ "meaning": "Half volley",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-half_volley"
+ },
+ {
+ "code": "swinging_volley",
+ "meaning": "Swinging volley",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-swinging_volley"
+ },
+ {
+ "code": "overhead",
+ "meaning": "Overhead",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-overhead"
+ },
+ {
+ "code": "drop_shot",
+ "meaning": "Drop shot",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-drop_shot"
+ },
+ {
+ "code": "lob",
+ "meaning": "Lob",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-lob"
+ },
+ {
+ "code": "trick",
+ "meaning": "Trick shot",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-trick"
+ },
+ {
+ "code": "unknown",
+ "meaning": "Shot type not recorded",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#stroke-unknown"
+ }
+ ]
+ },
+ {
+ "id": "wing",
+ "title": "Wing",
+ "fields": [
+ "RallyShot.wing"
+ ],
+ "about": "The side a shot was struck from.",
+ "values": [
+ {
+ "code": "forehand",
+ "meaning": "Forehand",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#wing-forehand"
+ },
+ {
+ "code": "backhand",
+ "meaning": "Backhand",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#wing-backhand"
+ }
+ ]
+ },
+ {
+ "id": "direction",
+ "title": "Shot direction",
+ "fields": [
+ "RallyShot.direction"
+ ],
+ "about": "Where the ball was sent.",
+ "values": [
+ {
+ "code": "forehand_side",
+ "meaning": "To the forehand side",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#direction-forehand_side"
+ },
+ {
+ "code": "middle",
+ "meaning": "Through the middle",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#direction-middle"
+ },
+ {
+ "code": "backhand_side",
+ "meaning": "To the backhand side",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#direction-backhand_side"
+ }
+ ]
+ },
+ {
+ "id": "depth",
+ "title": "Shot depth",
+ "fields": [
+ "RallyShot.depth"
+ ],
+ "about": "How deep the ball landed.",
+ "values": [
+ {
+ "code": "shallow",
+ "meaning": "Shallow",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#depth-shallow"
+ },
+ {
+ "code": "mid",
+ "meaning": "Mid-court",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#depth-mid"
+ },
+ {
+ "code": "deep",
+ "meaning": "Deep",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#depth-deep"
+ }
+ ]
+ },
+ {
+ "id": "shot-position",
+ "title": "Court position",
+ "fields": [
+ "RallyShot.position"
+ ],
+ "about": "Where the player stood to strike the shot. Null when it was not charted.",
+ "values": [
+ {
+ "code": "approaching",
+ "meaning": "Coming forward to the net",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#shot-position-approaching"
+ },
+ {
+ "code": "at_net",
+ "meaning": "At the net",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#shot-position-at_net"
+ },
+ {
+ "code": "baseline",
+ "meaning": "At the baseline",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#shot-position-baseline"
+ }
+ ]
+ },
+ {
+ "id": "serve-direction",
+ "title": "Serve direction",
+ "fields": [
+ "RallyPoint.serve_direction"
+ ],
+ "about": "Where the serve was aimed.",
+ "values": [
+ {
+ "code": "wide",
+ "meaning": "Out wide",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#serve-direction-wide"
+ },
+ {
+ "code": "body",
+ "meaning": "At the body",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#serve-direction-body"
+ },
+ {
+ "code": "down_the_t",
+ "meaning": "Down the T",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#serve-direction-down_the_t"
+ }
+ ]
+ },
+ {
+ "id": "error-location",
+ "title": "Error location",
+ "fields": [
+ "RallyPoint.error_location"
+ ],
+ "about": "Where a missed shot went.",
+ "values": [
+ {
+ "code": "net",
+ "meaning": "Into the net",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#error-location-net"
+ },
+ {
+ "code": "wide",
+ "meaning": "Wide",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#error-location-wide"
+ },
+ {
+ "code": "deep",
+ "meaning": "Long",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#error-location-deep"
+ },
+ {
+ "code": "wide_and_deep",
+ "meaning": "Wide and long",
+ "url": "https://docs.livetennisapi.com/tennis-data-vocabulary.html#error-location-wide_and_deep"
+ }
+ ]
+ }
+ ]
+}
diff --git a/docs/tennis-odds.html b/docs/tennis-odds.html
index b8aed69..7839b28 100644
--- a/docs/tennis-odds.html
+++ b/docs/tennis-odds.html
@@ -199,10 +199,10 @@
Skip to content
-Live Tennis API DocsGet a free key ↗Explore the documentation
+Live Tennis API DocsGet a free key ↗Explore the documentation
-
Live Tennis API · docs · version 1.13.92
+
Live Tennis API · docs · version 1.13.93
Tennis odds API — markets and price ticks
How do you read tennis match-winner odds and their price history?GET /markets returns the match-winner market for a match and GET /markets/{matchId}/prices the recent price ticks per side, newest first; GET /matches/{matchId}/prices is the same ticks addressed by match id. All three are PRO. Every tick carries its own timestamp, so a series can be reconstructed rather than inferred from poll times.
3 endpoints on this page. Base URL
@@ -290,6 +290,7 @@
Generated from openapi.yaml by
livetennisapi/openapi. Every endpoint on
diff --git a/openapi.yaml b/openapi.yaml
index e642324..aeaead0 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: Live Tennis API
- version: "1.13.92"
+ version: "1.13.93"
contact:
name: Live Tennis API
url: https://livetennisapi.com
diff --git a/scripts/build_reference.py b/scripts/build_reference.py
index 2bb523f..f8c4967 100644
--- a/scripts/build_reference.py
+++ b/scripts/build_reference.py
@@ -4298,6 +4298,528 @@ def _sportsml_body(spec: dict[str, Any]) -> str:
"""
+# ------------------------------------------------------------------ vocabulary -----------------
+# One page and one JSON file that list the closed codes the API returns for tournaments, rounds,
+# surfaces, results, rankings and shots, with what each code means. The codes are read from openapi.yaml at
+# build time and every code must have a label below, so a new code in the spec fails the build
+# until it is described here. The page and the JSON are written from the same table.
+VOCAB_SLUG = "tennis-data-vocabulary"
+VOCAB_JSON = "tennis-data-vocabulary.json"
+# The day the meanings below were last checked against the spec's own field descriptions.
+VOCAB_CHECKED = "2026-11-26"
+
+
+def _schema_enum(spec: dict[str, Any], schema: str, *path: str) -> list[str]:
+ node: Any = spec["components"]["schemas"][schema]
+ for key in path:
+ node = node["properties"][key] if key != "[]" else node["items"]
+ return [str(v) for v in node["enum"] if v is not None]
+
+
+def _archive_level_codes(spec: dict[str, Any]) -> list[str]:
+ """The letter codes the archive's ?level= parameter describes. The parameter has no enum, so
+ the codes are read from its description: a new code there fails the build until it has a
+ meaning below, the same as every enum."""
+ for prm in spec["paths"]["/history/archive/matches"]["get"].get("parameters", []):
+ if isinstance(prm, dict) and prm.get("name") == "level":
+ codes = re.findall(r"\b([A-Z])=", prm.get("description", ""))
+ if not codes:
+ raise SystemExit("vocabulary: no level codes found in /history/archive/matches?level=")
+ return codes
+ raise SystemExit("vocabulary: /history/archive/matches has no level parameter")
+
+
+def _param_enum(spec: dict[str, Any], route: str, name: str) -> list[str]:
+ for prm in spec["paths"][route]["get"].get("parameters", []):
+ if isinstance(prm, dict) and prm.get("name") == name:
+ return [str(v) for v in prm["schema"]["enum"]]
+ raise SystemExit(f"vocabulary: {route} has no parameter {name}")
+
+
+# (id, title, where it appears, how to read it, reader for the codes, {code: meaning}).
+# Meanings restate the spec's own definitions; nothing here adds a fact the spec does not hold.
+VOCABULARIES: list[dict[str, Any]] = [
+ {
+ "id": "tier",
+ "title": "Tournament tier",
+ "fields": ["Match.tier", "Tournament.tier", "GET /tournaments?tier="],
+ "about": ("The level a tournament was played at in the match's own season, as the tour "
+ "publishes it. A tournament keeps one id while its level changes between seasons, "
+ "so the tier is read per season. On a tournament the field carries the current "
+ "season's level. Null means the level is unknown."),
+ "codes": lambda s: _schema_enum(s, "Match", "tier"),
+ "labels": {
+ "grand_slam": "Grand Slam",
+ "atp_finals": "ATP Finals",
+ "atp_1000": "ATP Masters 1000",
+ "atp_500": "ATP 500",
+ "atp_250": "ATP 250",
+ "next_gen_finals": "Next Gen ATP Finals",
+ "united_cup": "United Cup, every group and stage",
+ "davis_cup": "Davis Cup, every group and stage",
+ "olympics": "Olympic tennis event",
+ "laver_cup": "Laver Cup",
+ "wta_finals": "WTA Finals",
+ "wta_elite_trophy": "WTA Elite Trophy, last held in 2023",
+ "wta_1000": "WTA 1000",
+ "wta_500": "WTA 500",
+ "wta_250": "WTA 250",
+ "wta_125": "WTA 125",
+ "bjk_cup": "Billie Jean King Cup, every group and stage",
+ "challenger_175": "ATP Challenger 175",
+ "challenger_125": "ATP Challenger 125",
+ "challenger_100": "ATP Challenger 100",
+ "challenger_75": "ATP Challenger 75",
+ "challenger_50": "ATP Challenger 50",
+ "itf_m15": "ITF World Tennis Tour, men's M15",
+ "itf_m25": "ITF World Tennis Tour, men's M25",
+ "itf_w15": "ITF World Tennis Tour, women's W15",
+ "itf_w25": "ITF women's W25, a 2023 category kept as printed that season",
+ "itf_w35": "ITF World Tennis Tour, women's W35",
+ "itf_w40": "ITF women's W40, a 2023 category kept as printed that season",
+ "itf_w50": "ITF World Tennis Tour, women's W50",
+ "itf_w60": "ITF women's W60, a 2023 category kept as printed that season",
+ "itf_w75": "ITF World Tennis Tour, women's W75",
+ "itf_w80": "ITF women's W80, a 2023 category kept as printed that season",
+ "itf_w100": "ITF World Tennis Tour, women's W100",
+ "juniors": "Junior events",
+ "utr": "UTR events",
+ "exhibition": "Exhibition with no ranking points",
+ },
+ },
+ {
+ "id": "category",
+ "title": "Tournament category",
+ "fields": ["Tournament.category"],
+ "about": ("The coarse class of a tournament. It is set only where the catalogues agree "
+ "on an exact name, and is null otherwise. Read the tier for the level."),
+ "codes": lambda s: _schema_enum(s, "Tournament", "category"),
+ "labels": {
+ "grand_slam": "Grand Slam",
+ "masters_1000": "Masters 1000",
+ "tour_finals": "Season-ending tour finals",
+ "atp_500": "ATP 500",
+ "atp_250": "ATP 250",
+ "wta_1000": "WTA 1000",
+ "wta_500": "WTA 500",
+ "wta_250": "WTA 250",
+ "wta_125": "WTA 125",
+ "challenger": "ATP Challenger, any level",
+ "itf": "ITF World Tennis Tour, any category",
+ "juniors": "Junior events",
+ },
+ },
+ {
+ "id": "tour",
+ "title": "Tour",
+ "fields": ["Match.tour", "GET /broadcast/live?tour=", "GET /players/{playerId}/stats?level="],
+ "about": ("The tour a match belongs to. The field and the filter come from one registry, "
+ "so a match selected with ?tour=X carries X. Exhibitions, team events and mixed "
+ "events have no public tour name, so their tour is null."),
+ "codes": lambda s: _schema_enum(s, "Match", "tour"),
+ "labels": {
+ "atp": "ATP Tour",
+ "wta": "WTA Tour",
+ "challenger": "ATP Challenger Tour",
+ "itf": "ITF World Tennis Tour",
+ "juniors": "Junior events",
+ },
+ },
+ {
+ "id": "round",
+ "title": "Round code",
+ "fields": ["Match.round_code", "Fixture.round_code", "GET /history/archive/matches?round="],
+ "about": ("The round in one controlled vocabulary, shared by live matches and the results "
+ "archive. It is relative to the draw: a qualifying semi-final also reads SF, so "
+ "read it together with is_qualifying. Null when the round label is not recognised. "
+ "Q appears on matches only: the archive's round filter does not accept it."),
+ "codes": lambda s: _schema_enum(s, "Match", "round_code"),
+ "labels": {
+ "F": "Final",
+ "SF": "Semi-final",
+ "QF": "Quarter-final",
+ "R16": "Round of 16",
+ "R32": "Round of 32",
+ "R64": "Round of 64",
+ "R128": "Round of 128",
+ "RR": "Round robin",
+ "BR": "Third-place or bronze-medal match",
+ "Q": "Qualifying round that the label does not number",
+ "Q1": "First qualifying round",
+ "Q2": "Second qualifying round",
+ "Q3": "Third qualifying round",
+ "Q4": "Fourth qualifying round",
+ "ER": "Unnumbered round",
+ },
+ },
+ {
+ "id": "archive-level",
+ "title": "Archive level",
+ "fields": ["ArchiveMatch.level", "GET /history/archive/matches?level="],
+ "about": ("Level codes used by the results archive, on its level field and its level filter. ITF events carry their category "
+ "number instead of a letter, for example 15 or 25."),
+ "codes": lambda s: _archive_level_codes(s),
+ "labels": {
+ "G": "Grand Slam",
+ "M": "Masters",
+ "A": "Other tour-level events",
+ "F": "Season-ending finals",
+ "D": "Davis Cup",
+ "C": "Challenger",
+ "O": "Olympics",
+ },
+ },
+ {
+ "id": "surface",
+ "title": "Court surface",
+ "fields": ["Match.surface", "Tournament.surface", "GET /players/{playerId}/stats?surface="],
+ "about": ("The court surface as stated for the event. It is never inferred from the "
+ "surface a tournament used in other seasons. A Davis Cup, Billie Jean King Cup or "
+ "Laver Cup match carries the surface of its own tie. The player stats filter also "
+ "takes indoor, which keeps matches stated as played indoors on any surface."),
+ "codes": lambda s: _schema_enum(s, "Match", "surface"),
+ "labels": {"hard": "Hard court", "clay": "Clay court", "grass": "Grass court"},
+ },
+ {
+ "id": "draw",
+ "title": "Draw",
+ "fields": ["Match.draw"],
+ "about": "Singles or doubles. Null means nothing states which, and is not singles.",
+ "codes": lambda s: _schema_enum(s, "Match", "draw"),
+ "labels": {"singles": "Singles", "doubles": "Doubles"},
+ },
+ {
+ "id": "format",
+ "title": "Match format",
+ "fields": ["Match.format"],
+ "about": "The number of sets the match is played over.",
+ "codes": lambda s: _schema_enum(s, "Match", "format"),
+ "labels": {"BO3": "Best of three sets", "BO5": "Best of five sets"},
+ },
+ {
+ "id": "status",
+ "title": "Match status",
+ "fields": ["Match.status"],
+ "about": "Where the match is in its lifecycle.",
+ "codes": lambda s: _schema_enum(s, "Match", "status"),
+ "labels": {
+ "upcoming": "Scheduled and not yet started",
+ "live": "In play",
+ "completed": "Played to a result",
+ "cancelled": "Not played as scheduled",
+ },
+ },
+ {
+ "id": "outcome",
+ "title": "Match outcome",
+ "fields": ["Match.outcome"],
+ "about": "How a finished match was settled. Null while a match is upcoming or live.",
+ "codes": lambda s: _schema_enum(s, "Match", "outcome"),
+ "labels": {
+ "completed": "Ran its full course",
+ "retired": "A player retired during play",
+ "walkover": "Conceded before a ball was struck",
+ "default": "A player was defaulted",
+ "abandoned": "Called off unfinished, with no result awarded",
+ "unresolved": "Closed unfinished with no result asserted, until a result is confirmed",
+ },
+ },
+ {
+ "id": "event-status",
+ "title": "Event status",
+ "fields": ["Match.event_status"],
+ "about": ("The stated match state, published as written. Null means nothing was stated, "
+ "not that the match finished normally."),
+ "codes": lambda s: _schema_enum(s, "Match", "event_status"),
+ "labels": {
+ "Finished": "Stated as finished",
+ "Retired": "Ended by a retirement",
+ "Cancelled": "Stated as cancelled",
+ "Walk Over": "Walkover",
+ "Postponed": "Stated as postponed",
+ "Interrupted": "Suspended in play, for example rain, darkness or a medical stop",
+ "Unresolved": "Closed before a result could be confirmed",
+ },
+ },
+ {
+ "id": "fixture-status",
+ "title": "Fixture status",
+ "fields": ["Fixture.status"],
+ "about": ("Where a scheduled fixture stands. On a fixture bound to a match it is the match's "
+ "status in this vocabulary. A walkover, a retirement, a default and a plain "
+ "cancellation all read cancelled, and the fixture reason says which."),
+ "codes": lambda s: _schema_enum(s, "Fixture", "status"),
+ "labels": {
+ "scheduled": "Scheduled and not yet started",
+ "live": "In play",
+ "finished": "Played to a result",
+ "cancelled": "Ended without being played out, or not played",
+ "postponed": "Stated as postponed",
+ },
+ },
+ {
+ "id": "fixture-reason",
+ "title": "Fixture reason",
+ "fields": ["Fixture.reason"],
+ "about": ("Why a fixture ended without being played out. Null on a scheduled, live or "
+ "finished fixture, and on a row whose stated status is not one of these."),
+ "codes": lambda s: _schema_enum(s, "Fixture", "reason"),
+ "labels": {
+ "walkover": "Conceded before a ball was struck",
+ "retired": "A player retired during play",
+ "cancelled": "A plain cancellation",
+ "default": "A player was defaulted",
+ "postponed": "Stated as postponed",
+ },
+ },
+ {
+ "id": "match-event",
+ "title": "Match event type",
+ "fields": ["Event.type", "GET /matches/{matchId}/events", "GET /events"],
+ "about": ("The timeline of a match. Medical timeouts, trainer calls and toilet breaks are "
+ "stated by the scorer or chair umpire. The player field names the player where "
+ "one is stated and is null otherwise."),
+ "codes": lambda s: _schema_enum(s, "Event", "type"),
+ "labels": {
+ "break": "A break of serve",
+ "set_won": "A set won",
+ "game_won": "A game won",
+ "momentum_run": "A momentum run",
+ "stoppage_start": "Play stopped",
+ "stoppage_end": "Play resumed after a stoppage",
+ "pause_start": "A pause began",
+ "pause_end": "A pause ended",
+ "medical_timeout_start": "A medical timeout began",
+ "medical_timeout_end": "A medical timeout ended",
+ "trainer_called": "The trainer was called",
+ "trainer_called_end": "The trainer visit ended",
+ "toilet_break_start": "A toilet break began",
+ "toilet_break_end": "A toilet break ended",
+ },
+ },
+ {
+ "id": "ranking-system",
+ "title": "Ranking system",
+ "fields": ["RankingRecord.system", "GET /rankings?system="],
+ "about": ("The ranking a row belongs to. Elo keeps four independent ladders, named by "
+ "the surface field: all surfaces together, hard, clay and grass. ATP and WTA Elo "
+ "are separate and never combined."),
+ "codes": lambda s: _schema_enum(s, "RankingRecord", "system"),
+ "labels": {
+ "atp": "ATP singles ranking",
+ "wta": "WTA singles ranking",
+ "atp_doubles": "ATP doubles ranking",
+ "wta_doubles": "WTA doubles ranking",
+ "itf_mt": "ITF men's World Tennis Tour ranking",
+ "itf_wt": "ITF women's World Tennis Tour ranking",
+ "itf_jt": "ITF junior ranking",
+ "utr": "UTR rating",
+ "elo": "Elo rating, by surface ladder",
+ },
+ },
+ {
+ "id": "elo-surface",
+ "title": "Elo surface ladder",
+ "fields": ["RankingRecord.surface", "GET /rankings?surface="],
+ "about": ("Which of the four independent Elo ladders a rating belongs to. It is set on elo "
+ "rows only and absent on every other system. A ladder the player has never played "
+ "is left out of the response, not filled from another ladder."),
+ "codes": lambda s: _schema_enum(s, "RankingRecord", "surface"),
+ "labels": {
+ "overall": "All surfaces together",
+ "hard": "Hard-court ladder",
+ "clay": "Clay-court ladder",
+ "grass": "Grass-court ladder",
+ },
+ },
+ {
+ "id": "point-outcome",
+ "title": "Point outcome",
+ "fields": ["HistoryTapeRow.outcome"],
+ "about": "How a point ended, as stated for that point in the point-by-point history.",
+ "codes": lambda s: _schema_enum(s, "HistoryTapeRow", "outcome"),
+ "labels": {
+ "ace": "Ace",
+ "double_fault": "Double fault",
+ "winner": "Winner",
+ "forced_error": "Forced error",
+ "unforced_error": "Unforced error",
+ },
+ },
+ {
+ "id": "rally-outcome",
+ "title": "Charted point outcome",
+ "fields": ["RallyPoint.outcome"],
+ "about": "How a charted point ended in the shot-level data.",
+ "codes": lambda s: _schema_enum(s, "RallyPoint", "outcome"),
+ "labels": {
+ "winner": "Winner",
+ "forced_error": "Forced error",
+ "unforced_error": "Unforced error",
+ "error": "A miss charted without saying whether it was forced",
+ "other": "Any other ending",
+ },
+ },
+ {
+ "id": "unreturned",
+ "title": "Unreturned serve",
+ "fields": ["RallyPoint.unreturned_kind"],
+ "about": "How a serve went unreturned. Null when the return was in play.",
+ "codes": lambda s: _schema_enum(s, "RallyPoint", "unreturned_kind"),
+ "labels": {
+ "ace": "Ace",
+ "serve_winner": "Serve winner charted without a direction, counted with aces",
+ "serve_forced_error": "The serve forced a return error",
+ "return_forced_error": "Forced return error",
+ "return_unforced_error": "Unforced return error",
+ "return_error": "Missed return, not charted as forced or unforced",
+ },
+ },
+ {
+ "id": "stroke",
+ "title": "Stroke",
+ "fields": ["RallyShot.stroke"],
+ "about": "The kind of shot in charted rally data.",
+ "codes": lambda s: _schema_enum(s, "RallyShot", "stroke"),
+ "labels": {
+ "serve": "Serve", "groundstroke": "Groundstroke", "slice": "Slice", "volley": "Volley",
+ "half_volley": "Half volley", "swinging_volley": "Swinging volley",
+ "overhead": "Overhead", "drop_shot": "Drop shot", "lob": "Lob", "trick": "Trick shot",
+ "unknown": "Shot type not recorded",
+ },
+ },
+ {
+ "id": "wing",
+ "title": "Wing",
+ "fields": ["RallyShot.wing"],
+ "about": "The side a shot was struck from.",
+ "codes": lambda s: _schema_enum(s, "RallyShot", "wing"),
+ "labels": {"forehand": "Forehand", "backhand": "Backhand"},
+ },
+ {
+ "id": "direction",
+ "title": "Shot direction",
+ "fields": ["RallyShot.direction"],
+ "about": "Where the ball was sent.",
+ "codes": lambda s: _schema_enum(s, "RallyShot", "direction"),
+ "labels": {"forehand_side": "To the forehand side", "middle": "Through the middle",
+ "backhand_side": "To the backhand side"},
+ },
+ {
+ "id": "depth",
+ "title": "Shot depth",
+ "fields": ["RallyShot.depth"],
+ "about": "How deep the ball landed.",
+ "codes": lambda s: _schema_enum(s, "RallyShot", "depth"),
+ "labels": {"shallow": "Shallow", "mid": "Mid-court", "deep": "Deep"},
+ },
+ {
+ "id": "shot-position",
+ "title": "Court position",
+ "fields": ["RallyShot.position"],
+ "about": "Where the player stood to strike the shot. Null when it was not charted.",
+ "codes": lambda s: _schema_enum(s, "RallyShot", "position"),
+ "labels": {"approaching": "Coming forward to the net", "at_net": "At the net",
+ "baseline": "At the baseline"},
+ },
+ {
+ "id": "serve-direction",
+ "title": "Serve direction",
+ "fields": ["RallyPoint.serve_direction"],
+ "about": "Where the serve was aimed.",
+ "codes": lambda s: _schema_enum(s, "RallyPoint", "serve_direction"),
+ "labels": {"wide": "Out wide", "body": "At the body", "down_the_t": "Down the T"},
+ },
+ {
+ "id": "error-location",
+ "title": "Error location",
+ "fields": ["RallyPoint.error_location"],
+ "about": "Where a missed shot went.",
+ "codes": lambda s: _schema_enum(s, "RallyPoint", "error_location"),
+ "labels": {"net": "Into the net", "wide": "Wide", "deep": "Long",
+ "wide_and_deep": "Wide and long"},
+ },
+]
+
+
+def vocabulary_table(spec: dict[str, Any]) -> list[dict[str, Any]]:
+ """The vocabularies with their codes read from the spec. Fails on a code with no label."""
+ out = []
+ for v in VOCABULARIES:
+ codes = v["codes"](spec)
+ missing = [c for c in codes if c not in v["labels"]]
+ extra = [c for c in v["labels"] if c not in codes]
+ if missing or extra:
+ raise SystemExit(
+ f"vocabulary {v['id']}: codes without a label {missing}, labels without a code {extra}."
+ "\n Describe new codes in VOCABULARIES (scripts/build_reference.py)."
+ )
+ out.append({
+ "id": v["id"], "title": v["title"], "fields": v["fields"], "about": v["about"],
+ "values": [{"code": c, "meaning": v["labels"][c],
+ "url": f"{DOCS_URL}/{VOCAB_SLUG}.html#{v['id']}-{_anchor(c)}"} for c in codes],
+ })
+ return out
+
+
+def _anchor(code: str) -> str:
+ return re.sub(r"[^a-z0-9_]+", "-", code.lower()).strip("-")
+
+
+def build_vocabulary_json(spec: dict[str, Any]) -> str:
+ doc = {
+ "name": "Live Tennis API tennis data vocabulary",
+ "description": ("The closed codes the Live Tennis API returns for tournaments, rounds, "
+ "surfaces, results, rankings and charted shots, with their meanings."),
+ "url": f"{DOCS_URL}/{VOCAB_JSON}",
+ "page": f"{DOCS_URL}/{VOCAB_SLUG}.html",
+ "spec_version": spec["info"]["version"],
+ "license": "MIT, https://github.com/livetennisapi/openapi/blob/main/LICENSE",
+ "attribution": "Live Tennis API, https://livetennisapi.com",
+ "vocabularies": vocabulary_table(spec),
+ }
+ return json.dumps(doc, ensure_ascii=False, indent=1) + "\n"
+
+
+def _vocabulary_body(spec: dict[str, Any]) -> str:
+ sections = []
+ toc = []
+ for v in vocabulary_table(spec):
+ toc.append(f'
Each code on this page is one the API can return. Where a field can be null, null "
+ "is never one of these codes in disguise. It means the value is not known or does not "
+ "apply. The match outcome list can grow within v1, so treat a "
+ "value you do not recognise as unknown. Each code has its own link, so a schema or a "
+ "column note can point at one meaning. The same table is published as "
+ f'{VOCAB_JSON} for code that validates or labels the values.
\n'
+ )
+
+
GUIDES: list[dict[str, Any]] = [
{
"slug": "ai-sdk",
@@ -4468,6 +4990,33 @@ def _sportsml_body(spec: dict[str, Any]) -> str:
'livetennisapi/openapi.'
),
},
+ {
+ "slug": VOCAB_SLUG,
+ "title": "Tennis data vocabulary: tiers, rounds, surfaces and results",
+ "head_title": "Tennis data codes: tiers, rounds, surfaces | Live Tennis API",
+ "question": "What does each tennis data code mean?",
+ "description": (
+ "What does each tennis data code mean? Tournament tiers, round codes, surfaces, match "
+ "outcomes and shot types, with one link per code and a JSON copy."
+ ),
+ "lede": (
+ "This page lists the closed codes the API returns for tournaments, rounds, surfaces, "
+ "results, rankings and charted shots, with what each one means. It is built from the "
+ "OpenAPI spec, so each list holds exactly the codes its field can carry."
+ ),
+ "meta": (
+ f'Meanings checked against the spec on . Machine-readable copy: {VOCAB_JSON}, '
+ "MIT licensed, like the spec."
+ ),
+ "body": _vocabulary_body,
+ "date": VOCAB_CHECKED,
+ "about": {"@type": "DefinedTermSet", "name": "Live Tennis API tennis data vocabulary",
+ "url": f"{DOCS_URL}/{VOCAB_JSON}"},
+ "footer": (
+ 'Page source in livetennisapi/openapi, '
+ "generated by scripts/build_reference.py."
+ ),
+ },
]
@@ -4648,6 +5197,8 @@ def main() -> int:
# The same spec as JSON, for the agents and tools that only read JSON (GPT Actions,
# Postman import, most MCP scaffolds). Both URLs are stable and both are advertised.
DOCS / "openapi.json": json.dumps(spec, ensure_ascii=False, indent=1) + "\n",
+ # The vocabulary page's table as data, for validators and labelling code.
+ DOCS / VOCAB_JSON: build_vocabulary_json(spec),
}
# Heading levels must not skip. h1 -> h3 is a level a screen reader reports as missing and