National team
GET
/
View as MarkdownTry in Playground →
Caps, goals and debut date for every national side the player has represented, at senior and youth level.
Returns an empty array if the player has never appeared for a national team, or if the source keeps no record of it.
Parameters
idpathrequired
DataSportsAPI player id, a positive integer
Response
- data
NationalTeamRecord[]- meta
- count
Any /v2 call can also come back with one of the common errors.
curl -H "Authorization: Bearer sk_live_…" \
"https://api.datasportsapi.com/v2/players/{id}/national-team"Example
{ "data": [ { "team": { "id": 412, "name": "England", "code": "ENG", … }, "appearances": 59, "goals": 19, "debut": "2020-10-08T00:00:00.000Z" } ],
"meta": { "count": 1 } }