Player record and splits
player_statsOne player's record over completed singles matches from 2023 onward, by default the last 365 days. It gives W/L overall, over the last 12 months and by surface, venue, level and season. It also gives tiebreaks, deciding sets, the record after winning or losing the first set, comebacks, withdrawals and the last N matches. Every count carries its sample size, and a percentage on an empty sample is null, never 0. On ULTRA it adds serve_return: measured serve and return statistics summed over the window. Singles only, so a doubles-team id is refused. For 1968 to 2022 use get_archive_career. Requires the PRO plan (serve_return requires ULTRA).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Window end: YYYY-MM-DD (the whole of that day) or a UTC ISO-8601 instant. Default now. | |
| from | No | Window start: YYYY-MM-DD (start of that day) or a UTC ISO-8601 instant. Default to minus 365 days. | |
| last | No | How many recent matches to list, newest first (1-50, default 20). | |
| level | No | The match tour. A match with no stated tour matches no level. | |
| surface | No | hard, clay or grass read the match surface; indoor keeps matches stated indoor, on any surface. | |
| player_id | Yes | Player id, as returned by search_players. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the request succeeded, including when the answer is an empty list. False for a missing or rejected key, a plan that does not include this data, an unknown id, a rate limit or a network error. The message then says what to do. check_api_status is the exception: it is true whenever the API answered, and reports API key problems in the message. | |
| sets | No | Set-based record: sample, tiebreaks, deciding_sets, after_winning_first_set, after_losing_first_set, comebacks, sets. | |
| player | No | The player. | |
| recent | No | The last N matches, newest first. | |
| window | No | The window applied, UTC. | |
| message | Yes | Human-readable summary of the result, safe to relay to the user verbatim. | |
| overall | No | W/L over the window. | |
| by_level | No | W/L keyed by match tour, or unknown. | |
| by_venue | No | W/L keyed indoor, outdoor, unknown. | |
| by_season | No | W/L keyed by UTC calendar year. | |
| by_surface | No | W/L keyed hard, clay, grass, unknown. | |
| withdrawals | No | Retired / walkover / default, each as given (this player) and received (the opponent). | |
| serve_return | No | ULTRA only, null below: summed serve and return statistics, each ratio as numerator/denominator/pct with its match count. | |
| last_12_months | No | W/L over the 12 months ending at the window end. |