# GET /v2/teams/{id}/recent-leagues

Group: Teams

Tennis: the tournaments a player has entered lately, the latest first, each with the furthest round he reached and whether he took the title.

Plans: Every plan, Free included.

Note: Anyone who is not a tennis player gives an empty array. To list his matches in singles or in doubles only, call /v2/teams/{id}/fixtures with type=recent and discipline.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | DataSportsAPI team id, a positive integer |

## Response

- `data`: `RecentLeague[]`
- `meta`: count
- Objects: RecentLeague (https://datasportsapi.com/markdown/reference.md#recentleague)

## Errors

- 404 not_found — DataSportsAPI has never assigned this id

Plus the errors every /v2 call shares (https://datasportsapi.com/markdown/docs/errors.md).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/teams/{id}/recent-leagues"
```

TypeScript:

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

Python:

```python
res = client.teams.recent_leagues(id)
```

Go:

```go
res, err := client.Teams.RecentLeagues(ctx, id)
```

CLI:

```bash
$ dsa teams recent-leagues <id>
```

## Example response

```json
{ "data": [ { "league": { "id": 200810, "name": "Australian Open, Men", … }, "round": "Semifinals", "won": false }, … ],
  "meta": { "count": 9 } }
```

---

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/recent-leagues/ · Group: https://datasportsapi.com/markdown/docs/teams.md · All docs: https://datasportsapi.com/markdown/docs.md · Data model: https://datasportsapi.com/markdown/reference.md
