# PB Vision schemas: Insights 4.13.1

<!-- version-nav -->
Version 4.13.1 · previous: [4.13.0](../../4.13.0/docs/schemas.md) · next: [4.14.0](../../4.14.0/docs/schemas.md) · [latest (4.14.0)](../../latest/docs/schemas.md) · [all versions](../../versions.md) · [changelog](changelog.md)
<!-- /version-nav -->

Every field of every schema in this package. Objects allow no keys beyond those listed unless marked *may have other keys*. A linked type is defined in its own section.

## What changed in 4.13.1

Descriptions only:

- `player_data.trends.ratings.targeting`: now described as Early Game, "how well the player plays the start of the rally". The key stays `targeting`.
- `player_data.trends.kitchen_arrivals`: the descriptions of `serving_side` and `receiving_side` were swapped; each now describes its own side.

## Contents

- [Insights](#insights/game) `/insights/game`
- [Zone](#events/zone) `/events/zone`
- [Court Coverage](#insights/court_coverage) `/insights/court_coverage`
- [Game Data](#insights/game_data) `/insights/game_data`
- [Highlight](#insights/highlight) `/insights/highlight`
- [Player Data](#insights/player_data) `/insights/player_data`
- [Role Data](#insights/role_data) `/insights/role_data`
- [Shot](#insights/shot) `/insights/shot`
- [Prediction Confidence](#types/confidence) `/types/confidence`
- [Count](#types/count) `/types/count`
- [Encoded Positions](#types/encoded_positions) `/types/encoded_positions`
- [Percentage](#types/percentage) `/types/percentage`
- [Player ID](#types/player_id) `/types/player_id`
- [Quality Score](#types/quality_score) `/types/quality_score`
- [Session](#types/session) `/types/session`
- [Vector](#types/vector) `/types/vector`
- [Version](#types/version) `/types/version`
- [Video Milliseconds](#types/video_time) `/types/video_time`
- [World XYZ](#types/world_position/3d) `/types/world_position/3d`

---

<a id="insights/game"></a>

## Insights

`/insights/game`

Various insights about the game for displaying in the web app.

Version hashes: functional `2cc8260f3f155b6bc46fe6e2a2fe60fd`, full `339c7948f45861ade36400256369432d`

Properties:

- <a id="insights/game.coach_advice"></a>**`coach_advice`** `array of Coach Advice` · exactly 4 items · items may be null

  Lists of advice for each player.

  Each item: Advice based on rank of certain features in the distribution of games (how well the player performed in some areas relative to other games).

  - <a id="insights/game.coach_advice[].advice"></a>**`advice`** `array of Advice`

    A list of advice for the player to improve their game (ranked by relevance score, starting from the best).

    Each item: Particular advice

    - <a id="insights/game.coach_advice[].advice[].ci"></a>**`ci`** `array of number` · exactly 2 items

      The confidence interval ([low, high]) of the value.

    - <a id="insights/game.coach_advice[].advice[].kind"></a>**`kind`** `string` · one of `"serve_quality"`, `"legal_serve_percentage"`, `"return_quality"`, `"third_shot_quality"`, `"legal_third_shot_percentage"`, `"drop_shot_consistency"`, `"dink_consistency"`, `"rallies_won_with_resets"`, `"rallies_won_with_speedups"`, `"kitchen_arrival_percentage_on_serve"`

      The statistic in question.

    - <a id="insights/game.coach_advice[].advice[].method"></a>**`method`** `string` · one of `"wilson"`, `"avg_rank"`, `"avg"`, `"scalar"`

      The method used to compute the CI for the statistic's rank.

    - <a id="insights/game.coach_advice[].advice[].relevance"></a>**`relevance`** `number`

      Relevance score indicating how "interesting" this advice is (how much of a bad outlier is this particular stat). Higher is better. Calculated from the upper bound of CI, and then slightly weighted (with various weights for different stats) to make the typical advice more interesting.

    - <a id="insights/game.coach_advice[].advice[].value"></a>**`value`** `number`

      The raw value of the statistic in question.

- <a id="insights/game.component_stats"></a>**`component_stats`** `object` · optional

  Per-player values of the component-rating sub-stats shown in the web app, one locked key per stat. Rates are fractions in [0, 1]. Computed for every doubles game whether or not ratings are; omitted for games the stats collector rejects (singles or malformed).

  - <a id="insights/game.component_stats.0_speeds"></a>**`0_speeds`** `array of number` · exactly 4 items · items: ≥ 0 · items may be null

    Mean speed in mph of the player's serves that stayed in play: serves into the net, short or landing out are left out, and a serve heading out that the receiver played anyway counts. This is the game page's Average Serve. Unit: mph. Component: ball_control. Values for each player (indexed by player ID); null where the stat has no value for that player.  pbql 0.17.1 shots:  SELECT rally.num, shot.num, shot.hitter.id, shot.speed FROM "<vid>:<session>" WHERE shot.num = 1 AND NOT shot.errors.faults.net AND NOT shot.errors.faults.short AND NOT (exists(shot.errors.faults.out.outcome) AND shot.errors.faults.out.outcome = "landed")  Aggregation:  SELECT shot.hitter.id, avg(shot.speed), count() FROM "<vid>:<session>" WHERE shot.num = 1 AND NOT shot.errors.faults.net AND NOT shot.errors.faults.short AND NOT (exists(shot.errors.faults.out.outcome) AND shot.errors.faults.out.outcome = "landed") GROUP BY shot.hitter.id

  - <a id="insights/game.component_stats.1_speeds"></a>**`1_speeds`** `array of number` · exactly 4 items · items: ≥ 0 · items may be null

    Mean speed in mph of the player's returns of serve. Counts returns that have an execution-quality score and no fault. Unit: mph. Component: ball_control. Values for each player (indexed by player ID); null where the stat has no value for that player.  pbql 0.17.1 shots:  SELECT rally.num, shot.num, shot.hitter.id, shot.speed FROM "<vid>:<session>" WHERE shot.num = 2 AND exists(shot.quality.execution) AND NOT shot.hasFault  Aggregation:  SELECT shot.hitter.id, avg(shot.speed), count() FROM "<vid>:<session>" WHERE shot.num = 2 AND exists(shot.quality.execution) AND NOT shot.hasFault GROUP BY shot.hitter.id

  - <a id="insights/game.component_stats.def_to_off_transitions_per_game"></a>**`def_to_off_transitions_per_game`** `array of number` · exactly 4 items · items: ≥ 0 · items may be null

    Number of times in the game the team went from a positional disadvantage to an advantage: the team's average advantage turns from negative to positive between consecutive team shots in a rally, whatever the rally's result. Unit: a count. Team stat: both partners carry the same value. Component: defense. Values for each player (indexed by player ID); null where the stat has no value for that player. Not expressible in pbql 0.17.1.

  - <a id="insights/game.component_stats.defense_flip_index"></a>**`defense_flip_index`** `array of number` · exactly 4 items · items: range [0, 1] · items may be null

    Of the rallies the team started on defense (its first two shots at a clear positional disadvantage) and whose winner is known, the fraction where the team later reached a clear advantage and won the rally. Unit: a fraction in [0, 1]. Team stat: both partners carry the same value. Component: defense. Values for each player (indexed by player ID); null where the stat has no value for that player. Not expressible in pbql 0.17.1.

  - <a id="insights/game.component_stats.dink_attempts_per_game"></a>**`dink_attempts_per_game`** `array of number` · exactly 4 items · items: ≥ 0 · items may be null

    Number of dinks the player hit in the game (shots typed as a dink), faulted dinks included. Unit: a count. Component: kitchen_game. Values for each player (indexed by player ID); null where the stat has no value for that player.  pbql 0.17.1 shots:  SELECT rally.num, shot.num, shot.hitter.id, 1 FROM "<vid>:<session>" WHERE shot.type = "dink"  Aggregation:  SELECT shot.hitter.id, sum(1), count() FROM "<vid>:<session>" WHERE shot.type = "dink" GROUP BY shot.hitter.id

  - <a id="insights/game.component_stats.drive_heights"></a>**`drive_heights`** `array of number` · exactly 4 items · items: ≥ 0 · items may be null

    Mean peak height in feet of the player's drives. Counts drives that have an execution-quality score and did not fault into the net or land short. Unit: feet. Component: ball_control. Values for each player (indexed by player ID); null where the stat has no value for that player.  pbql 0.17.1 shots:  SELECT rally.num, shot.num, shot.hitter.id, shot.peak.z FROM "<vid>:<session>" WHERE shot.type = "drive" AND exists(shot.quality.execution) AND NOT shot.errors.faults.net AND NOT shot.errors.faults.short  Aggregation:  SELECT shot.hitter.id, avg(shot.peak.z), count() FROM "<vid>:<session>" WHERE shot.type = "drive" AND exists(shot.quality.execution) AND NOT shot.errors.faults.net AND NOT shot.errors.faults.short GROUP BY shot.hitter.id

  - <a id="insights/game.component_stats.errors_after_opponent_shot_rate"></a>**`errors_after_opponent_shot_rate`** `array of number` · exactly 4 items · items: range [0, 1] · items may be null

    Fraction of the player's shots (serves included) that were rally-ending errors committed after an opponent's shot. Every such fault counts, whether or not it is classified as unforced; faulted serves do not count. In the queries, `winnerType = "forced_fault"` marks the opponent's shot before any such fault. Rallies flagged likely bad are excluded. Unit: a fraction in [0, 1]. Component: defense. Values for each player (indexed by player ID); null where the stat has no value for that player.  pbql 0.17.1 shots:  SELECT rally.num, shot.num, shot.hitter.id, exists(shot[-1].winnerType) AND shot[-1].winnerType = "forced_fault" AND shot[-1].hitter.team != shot.hitter.team FROM "<vid>:<session>"  Aggregation:  SELECT shot.hitter.id, avg(exists(shot[-1].winnerType) AND shot[-1].winnerType = "forced_fault" AND shot[-1].hitter.team != shot.hitter.team), count() FROM "<vid>:<session>" GROUP BY shot.hitter.id  pbql caveat: pbql cannot leave out rallies flagged likely bad, so its value can differ slightly.

  - <a id="insights/game.component_stats.net_domination_share"></a>**`net_domination_share`** `array of number` · exactly 4 items · items: range [0, 1] · items may be null

    Share of rally time when at least one of the team's players is at the kitchen and no opponent is, averaged over the game's rallies (each rally counts equally). Rallies flagged likely bad are excluded. Unit: a fraction in [0, 1]. Team stat: both partners carry the same value. Component: offense. Values for each player (indexed by player ID); null where the stat has no value for that player. Not expressible in pbql 0.17.1.

  - <a id="insights/game.component_stats.offensive_shot_pct"></a>**`offensive_shot_pct`** `array of number` · exactly 4 items · items: range [0, 1] · items may be null

    Fraction of the player's non-serve shots with a known positional advantage that were played with the advantage on the player's side. In doubles both partners share one advantage value, so this is the team's advantage. Unit: a fraction in [0, 1]. Component: offense. Values for each player (indexed by player ID); null where the stat has no value for that player. Not expressible in pbql 0.17.1.

  - <a id="insights/game.component_stats.partner_distance"></a>**`partner_distance`** `array of number` · exactly 4 items · items: ≥ 0 · items may be null

    Mean distance in feet between the player and their partner, measured at each of the player's shots. Unit: feet. Component: kitchen_game. Values for each player (indexed by player ID); null where the stat has no value for that player. Not expressible in pbql 0.17.1.

  - <a id="insights/game.component_stats.partner_nvz_arrival_together_pct"></a>**`partner_nvz_arrival_together_pct`** `array of number` · exactly 4 items · items: range [0, 1] · items may be null

    Fraction of the team's rallies in which both partners reached the kitchen and their first kitchen arrivals were within 1 second of each other. Counts rallies, not flagged likely bad, in which both partners reached the kitchen. Unit: a fraction in [0, 1]. Team stat: both partners carry the same value. Component: kitchen_game. Values for each player (indexed by player ID); null where the stat has no value for that player. Not expressible in pbql 0.17.1.

  - <a id="insights/game.component_stats.return_unforced_error_rate"></a>**`return_unforced_error_rate`** `array of number` · exactly 4 items · items: range [0, 1] · items may be null

    Fraction of the player's returns of serve that were unforced errors. Unit: a fraction in [0, 1]. Component: targeting. Values for each player (indexed by player ID); null where the stat has no value for that player.  pbql 0.17.1 shots:  SELECT rally.num, shot.num, shot.hitter.id, exists(shot.errors.unforced) AND shot.errors.unforced FROM "<vid>:<session>" WHERE shot.num = 2  Aggregation:  SELECT shot.hitter.id, avg(exists(shot.errors.unforced) AND shot.errors.unforced), count() FROM "<vid>:<session>" WHERE shot.num = 2 GROUP BY shot.hitter.id

  - <a id="insights/game.component_stats.return_win_rate_when_drive"></a>**`return_win_rate_when_drive`** `array of number` · exactly 4 items · items: range [0, 1] · items may be null

    Fraction of rallies the player's team won after the player's faster returns of serve: returns above the player's own median return speed in this game. Rallies flagged likely bad or with an unknown winner are excluded. Unit: a fraction in [0, 1]. Component: targeting. Values for each player (indexed by player ID); null where the stat has no value for that player. Not expressible in pbql 0.17.1.

  - <a id="insights/game.component_stats.return_win_rate_when_float"></a>**`return_win_rate_when_float`** `array of number` · exactly 4 items · items: range [0, 1] · items may be null

    Fraction of rallies the player's team won after the player's slower returns of serve: returns at or below the player's own median return speed in this game. Rallies flagged likely bad or with an unknown winner are excluded. Unit: a fraction in [0, 1]. Component: targeting. Values for each player (indexed by player ID); null where the stat has no value for that player. Not expressible in pbql 0.17.1.

  - <a id="insights/game.component_stats.speedup_count_rallies_all_shots_count_rallies"></a>**`speedup_count_rallies_all_shots_count_rallies`** `array of number` · exactly 4 items · items: range [0, 1] · items may be null

    Of the rallies in which the player hit at least one shot with an execution-quality score, the fraction in which at least one of those shots was a speedup. Unit: a fraction in [0, 1]. Component: offense. Values for each player (indexed by player ID); null where the stat has no value for that player.  pbql 0.17.1 rallies:  SELECT rally.num, shot.num, me.id, rally.count(shot.hitter = me AND shot.isSpeedup AND exists(shot.quality.execution)) > 0 FROM "<vid>:<session>" WHERE shot.num = 1 AND rally.count(shot.hitter = me AND exists(shot.quality.execution)) > 0  Aggregation: Run once per player, as `me`.  SELECT avg(rally.count(shot.hitter = me AND shot.isSpeedup AND exists(shot.quality.execution)) > 0), count() FROM "<vid>:<session>" WHERE shot.num = 1 AND rally.count(shot.hitter = me AND exists(shot.quality.execution)) > 0

- <a id="insights/game.game_data"></a>**`game_data`** [Game Data](#insights/game_data)

  Contains data about the game overall.

- <a id="insights/game.highlights"></a>**`highlights`** [array of Highlight](#insights/highlight)

  A list of the noteworthy exchanges within the game.

  Each item: a section of the video that stands out

- <a id="insights/game.player_data"></a>**`player_data`** [array of Player Data](#insights/player_data) · exactly 4 items · items may be null

  Each player's data over the whole game for the web app.  If the player's location is unknown, the value for that player will be null.

  Each item: Contains player-specific data over the whole game for the web app.

- <a id="insights/game.rallies"></a>**`rallies`** `array of Rally` · at least 1 items

  An ordered list of the rallies within a singles or doubles game. This structure can also represent a distinct session or drill.

  - <a id="insights/game.rallies[].end_ms"></a>**`end_ms`** [Video Milliseconds (integer)](#types/video_time) · ≥ 0

    The end time of the rally (milliseconds).

  - <a id="insights/game.rallies[].players"></a>**`players`** `array of object` · exactly 4 items · items may be null

    The positional information for players during a rally.  If the player's location is unknown, the value for that player will be null.

    - <a id="insights/game.rallies[].players[].had_arrival_opportunity"></a>**`had_arrival_opportunity`** `boolean`

      `true` if this player had a fair opportunity to arrive at the kitchen in this rally

    - <a id="insights/game.rallies[].players[].kitchen_arrivals"></a>**`kitchen_arrivals`** `array of Kitchen Line Period` · optional

      List of periods when the player was positioned at the kitchen line

      Each item: A period within the rally when this player was positioned at the kitchen

      - <a id="insights/game.rallies[].players[].kitchen_arrivals[].ft_moved"></a>**`ft_moved`** [Vector](#types/vector) · optional

        Total denoised displacement movement vector in feet that this player moved during this kitchen line period, tracking x and y directions separately.

      - <a id="insights/game.rallies[].players[].kitchen_arrivals[].since_ms"></a>**`since_ms`** `integer`

        Millisecond timestamp (from the beginning of the rally) when the player first arrived at the kitchen line

      - <a id="insights/game.rallies[].players[].kitchen_arrivals[].until_ms"></a>**`until_ms`** `integer` · optional

        Millisecond timestamp (from the beginning of the rally) when the player was pushed back from the kitchen line

    - <a id="insights/game.rallies[].players[].started_on_left_side"></a>**`started_on_left_side`** `boolean`

      `true` if this player started on the left side

  - <a id="insights/game.rallies[].scoring_info"></a>**`scoring_info`** `Scoring Info`

    Scoring rally-specific information. Note that the running_score and the server_number reflect the score DURING this rally (so not taking into account this rally's outcome).

    - <a id="insights/game.rallies[].scoring_info.likely_bad"></a>**`likely_bad`** `boolean` · optional

      If true, this rally is likely bad and should be ignored while computing the ongoing score.

    - <a id="insights/game.rallies[].scoring_info.running_score"></a>**`running_score`** `array of integer` · optional · exactly 2 items

      The running score of the game during _this_ rally. The first element is the score of team 0, and the second element is the score of team 1.

    - <a id="insights/game.rallies[].scoring_info.server_number"></a>**`server_number`** `integer` · optional · range [1, 2]

      Server number for _this_ rally, is only there for the side-out scoring mode.

  - <a id="insights/game.rallies[].shots"></a>**`shots`** [array of Shot](#insights/shot)

    The sequence of shots during this rally.

  - <a id="insights/game.rallies[].start_ms"></a>**`start_ms`** [Video Milliseconds (integer)](#types/video_time) · ≥ 0

    The start time of the rally (milliseconds).

  - <a id="insights/game.rallies[].team_stats"></a>**`team_stats`** `array of object` · optional · exactly 2 items

    Team-level statistics for the rally (omitted for singles).

    - <a id="insights/game.rallies[].team_stats[].average_ft_between_players_along_x"></a>**`average_ft_between_players_along_x`** `number` · optional

      Average distance in feet between team players during the rally.

    - <a id="insights/game.rallies[].team_stats[].side_switches_ms"></a>**`side_switches_ms`** `array of integer` · optional · items: ≥ 0

      Moments (ms in the video) where team switched their relative X position (left/right) for at least a second.

    - <a id="insights/game.rallies[].team_stats[].x_distance_optimality"></a>**`x_distance_optimality`** `number` · optional

      0-1 score of the consistency of the team's maintenance of the optimal x-direction distance between players (we consider 7-10 ft as optimal, and we give lower score for 5-7 or 10-12 ft. Everything below or above that is a 0).

  - <a id="insights/game.rallies[].winning_team"></a>**`winning_team`** `integer` · optional · range [0, 1]

    Which team won the rally (team 0 or 1)

- <a id="insights/game.session"></a>**`session`** [Session](#types/session)

  Defines aspects of the session or game being played.

- <a id="insights/game.stats"></a>**`stats`** `map` · keys match `^[a-zA-Z0-9_]+$`

  All collected stats keyed by stat name. Each entry contains the metric value for every player.

  - <a id="insights/game.stats.*"></a>**each value** `array of number` · exactly 4 items · items may be null

    Values for each player (indexed by player ID).

- <a id="insights/game.version"></a>**`version`** [Version (string)](#types/version) · matches `^\d+\.\d+\.\d+(-[^\s]+)?$`

  a version string matching x.x.x where x represents one or more digits


---

<a id="events/zone"></a>

## Zone

`/events/zone` · `string` · one of `"deep"`, `"mid"`, `"short"`, `"kitchen"`, `"net"`, `"out"`

Describes the place something is in:
* deep - in the deep zone (between 39 and 44 feet deep in the court)
* mid - in the mid zone (between 34 and 39 feet deep in the court)
* short - in the short zone (between 29 and 34 feet deep in the court)
* kitchen - in the kitchen zone (between 22 and 29 feet deep in the court)
* net - on the net
* out - out of bounds

---

<a id="insights/court_coverage"></a>

## Court Coverage

`/insights/court_coverage`

Categorizes stats about a players court coverage across all rallies.

Version hashes: functional `883a835a4c20445846664903e0aa53a4`, full `a77b7c579d29425e36b278b0454941fb`

Properties:

- <a id="insights/court_coverage.average_x_coverage_percentage"></a>**`average_x_coverage_percentage`** [Percentage (number)](#types/percentage) · optional · range [0, 100]

  The average percentage of court width coverage assigned to the player during rallies, based on their positioning relative to their partner. It's only relevant in doubles; not included for singles games.

- <a id="insights/court_coverage.heat_map_coordinates"></a>**`heat_map_coordinates`** `Heat Map Coordinates`

  Scaled player positions during any shot event where the player is on the court.

  - <a id="insights/court_coverage.heat_map_coordinates.xs_encoded"></a>**`xs_encoded`** [Encoded Positions (string)](#types/encoded_positions)

    Scaled, base64 encoded integers between [0,127] representing the player's position across the width (x dimension) of the court

  - <a id="insights/court_coverage.heat_map_coordinates.ys_encoded"></a>**`ys_encoded`** [Encoded Positions (string)](#types/encoded_positions)

    Scaled, reflected, base64 encoded integers between [0,127] representing the player's position across the length (y dimension) of the court

- <a id="insights/court_coverage.total_distance_covered"></a>**`total_distance_covered`** `number`

  The number of feet each player travels between shots in all rallies combined.


---

<a id="insights/game_data"></a>

## Game Data

`/insights/game_data`

Contains data about the game overall.

Version hashes: functional `b9df94fa021870b5ce0b09cf7e991fbc`, full `713b895293fd2b75a081d26bb525cfdf`

Properties:

- <a id="insights/game_data.avg_shots"></a>**`avg_shots`** `number` · ≥ 1

  Represents the average number of shots per rally.

- <a id="insights/game_data.game_outcome"></a>**`game_outcome`** `array of one of` · exactly 2 items

  the result (e.g., points scored) by each team

  Each item: Describes the team's result (score or won/lost, if known)

  One of:

  - <a id="insights/game_data.game_outcome[].@0"></a>**null**

    we don't know the team's score or whether they won or lost

  - <a id="insights/game_data.game_outcome[].@1"></a>**string** · one of `"won"`, `"lost"`

    whether the team won or lost (we don't know how points they scored)

  - <a id="insights/game_data.game_outcome[].@2"></a>**integer** · ≥ 0

    how many points the team scored (and by comparing it with the other team's score, we can also determine which team win)')

- <a id="insights/game_data.kitchen_rallies"></a>**`kitchen_rallies`** `integer` · ≥ 0

  Represents the number of rallies where all players get to the kitchen.

- <a id="insights/game_data.longest_rally"></a>**`longest_rally`** `Longest Rally`

  Contains the rally index and number of shots for the longest rally in the game.

  - <a id="insights/game_data.longest_rally.num_shots"></a>**`num_shots`** `integer` · ≥ 0

    Number of shots in the longest rally.

  - <a id="insights/game_data.longest_rally.rally_idx"></a>**`rally_idx`** `integer` · ≥ 0

    The rally which was the longest (0 is the first rally in the game).

- <a id="insights/game_data.min_points"></a>**`min_points`** `enum` · optional · one of `11`, `15`, `21`, `25`

  Minimal amount of points needed to win, as in "first to 11".

- <a id="insights/game_data.relative_adjustments"></a>**`relative_adjustments`** `object` · optional

  Outputs from the retired relative DUPr adjustment models: how strongly they nudged ratings between the two teams (Stage 2) and between partners on each team (Stage 3). Those two models have been removed and nothing writes this any more; it is present only on documents produced before the neural rating model replaced them.

  - <a id="insights/game_data.relative_adjustments.between_teams"></a>**`between_teams`** `number`

    Team-differential correction based on comparative performance of the teams. Each player on the higher-ranked team receives +between_teams/4, while the opponents get -between_teams/4. Positive values indicate the model boosted the predicted winners, negative values indicate a penalty.

  - <a id="insights/game_data.relative_adjustments.within_teams"></a>**`within_teams`** `array of number` · exactly 2 items

    Partner-differential corrections. Index 0 is the within-team adjustment applied between players 0 and 1, index 1 is applied between players 2 and 3.

- <a id="insights/game_data.scoring"></a>**`scoring`** `enum` · optional · one of `"side_out"`, `"rally"`

  The scoring system most likely used in the game.

- <a id="insights/game_data.team_percentage_to_kitchen"></a>**`team_percentage_to_kitchen`** [array of Percentage (number)](#types/percentage) · exactly 2 items · items: range [0, 100]

  Percent of rallies where all players on a team successfully arrived at the kitchen.

  Each item: A percentage value between 0 and 100.


---

<a id="insights/highlight"></a>

## Highlight

`/insights/highlight`

a section of the video that stands out

Version hashes: functional `da657053e81bee523da990b840fc7597`, full `9ca707e8b1f6c4a863ae7deae094f172`

Properties:

- <a id="insights/highlight.e"></a>**`e`** [Video Milliseconds (integer)](#types/video_time) · ≥ 0

  when in the original video the highlight ends

- <a id="insights/highlight.kind"></a>**`kind`** `string` · one of `"atp"`, `"erne"`, `"hands_battle"`, `"long_rally"`, `"poach"`, `"sequence"`

- <a id="insights/highlight.rally_idx"></a>**`rally_idx`** `integer` · ≥ 0

  which rally in the video this shot occurs (0-indexed)

- <a id="insights/highlight.s"></a>**`s`** [Video Milliseconds (integer)](#types/video_time) · ≥ 0

  when in the original video the highlight starts

- <a id="insights/highlight.score"></a>**`score`** `number` · ≥ 0

  An absolute measure of quality, can go above 1


Depending on its kind, it also has:

- <a id="insights/highlight.kind=atp"></a>**when `kind` = `"atp"`** `additional properties`

  - <a id="insights/highlight.kind=atp.shot_idx"></a>**`shot_idx`** `integer` · ≥ 0

    the shot number in the rally (0-indexed)

- <a id="insights/highlight.kind=erne"></a>**when `kind` = `"erne"`** `additional properties`

  - <a id="insights/highlight.kind=erne.shot_idx"></a>**`shot_idx`** `integer` · ≥ 0

    the shot number in the rally (0-indexed)

- <a id="insights/highlight.kind=hands_battle"></a>**when `kind` = `"hands_battle"`** `additional properties`

  - <a id="insights/highlight.kind=hands_battle.shot_end_idx"></a>**`shot_end_idx`** `integer` · ≥ 0

    the final shot index in the range, inclusive (0-indexed)

  - <a id="insights/highlight.kind=hands_battle.shot_start_idx"></a>**`shot_start_idx`** `integer` · ≥ 0

    the shot index in which the initiating shot occurred (0-indexed)

- <a id="insights/highlight.kind=poach"></a>**when `kind` = `"poach"`** `additional properties`

  - <a id="insights/highlight.kind=poach.shot_idx"></a>**`shot_idx`** `integer` · ≥ 0

    the shot number in the rally (0-indexed)

- <a id="insights/highlight.kind=sequence"></a>**when `kind` = `"sequence"`** `additional properties`

  - <a id="insights/highlight.kind=sequence.events"></a>**`events`** `array of object`

    specific highlighted events

    - <a id="insights/highlight.kind=sequence.events[].kind"></a>**`kind`** `string` · one of `"firefight"`, `"long_battle"`, `"passing"`, `"poach"`, `"shot"`

    - <a id="insights/highlight.kind=sequence.events[].ms"></a>**`ms`** [Video Milliseconds (integer)](#types/video_time) · ≥ 0

      when in the original video the event happens

    - <a id="insights/highlight.kind=sequence.events[].score"></a>**`score`** `number` · ≥ 0

      An absolute measure of quality, can go above 1

    - <a id="insights/highlight.kind=sequence.events[].shot_idx"></a>**`shot_idx`** `integer` · ≥ 0

      the shot number in the rally (0-indexed)

    Depending on its kind, it also has:

    - <a id="insights/highlight.kind=sequence.events[].kind=firefight"></a>**when `kind` = `"firefight"`** `additional properties`

      - <a id="insights/highlight.kind=sequence.events[].kind=firefight.end_shot_idx"></a>**`end_shot_idx`** `integer` · ≥ 0

        the shot number in the rally (0-indexed)

    - <a id="insights/highlight.kind=sequence.events[].kind=long_battle"></a>**when `kind` = `"long_battle"`** `additional properties`

      - <a id="insights/highlight.kind=sequence.events[].kind=long_battle.end_shot_idx"></a>**`end_shot_idx`** `integer` · ≥ 0

        the shot number in the rally (0-indexed)

    - <a id="insights/highlight.kind=sequence.events[].kind=shot"></a>**when `kind` = `"shot"`** `additional properties`

      - <a id="insights/highlight.kind=sequence.events[].kind=shot.shot_type"></a>**`shot_type`** `string` · optional · one of `"smash"`, `"lob"`, `"dink"`, `"drop"`, `"drive"`, `"atp"`, `"erne"`

        - smash: an overhead or similar shot where the ball goes from high to low (no upward motion)
        - lob: a shot with a relatively high peak
        - dink: a shot that would land in or near the kitchen and which was hit from near the kitchen
        - drop: a shot that would land in or near the kitchen and was hit from the transition zone or deeper
        - drive: a shot that would land deep if not stopped by an opponent's paddle, opponent's body, or the net (and doesn't fall into an earlier categorization)
        - atp: an around-the-post shot, where the ball is hit outside the sideline and around the net post instead of over the net
        - erne: a shot hit from outside the sideline by the kitchen (based on when the player's feet first touch after a volley)

        Omitted if we can't confidently determine a shot type based on the ball's trajectory and other characteristics.

  - <a id="insights/highlight.kind=sequence.rally_ending"></a>**`rally_ending`** `boolean`

  - <a id="insights/highlight.kind=sequence.short_description"></a>**`short_description`** `string`

    a short description of the highlight

  - <a id="insights/highlight.kind=sequence.shot_end_idx"></a>**`shot_end_idx`** `integer` · ≥ 0

    the final shot index in the range, inclusive (0-indexed)

  - <a id="insights/highlight.kind=sequence.shot_start_idx"></a>**`shot_start_idx`** `integer` · ≥ 0

    initiating shot of the highlight, can be just a mistake


---

<a id="insights/player_data"></a>

## Player Data

`/insights/player_data`

Contains player-specific data over the whole game for the web app.

Version hashes: functional `fe13c6202aa7f45f43adf239197898fd`, full `a7d8e99354f00c87c0e90dc562e9de0e`

Properties:

- <a id="insights/player_data.avatar_id"></a>**`avatar_id`** `integer`

  The avatar ID for this player.

- <a id="insights/player_data.court_coverage"></a>**`court_coverage`** [Court Coverage](#insights/court_coverage)

  Categorizes stats about a players court coverage across all rallies.

- <a id="insights/player_data.kitchen_arrival_percentage"></a>**`kitchen_arrival_percentage`** `Kitchen Arrival Opportunity Stats`

  Counts of fair kitchen-arrival opportunities (denominator) and successful arrivals (numerator), broken down by serving/returning roles for the player and their partner.

  - <a id="insights/player_data.kitchen_arrival_percentage.returning"></a>**`returning`** `object`

    - <a id="insights/player_data.kitchen_arrival_percentage.returning.oneself"></a>**`oneself`** `object`

      - <a id="insights/player_data.kitchen_arrival_percentage.returning.oneself.denominator"></a>**`denominator`** [Count (integer)](#types/count) · ≥ 0

        Number of rallies where the player had a fair opportunity to arrive within a few feet of the kitchen when on the returning team, as the returner (requires at least 3 non-fault shots).

      - <a id="insights/player_data.kitchen_arrival_percentage.returning.oneself.numerator"></a>**`numerator`** [Count (integer)](#types/count) · ≥ 0

        Number of rallies where the player successfully arrived within a few feet of the kitchen when on the returning team, as the returner (requires at least 3 non-fault shots).

    - <a id="insights/player_data.kitchen_arrival_percentage.returning.partner"></a>**`partner`** `object`

      - <a id="insights/player_data.kitchen_arrival_percentage.returning.partner.denominator"></a>**`denominator`** [Count (integer)](#types/count) · ≥ 0

        Number of rallies where the player had a fair opportunity to arrive within a few feet of the kitchen when on the returning team, as the partner of the returner (requires at least 3 non-fault shots).

      - <a id="insights/player_data.kitchen_arrival_percentage.returning.partner.numerator"></a>**`numerator`** [Count (integer)](#types/count) · ≥ 0

        Number of rallies where the player successfully arrived within a few feet of the kitchen when on the returning team, as the partner of the returner (requires at least 3 non-fault shots).

  - <a id="insights/player_data.kitchen_arrival_percentage.serving"></a>**`serving`** `object`

    - <a id="insights/player_data.kitchen_arrival_percentage.serving.oneself"></a>**`oneself`** `object`

      - <a id="insights/player_data.kitchen_arrival_percentage.serving.oneself.denominator"></a>**`denominator`** [Count (integer)](#types/count) · ≥ 0

        Number of rallies where the player had a fair opportunity to arrive within a few feet of the kitchen when on the serving team, as the server (requires at least 4 non-fault shots).

      - <a id="insights/player_data.kitchen_arrival_percentage.serving.oneself.numerator"></a>**`numerator`** [Count (integer)](#types/count) · ≥ 0

        Number of rallies where the player successfully arrived within a few feet of the kitchen when on the serving team, as the server (requires at least 4 non-fault shots).

    - <a id="insights/player_data.kitchen_arrival_percentage.serving.partner"></a>**`partner`** `object`

      - <a id="insights/player_data.kitchen_arrival_percentage.serving.partner.denominator"></a>**`denominator`** [Count (integer)](#types/count) · ≥ 0

        Number of rallies where the player had a fair opportunity to arrive within a few feet of the kitchen when on the serving team, as the partner of the server (requires at least 4 non-fault shots).

      - <a id="insights/player_data.kitchen_arrival_percentage.serving.partner.numerator"></a>**`numerator`** [Count (integer)](#types/count) · ≥ 0

        Number of rallies where the player successfully arrived within a few feet of the kitchen when on the serving team, as the partner of the server (requires at least 4 non-fault shots).

- <a id="insights/player_data.left_side_percentage"></a>**`left_side_percentage`** [Percentage (number)](#types/percentage) · range [0, 100]

  The percentage of time when this player was to the left of their partner.

- <a id="insights/player_data.positional_performance"></a>**`positional_performance`** `object` · optional

  Team-level positional performance metrics derived from the advantage-scale model. Omitted for singles or when too few supported rallies are available.

  - <a id="insights/player_data.positional_performance.finishing_ability"></a>**`finishing_ability`** `number` · optional · range [0, 1]

    Team-level Close in [0, 1]: how efficiently the player's team converted positional advantage into ending the rally, independent of rally outcomes. Both teammates share the same value; team 1's value is the complement of team 0's.

  - <a id="insights/player_data.positional_performance.forward_pressure"></a>**`forward_pressure`** `number` · optional · range [0, 1]

    Team-level Push in [0, 1]: how actively the player's team drove each shot toward their positional advantage, independent of rally outcomes. Both teammates share the same value; team 1's value is the complement of team 0's.

- <a id="insights/player_data.role_data"></a>**`role_data`** [Role Data](#insights/role_data)

  data about this player in each serving and receiving role

- <a id="insights/player_data.shot_count"></a>**`shot_count`** [Count (integer)](#types/count) · ≥ 0

  The total number of shots by the player.

- <a id="insights/player_data.team"></a>**`team`** `integer` · range [0, 1]

  The team to which the player belongs.

- <a id="insights/player_data.team_kitchen_arrival"></a>**`team_kitchen_arrival`** `Team Kitchen Arrival Stats`

  Counts of rallies where both teammates had a fair opportunity to arrive at the kitchen (denominator) and both successfully arrived (numerator), broken down by serving/returning roles. Both players on the same team share identical values.

  - <a id="insights/player_data.team_kitchen_arrival.returning"></a>**`returning`** `object`

    - <a id="insights/player_data.team_kitchen_arrival.returning.denominator"></a>**`denominator`** [Count (integer)](#types/count) · ≥ 0

      Number of rallies where both teammates had a fair opportunity to arrive at the kitchen when on the returning team (requires at least 3 non-fault shots).

    - <a id="insights/player_data.team_kitchen_arrival.returning.numerator"></a>**`numerator`** [Count (integer)](#types/count) · ≥ 0

      Number of rallies where both teammates arrived at the kitchen when on the returning team (requires at least 3 non-fault shots and both players having a fair opportunity).

  - <a id="insights/player_data.team_kitchen_arrival.serving"></a>**`serving`** `object`

    - <a id="insights/player_data.team_kitchen_arrival.serving.denominator"></a>**`denominator`** [Count (integer)](#types/count) · ≥ 0

      Number of rallies where both teammates had a fair opportunity to arrive at the kitchen when on the serving team (requires at least 4 non-fault shots).

    - <a id="insights/player_data.team_kitchen_arrival.serving.numerator"></a>**`numerator`** [Count (integer)](#types/count) · ≥ 0

      Number of rallies where both teammates arrived at the kitchen when on the serving team (requires at least 4 non-fault shots and both players having a fair opportunity).

- <a id="insights/player_data.total_team_shot_percentage"></a>**`total_team_shot_percentage`** [Percentage (number)](#types/percentage) · range [0, 100]

  The percentage of total team shots taken by the player.

- <a id="insights/player_data.trends"></a>**`trends`** `object` · optional

  Summary of a player's stats from one game

  - <a id="insights/player_data.trends.flags"></a>**`flags`** `object`

    Boolean information about the game

    - <a id="insights/player_data.trends.flags.won_game"></a>**`won_game`** `boolean`

      Whether the player won the game

  - <a id="insights/player_data.trends.kitchen_arrivals"></a>**`kitchen_arrivals`** `object`

    - <a id="insights/player_data.trends.kitchen_arrivals.receiving_side"></a>**`receiving_side`** `number` · range [0, 1]

      Percent of rallies the player makes it to the kitchen when on the receiving side

    - <a id="insights/player_data.trends.kitchen_arrivals.serving_side"></a>**`serving_side`** `number` · range [0, 1]

      Percent of rallies the player makes it to the kitchen when on the serving side

  - <a id="insights/player_data.trends.num_rallies"></a>**`num_rallies`** `integer` · range [0, 255]

    How many rallies were in the game

  - <a id="insights/player_data.trends.num_rallies_won"></a>**`num_rallies_won`** `integer` · range [0, 255]

    How many rallies were won

  - <a id="insights/player_data.trends.ratings"></a>**`ratings`** `object`

    A rating of the player's skill in various categories based on this one game. Which categories are rated depends on the trend version (see RATING_CATEGORIES_BY_VERSION). These ratings can be converted to a DUPR-like scale using the formula `2 + 6 * percentage` (i.e., the percentage [0,1] maps to the range [2,8]). Data extraction writes only the version 2 categories.

    - <a id="insights/player_data.trends.ratings.ball_control"></a>**`ball_control`** `number` · range [0, 1]

      How well the player controls the ball

    - <a id="insights/player_data.trends.ratings.court_iq"></a>**`court_iq`** `number` · range [0, 1]

      Court awareness and decision-making

    - <a id="insights/player_data.trends.ratings.defense"></a>**`defense`** `number` · range [0, 1]

      Ability to neutralize attacks

    - <a id="insights/player_data.trends.ratings.kitchen_game"></a>**`kitchen_game`** `number` · range [0, 1]

      Ability in the non-volley zone (kitchen) game

    - <a id="insights/player_data.trends.ratings.offense"></a>**`offense`** `number` · range [0, 1]

      Ability to apply pressure

    - <a id="insights/player_data.trends.ratings.overall"></a>**`overall`** `number` · range [0, 1]

      overall ability

    - <a id="insights/player_data.trends.ratings.targeting"></a>**`targeting`** `number` · range [0, 1]

      Early Game: how well the player plays the start of the rally.

  - <a id="insights/player_data.trends.return_depth"></a>**`return_depth`** `object`

    Proportions of various depths

    - <a id="insights/player_data.trends.return_depth.deep"></a>**`deep`** `number` · range [0, 1]

      Percent of deep serves

    - <a id="insights/player_data.trends.return_depth.medium"></a>**`medium`** `number` · range [0, 1]

      Percent of medium serves

    - <a id="insights/player_data.trends.return_depth.net"></a>**`net`** `number` · range [0, 1]

      Percent of too net serves (fault)

    - <a id="insights/player_data.trends.return_depth.out"></a>**`out`** `number` · range [0, 1]

      Percent of too long, short or wide serves (fault)

    - <a id="insights/player_data.trends.return_depth.shallow"></a>**`shallow`** `number` · range [0, 1]

      Percent of shallow (but in) serves

  - <a id="insights/player_data.trends.serve_depth"></a>**`serve_depth`** `object`

    Proportions of various depths

    - <a id="insights/player_data.trends.serve_depth.deep"></a>**`deep`** `number` · range [0, 1]

      Percent of deep serves

    - <a id="insights/player_data.trends.serve_depth.medium"></a>**`medium`** `number` · range [0, 1]

      Percent of medium serves

    - <a id="insights/player_data.trends.serve_depth.net"></a>**`net`** `number` · range [0, 1]

      Percent of too net serves (fault)

    - <a id="insights/player_data.trends.serve_depth.out"></a>**`out`** `number` · range [0, 1]

      Percent of too long, short or wide serves (fault)

    - <a id="insights/player_data.trends.serve_depth.shallow"></a>**`shallow`** `number` · range [0, 1]

      Percent of shallow (but in) serves

  - <a id="insights/player_data.trends.serve_speed"></a>**`serve_speed`** `array of number` · exactly 17 items · items: range [0, 1]

    17 buckets for % of serves at speeds of <17.5mph (bucket index 0), [17.5-20.0), .., [52.5-55), >=55mph (bucket index 16)

    Each item: a percentage expressed as a number between 0 and 1

  - <a id="insights/player_data.trends.shot_accuracy"></a>**`shot_accuracy`** `object`

    - <a id="insights/player_data.trends.shot_accuracy.in"></a>**`in`** `number` · range [0, 1]

      Percent of shots that went in

    - <a id="insights/player_data.trends.shot_accuracy.net"></a>**`net`** `number` · range [0, 1]

      Percent of shots that were stopped by the net (fault)

    - <a id="insights/player_data.trends.shot_accuracy.out"></a>**`out`** `number` · range [0, 1]

      Percent of shots that were out (fault)

  - <a id="insights/player_data.trends.shot_quality"></a>**`shot_quality`** `object`

    - <a id="insights/player_data.trends.shot_quality.average"></a>**`average`** `number` · range [0, 1]

      Percent of shots that were quality 0.4 (inclusive) to 0.6 (exclusive)

    - <a id="insights/player_data.trends.shot_quality.excellent"></a>**`excellent`** `number` · range [0, 1]

      Percent of shots that were quality 0.8 or higher

    - <a id="insights/player_data.trends.shot_quality.fair"></a>**`fair`** `number` · range [0, 1]

      Percent of shots that were quality 0.2 (inclusive) to 0.4 (exclusive)

    - <a id="insights/player_data.trends.shot_quality.good"></a>**`good`** `number` · range [0, 1]

      Percent of shots that were quality 0.6 (inclusive) to 0.8 (exclusive)

    - <a id="insights/player_data.trends.shot_quality.poor"></a>**`poor`** `number` · range [0, 1]

      Percent of shots that were quality less than 0.2

  - <a id="insights/player_data.trends.shot_selection"></a>**`shot_selection`** `object`

    serves and returns are excluded, as are any shots which don't fall in any of the categories here

    - <a id="insights/player_data.trends.shot_selection.dink"></a>**`dink`** `number` · range [0, 1]

      Percent of shots that were dinks

    - <a id="insights/player_data.trends.shot_selection.drive"></a>**`drive`** `number` · range [0, 1]

      Percent of shots that were drives

    - <a id="insights/player_data.trends.shot_selection.drop"></a>**`drop`** `number` · range [0, 1]

      Percent of shots that were drops

    - <a id="insights/player_data.trends.shot_selection.reset"></a>**`reset`** `number` · range [0, 1]

      Percent of shots that were resets

- <a id="insights/player_data.trends_missing_reasons"></a>**`trends_missing_reasons`** `array of string` · optional

  Reasons explaining why trends data is missing for this player. Present only when `trends` is omitted.


---

<a id="insights/role_data"></a>

## Role Data

`/insights/role_data`

data about this player in each serving and receiving role

Version hashes: functional `2b7739497e8203053b616ba83726b67b`, full `8e0fa0fe3ba260a156994e3c5583f0e4`

Properties:

- <a id="insights/role_data.receiving"></a>**`receiving`** `Rally data when Receiving`

  data while this player's team was receiving

  - <a id="insights/role_data.receiving.oneself"></a>**`oneself`** `Rally Category Counts`

    data while this player's team was receiving and this player was the receiver

    - <a id="insights/role_data.receiving.oneself.kitchen_arrival"></a>**`kitchen_arrival`** [Count (integer)](#types/count) · ≥ 0

      number of times the player arrived near the kitchen line (for rallies with at least 3 shots)

    - <a id="insights/role_data.receiving.oneself.total"></a>**`total`** [Count (integer)](#types/count) · ≥ 0

      total number of rallies counted with player in this role and at least 3 shots

  - <a id="insights/role_data.receiving.partner"></a>**`partner`** `Rally Category Counts`

    data while this player's team was receiving and this player's partner was the receiver

    - <a id="insights/role_data.receiving.partner.kitchen_arrival"></a>**`kitchen_arrival`** [Count (integer)](#types/count) · ≥ 0

      number of times the player arrived near the kitchen line (for rallies with at least 3 shots)

    - <a id="insights/role_data.receiving.partner.total"></a>**`total`** [Count (integer)](#types/count) · ≥ 0

      total number of rallies counted with player in this role and at least 3 shots

- <a id="insights/role_data.serving"></a>**`serving`** `Rally data when Serving`

  data while this player's team was serving

  - <a id="insights/role_data.serving.oneself"></a>**`oneself`** `Rally Category Counts`

    data while this player's team was serving and this player was the server

    - <a id="insights/role_data.serving.oneself.kitchen_arrival"></a>**`kitchen_arrival`** [Count (integer)](#types/count) · ≥ 0

      number of times the player arrived near the kitchen line (for rallies with at least 4 shots)

    - <a id="insights/role_data.serving.oneself.total"></a>**`total`** [Count (integer)](#types/count) · ≥ 0

      total number of rallies counted with player in this role and at least 4 shots

  - <a id="insights/role_data.serving.partner"></a>**`partner`** `Rally Category Counts`

    data while this player's team was serving and this player's partner was the server

    - <a id="insights/role_data.serving.partner.kitchen_arrival"></a>**`kitchen_arrival`** [Count (integer)](#types/count) · ≥ 0

      number of times the player arrived near the kitchen line (for rallies with at least 4 shots)

    - <a id="insights/role_data.serving.partner.total"></a>**`total`** [Count (integer)](#types/count) · ≥ 0

      total number of rallies counted with player in this role and at least 4 shots


---

<a id="insights/shot"></a>

## Shot

`/insights/shot`

Version hashes: functional `55cebe8ad8dc2b82931ba746fda778e0`, full `f6a4f317e66ea9cd7e25b22ad8508b71`

Properties:

- <a id="insights/shot.advantage_scale"></a>**`advantage_scale`** `array of number` · optional · exactly 4 items · items: range [0, 1] · items may be null

  Positional advantage score in [0, 1] per player. The source depends on the game type:  - Doubles: derived from a state-value model that estimates rally win probability given four-player positions. Both teammates share the same score, opponent scores are the complement (1 - teammate score). At 0, p(win) is around 0.3, at 1 - around 0.7, well-calibrated but a function of positions only. Omitted when positions are outside the model's supported domain. - Singles: legacy y-axis depth heuristic preserved for ratings compatibility. The two unused player slots are null. The server's value is hardcoded to 0 on the serve.

- <a id="insights/shot.end_ms"></a>**`end_ms`** `integer`

  The time in milliseconds since the start of the video when the shot ended.

- <a id="insights/shot.errors"></a>**`errors`** `object` · optional

  Grouping for detected errors resulting from this shot. Omitted if there are no discernible errors.

  - <a id="insights/shot.errors.faults"></a>**`faults`** `object` · optional

    A fault is a type of error that violates the rules of the game, thus ending the rally. This includes both actual and potential faults (that were saved by the opponent, or somehow overlooked and didn't end the rally). Omitted if none were detected. If this field is present but `is_final` is false, it means play continued despite the fault (i.e., either players overlooked a fault or the AI detected a potential fault that was not called).

    - <a id="insights/shot.errors.faults.net"></a>**`net`** `boolean` · optional

      Present and `true` if the ball was stopped by the net. Omitted if the ball cleared the net (even if it touched).

    - <a id="insights/shot.errors.faults.out"></a>**`out`** `object` · optional

      Information about the ball potentially or actually going out.

      - <a id="insights/shot.errors.faults.out.direction"></a>**`direction`** `enum` · one of `"left"`, `"right"`, `"long"`

        The direction the ball was (potentially or actually) going out.

      - <a id="insights/shot.errors.faults.out.outcome"></a>**`outcome`** `enum` · one of `"landed"`, `"intercepted"`

        Whether the shot actually landed out, or was intercepted (erroneously) by an opponent.

      - <a id="insights/shot.errors.faults.out.side"></a>**`side`** `enum` · optional · one of `"near"`, `"far"`

        The side of the court the ball was (potentially or actually) going out if the direction is lateral (left or right). Omitted if not going out laterally.

    - <a id="insights/shot.errors.faults.short"></a>**`short`** `boolean` · optional

      Present and `true` if the ball is hit by the player to land on the same court side, before the net, but not out. Omitted otherwise.

  - <a id="insights/shot.errors.popup"></a>**`popup`** `enum` · optional · one of `"exploited"`, `"potential"`

    Set if we detect a definite or potential popup, which is currently
    defined as: either the shot popping up more than 3.5 feet from the strike point,
    or crossing the net at 2.2 feet above while popping up at least 2.6 feet from
    the strike point.

    `exploited` if it was exploited by the opponent team. `potential` if it was a popup that was not exploited. (Determined by whether it was volleyed)

  - <a id="insights/shot.errors.unforced"></a>**`unforced`** `boolean` · optional

    A fault is counted as unforced if:  - The player misses a serve.  - The player misses a return or a third shot, unless the opponent’s previous shot was clearly very high-quality.  - Later in the rally, the player faults against a dink or drop that produced an easy ball:  - If the player volleys that dink/drop, it is unforced.  - If the player lets it bounce, it is unforced only if the ball was inside the player’s easy reach zone (“bubble”).  A fault is not unforced if:  - The opponent hit a strong putaway.  - On a volley, the previous shot was not a dink or drop.  - For non-volleys, the ball was outside the player’s easy reach zone.

- <a id="insights/shot.is_final"></a>**`is_final`** `boolean`

  Whether this is the final shot in the rally.

- <a id="insights/shot.is_passing"></a>**`is_passing`** `boolean` · optional

  Whether this shot passed the *nearest* opponent without them touching it. Omitted if unknown.

- <a id="insights/shot.is_poach"></a>**`is_poach`** `boolean` · optional

  Whether this ball was hit closer to the non-hitter's position than the hitter's position along the width of the court, and in front of the non-hitter.

  The players' positions are measured at the time the previous shot was hit,
  and the ball's position is determined at the time the ball was hit by the receiving team.

  A poach is only possible if the ball is hit in front of the player the ball was poached from (their teammate).

  If the ball goes past the non-hitter and their partner hits it, it is not considered a poach,
  regardless of the x-axis differential between the players and the ball.

  Omitted if unknown.

- <a id="insights/shot.is_putaway"></a>**`is_putaway`** `boolean` · optional

  Whether this shot functioned as a putaway or rally finisher: a clean winner, or a strong/decisive attacking shot that directly creates the end of the rally. This can include a well-placed dink or drop winner, not only a hard-hit shot.

- <a id="insights/shot.is_reset"></a>**`is_reset`** `boolean` · optional

  Whether this shot takes significant pace off the ball. Omitted if unknown or not applicable.

- <a id="insights/shot.is_speedup"></a>**`is_speedup`** `boolean` · optional

  To be considered a speedup, the following conditions must be met:

  - the shot adds significant pace on the ball
  - the hitting player is near the kitchen
  - at least one of the opposing players is near the kitchen

  Omitted if unknown or not applicable.

- <a id="insights/shot.is_volley"></a>**`is_volley`** `boolean` · optional

  Whether this shot was a volley hit out of the air or not. Omitted if unknown.

- <a id="insights/shot.partner_positioning_score"></a>**`partner_positioning_score`** [Quality Score (number)](#types/quality_score) · optional · range [0, 1]

  Positioning quality score for the partner at this shot [0, 1], higher is better. Derived from the Stage 2 causal-frontier positioning model that estimates how well the partner is positioned relative to a strong-team baseline given the game context. Omitted for singles games, serves, returns, or when positions are outside the model's supported domain.

- <a id="insights/shot.player_id"></a>**`player_id`** [Player ID (integer)](#types/player_id) · range [0, 3]

  The ID of the player who hit the ball.

- <a id="insights/shot.player_positions"></a>**`player_positions`** `array of object` · optional · exactly 4 items · items may be null

  Player positions for all players at the time of the shot. Array of 4 elements, one for each player . Second player of each team is null for a singles game

  - <a id="insights/shot.player_positions[].x"></a>**`x`** `number`

    The x coordinate of the player position.

  - <a id="insights/shot.player_positions[].y"></a>**`y`** `number`

    The y coordinate of the player position.

- <a id="insights/shot.quality"></a>**`quality`** `object`

  an evaluation of the quality of the shot

  - <a id="insights/shot.quality.execution"></a>**`execution`** [Quality Score (number)](#types/quality_score) · optional · range [0, 1]

    how well the shot was executed

  - <a id="insights/shot.quality.overall"></a>**`overall`** [Quality Score (number)](#types/quality_score) · optional · range [0, 1]

    the overall quality of the shot (currently derived from the execution quality)

  - <a id="insights/shot.quality.pressure"></a>**`pressure`** [Quality Score (number)](#types/quality_score) · optional · range [0, 1]

    positional pressure faced and imposed by this shot [0, 1], higher means more pressure demand. Omitted for singles, serves, returns, or when positioning data is unavailable.

- <a id="insights/shot.resulting_ball_movement"></a>**`resulting_ball_movement`** `Resulting Ball Movement` · optional

  Stats related to how the ball moves as a result of being hit. Omitted if we couldn't track the ball after the shot was made.

  - <a id="insights/shot.resulting_ball_movement.angles"></a>**`angles`** `object`

    - <a id="insights/shot.resulting_ball_movement.angles.direction"></a>**`direction`** `string` · one of `"MidCrossLeft"`, `"MidCrossRight"`, `"DownTheMiddle"`, `"LeftToMiddle"`, `"LeftCrossRight"`, `"DownTheLineLeft"`, `"RightToMiddle"`, `"RightCrossLeft"`, `"DownTheLineRight"`

      Direction that the ball was hit from and to.

    - <a id="insights/shot.resulting_ball_movement.angles.pitch"></a>**`pitch`** `number` · range [-90, 90]

      The pitch angle, in degrees within a range of [-90, 90].

      - 0 degrees: straight shot (parallel to the ground)
      - 90 degrees: shot directly upwards (perpendicular to the ground)
      - -90 degrees: shot directly downwards (perpendicular to the ground)

    - <a id="insights/shot.resulting_ball_movement.angles.yaw"></a>**`yaw`** `number` · range [-180, 180]

      The yaw angle, in degrees within a range of (-180, 180].

      - 0 degrees: shot towards the left sideline (parallel to player's own baseline)
      - 90 degrees: shot towards the net directly (perpendicular to player's own baseline)
      - 180 degrees: shot towards the right sideline (parallel to player's own baseline)
      - Negative values are the same, but in the opposite direction (backwards).

  - <a id="insights/shot.resulting_ball_movement.crossed_net"></a>**`crossed_net`** `boolean`

    `true` if the ball crosses the net plane, else `false`. Note that this value will be `true` for ATPs (they cross the net plane without the ball necessarily ever going higher than the net).

  - <a id="insights/shot.resulting_ball_movement.distance"></a>**`distance`** `number`

    The distance the ball traveled (feet) before coming in contact with the net, court, paddle, etc.

  - <a id="insights/shot.resulting_ball_movement.distance_from_baseline"></a>**`distance_from_baseline`** `number` · optional

    The distance the ball landed from the opponent's baseline.

  - <a id="insights/shot.resulting_ball_movement.height_over_net"></a>**`height_over_net`** `number` · optional

    The height the ball in feet when it _reaches_ the plane of the net. This is
    omitted if the ball never reaches the net plane. A ball that reaches the net but
    does not go over will have this value set to the height of the ball when it
    reaches the net (usually this will be greater than 0 but lower than the net
    height). Similarly, a ball that grazes the net cord and topples over will have
    its height over the net as roughly the height of the net at that location.

    Note that the plane of the net exists at `y = 22`.

  - <a id="insights/shot.resulting_ball_movement.is_volleyed"></a>**`is_volleyed`** `boolean`

    Whether the ball was hit out of the air or not.

  - <a id="insights/shot.resulting_ball_movement.speed"></a>**`speed`** `number`

    Speed of the ball in MPH.

  - <a id="insights/shot.resulting_ball_movement.trajectory"></a>**`trajectory`** `Ball Flight Trajectory`

    Describes the estimated flight path of a ball after it was hit by the player.

    The ball essentially flies in a 2D projectile motion along a 2D plane. One dimension
    of this plane is aligned with the Z-axis. An estimation of its path through 3D space
    can be reconstructed from its initial flight characteristics and start and end
    points.

    - <a id="insights/shot.resulting_ball_movement.trajectory.confidence"></a>**`confidence`** [Prediction Confidence (number)](#types/confidence) · range [0, 1]

      Our confidence in this trajectory (based on our confidence in the start and end positions of the ball).

    - <a id="insights/shot.resulting_ball_movement.trajectory.end"></a>**`end`** `object`

      the end of the ball's flight which happens when it bounces, hits the net, is hit by a paddle, or flies out of the video frame

      - <a id="insights/shot.resulting_ball_movement.trajectory.end.location"></a>**`location`** [World XYZ](#types/world_position/3d)

        Location of the ball when it ended its flight.

      - <a id="insights/shot.resulting_ball_movement.trajectory.end.ms"></a>**`ms`** [Video Milliseconds (integer)](#types/video_time) · ≥ 0

        Number of milliseconds into the video when the ball ended its flight.

      - <a id="insights/shot.resulting_ball_movement.trajectory.end.zone"></a>**`zone`** [Zone (string)](#events/zone) · one of `"deep"`, `"mid"`, `"short"`, `"kitchen"`, `"net"`, `"out"`

        Zone where the ball ended its flight.

    - <a id="insights/shot.resulting_ball_movement.trajectory.peak"></a>**`peak`** [World XYZ](#types/world_position/3d)

      Location where the ball reached its highest (z) point.

    - <a id="insights/shot.resulting_ball_movement.trajectory.start"></a>**`start`** `object`

      the moment the ball starts flying after being hit

      - <a id="insights/shot.resulting_ball_movement.trajectory.start.location"></a>**`location`** [World XYZ](#types/world_position/3d)

        Location where the ball was hit.

      - <a id="insights/shot.resulting_ball_movement.trajectory.start.ms"></a>**`ms`** [Video Milliseconds (integer)](#types/video_time) · ≥ 0

        Number of milliseconds into the video when the ball was hit.

      - <a id="insights/shot.resulting_ball_movement.trajectory.start.zone"></a>**`zone`** `string` · one of `"deep"`, `"mid"`, `"short"`, `"kitchen"`

        Court zone that the ball was hit from

- <a id="insights/shot.shooter_movement_from_last_shot"></a>**`shooter_movement_from_last_shot`** [Vector](#types/vector) · optional

  Movement vector in feet that the shooter moved from their position during the previous shot, tracking x and y directions separately. Omitted for the first shot of the rally.

- <a id="insights/shot.shooter_positioning_score"></a>**`shooter_positioning_score`** [Quality Score (number)](#types/quality_score) · optional · range [0, 1]

  Positioning quality score for the shooter at this shot [0, 1], higher is better. Derived from the Stage 2 causal-frontier positioning model that estimates how well the shooter is positioned relative to a strong-team baseline given the game context. Omitted for singles games, serves, returns, or when positions are outside the model's supported domain.

- <a id="insights/shot.shot_type"></a>**`shot_type`** `string` · optional · one of `"smash"`, `"lob"`, `"dink"`, `"drop"`, `"drive"`, `"atp"`, `"erne"`

  - smash: an overhead or similar shot where the ball goes from high to low (no upward motion)
  - lob: a shot with a relatively high peak
  - dink: a shot that would land in or near the kitchen and which was hit from near the kitchen
  - drop: a shot that would land in or near the kitchen and was hit from the transition zone or deeper
  - drive: a shot that would land deep if not stopped by an opponent's paddle, opponent's body, or the net (and doesn't fall into an earlier categorization)
  - atp: an around-the-post shot, where the ball is hit outside the sideline and around the net post instead of over the net
  - erne: a shot hit from outside the sideline by the kitchen (based on when the player's feet first touch after a volley)

  Omitted if we can't confidently determine a shot type based on the ball's trajectory and other characteristics.

- <a id="insights/shot.start_ms"></a>**`start_ms`** `integer`

  The time in milliseconds since the start of the video when the shot started.

- <a id="insights/shot.stroke_side"></a>**`stroke_side`** `string` · optional · one of `"left"`, `"right"`

  The side of the body the stroke was made on. Omitted if unknown.

- <a id="insights/shot.stroke_type"></a>**`stroke_type`** `string` · optional · one of `"forehand"`, `"backhand"`

  The type of stroke used to hit the ball. Omitted if unknown.

- <a id="insights/shot.tags"></a>**`tags`** `map` · keys match `^.*$`

  Tags for shot features with nested paths using colon separators (e.g., "type:dink", "type:dink:push"). Each tag has optional confidence and quality scores.

  - <a id="insights/shot.tags.*"></a>**each value** `object`

    - <a id="insights/shot.tags.*.conf"></a>**`conf`** `number` · optional · range [0, 1]

      Our confidence score for the tag

    - <a id="insights/shot.tags.*.quality"></a>**`quality`** `number` · optional · range [0, 1]

      Quality evaluation (how good this aspect of the shot is)

- <a id="insights/shot.vertical_type"></a>**`vertical_type`** `string` · optional · one of `"dig"`, `"overhead"`, `"neutral"`

  Whether the shot was hit as a dig, overhead, or neutral. Omitted if unknown.

- <a id="insights/shot.winner_type"></a>**`winner_type`** `string` · optional · one of `"clean"`, `"forced_fault"`

  Whether the shot is a clean winner or forced an opponent fault. Omitted if this shot is not a winning shot.


---

<a id="types/confidence"></a>

## Prediction Confidence

`/types/confidence` · `number` · range [0, 1]

the confidence of a prediction

---

<a id="types/count"></a>

## Count

`/types/count` · `integer` · ≥ 0

An integer value greater than or equal to 0.

---

<a id="types/encoded_positions"></a>

## Encoded Positions

`/types/encoded_positions` · `string`

Scaled, base64 encoded integers between [0,127] representing the player's
position on the x or y dimension of the court.

To decode the array back to a list of integers in Python:
`value_list = [value for value in base64.b64decode(xs_encoded)]`

---

<a id="types/percentage"></a>

## Percentage

`/types/percentage` · `number` · range [0, 100]

A percentage value between 0 and 100.

---

<a id="types/player_id"></a>

## Player ID

`/types/player_id` · `integer` · range [0, 3]

Each player is assigned a unique ID in the range [0, 3]. This ID represents individual players
         participating in the game, with player ID 0’s data coming first and so on. For singles,
         only players 0 and 2 are used. For drills, any number of players between 1 and 4 can participate.

         
Each game can consist of one or two teams, depending on the game type:

- **Singles**: One player per team, using player 0 (team 0) and player 2 (team 1).
- **Doubles**: Two players per team, with players 0 and 1 on team 0, and players 2 and 3 on team 1.
- **Drill**: No fixed teams; between 1-4 players participate or a ball machine is used.

_Team 0 (for singles and doubles)_
* Player 0 starts the first rally from the side of the court containing the origin (far side).
* In doubles, player 1 is also on team 0.

_Team 1 (for doubles and singles)_
* Player 2 serves first for team 1.
* In doubles, player 3 is also on team 1.

---

<a id="types/quality_score"></a>

## Quality Score

`/types/quality_score` · `number` · range [0, 1]

A measure of quality where 1 is the best score.

---

<a id="types/session"></a>

## Session

`/types/session`

Defines aspects of the session or game being played.

Version hashes: functional `bc2200cd637ec98b8f33e3396ff0f7de`, full `ac272105692acf5b3bf1dfc6454bf4a2`

Properties:

- <a id="types/session.num_players"></a>**`num_players`** `integer` · range [1, 4]

  The number of players in the session.

- <a id="types/session.session_index"></a>**`session_index`** `integer`

  Index of this session within the play session (starts at 0)

- <a id="types/session.session_type"></a>**`session_type`** `enum` · one of `"game"`, `"drill"`

  The type of session being played

- <a id="types/session.vid"></a>**`vid`** `string`

  Video identifier


---

<a id="types/vector"></a>

## Vector

`/types/vector`

2D vector with x and y components, used to represent directional movement or displacement.

Version hashes: functional `52c5efc860d33057036888f4590cff6d`, full `3a8a1caf69b6dd79c6db340fcd07ea1e`

Properties:

- <a id="types/vector.x"></a>**`x`** `number`

  X component of the vector (movement parallel to the net)

- <a id="types/vector.y"></a>**`y`** `number`

  Y component of the vector (ground movement perpendicular to the net)


---

<a id="types/version"></a>

## Version

`/types/version` · `string` · matches `^\d+\.\d+\.\d+(-[^\s]+)?$`

a version string matching x.x.x where x represents one or more digits

---

<a id="types/video_time"></a>

## Video Milliseconds

`/types/video_time` · `integer` · ≥ 0

some number of milliseconds into a video

---

<a id="types/world_position/3d"></a>

## World XYZ

`/types/world_position/3d`

a position in feet relative to the far left court corner

Version hashes: functional `36ae84d4fc788ce7578d53575af22b13`, full `78d4176a9a79a1638fcb60cb5be432a7`

Properties:

- <a id="types/world_position/3d.corrected"></a>**`corrected`** `boolean` · optional

  true if this position was corrected post-CV

- <a id="types/world_position/3d.x"></a>**`x`** `number`

  distance along the court's 20ft width (baseline)

- <a id="types/world_position/3d.y"></a>**`y`** `number`

  distance the court's 44ft length (sideline)

- <a id="types/world_position/3d.z"></a>**`z`** `number` · ≥ 0

  feet above the ground
