# GET /v2/players/{id}/national-team

Group: Players

Caps, goals and debut date for every national side the player has represented, at senior and youth level.

Plans: Every plan, Free included.

Note: Returns an empty array if the player has never appeared for a national team, or if the source keeps no record of it.

## Parameters

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

## Response

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

## Errors

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/players/{id}/national-team"
```

TypeScript:

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

Python:

```python
res = client.players.national_team(id)
```

Go:

```go
res, err := client.Players.NationalTeam(ctx, id)
```

CLI:

```bash
$ dsa players national-team <id>
```

## Example response

```json
{ "data": [ { "team": { "id": 412, "name": "England", "code": "ENG", … }, "appearances": 59, "goals": 19, "debut": "2020-10-08T00:00:00.000Z" } ],
  "meta": { "count": 1 } }
```

---

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/players/national-team/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
