# GET /v2/teams/{id}/year-statistics

Group: Teams

A tennis player’s calendar year by surface, one row each: matches and wins, tournaments entered and won, aces and double faults, break points, tie-breaks, serve and return points, winners and unforced errors.

Plans: Every plan, Free included.

Note: Derived fields: servicePoints = firstServesIn + secondServes and secondServesIn = secondServes − doubleFaults. Team sports, and years in which the player had no matches, return an empty list.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | DataSportsAPI team id, a positive integer |
| `year` | query | yes | calendar year such as 2026 |

## Response

- `data`: `TennisYearStatistics[]`
- `meta`: year, count
- Objects: TennisYearStatistics (https://datasportsapi.com/markdown/reference.md#tennisyearstatistics)

## Errors

- 400 bad_request — year is absent or malformed
- 403 history_not_in_plan — the year finished before your plan’s history window begins

Plus the common errors (https://datasportsapi.com/markdown/docs.md#errors).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/teams/{id}/year-statistics?year=…"
```

TypeScript:

```ts
const { data, meta } = await client.teams.yearStatistics(id, { year });
```

Python:

```python
res = client.teams.year_statistics(id, year=year)
```

Go:

```go
res, err := client.Teams.YearStatistics(ctx, id, &datasportsapi.TeamsYearStatisticsParams{Year: year})
```

CLI:

```bash
$ dsa teams year-statistics <id> --year <year>
```

## Example response

```json
{ "data": [ { "surface": { "type": "grass", "indoor": null, "name": "Grass" }, "matches": 7, "wins": 7, "tournamentsPlayed": 1, "tournamentsWon": 1,
      "aces": 128, "doubleFaults": 18, "servicePoints": 723, "firstServesIn": 474, "firstServePointsWon": 400, "secondServes": 249, "secondServesIn": 231,
      "secondServePointsWon": 144, "breakPointsConverted": 25, "breakPointChances": 69, "breakPointsFaced": 22, "breakPointsLost": 6,
      "tiebreaksWon": 5, "tiebreaksLost": 2, "winners": 319, "unforcedErrors": 188 }, … ],
  "meta": { "year": 2026, "count": 3 } }
```

---

Base URL: https://api.datasportsapi.com. Authenticate each /v2 call with the header `Authorization: Bearer <key>` (secret keys begin with `sk_live_`).
HTML: https://datasportsapi.com/docs/teams/year-statistics/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
