Skip to content
API v2 docs

Players

Last 12 months

GET

/v2/players/{id}/last-year

Pro and up

Markdown copyOpen in the playground →

A player’s past twelve months as one timeline, oldest first: every match he played with his rating, minutes, goals, assists and expected goals, the matches he sat on the bench or missed (with the reason), his injuries and his transfers, plus the leagues those lines refer to.

Each line has a type (match, bench, missing, injury, transfer). The match figures are filled on match lines only and are null on the others; missingReason is set on missing lines. Football and ice hockey only, for the players the source tracks this way; anyone else gets two empty lists. Lines dated before your plan’s history are left out, and meta.historyFrom then gives the first day included.

Parameters

id

pathrequired

DataSportsAPI player id, a positive integer

Response

meta
count (lines), and historyFrom if your plan caused older lines to be dropped
errors
404 not_found — DataSportsAPI has never issued this player id

The errors every /v2 call shares (key, plan, quota, rate) are listed under error codes.

curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/players/{id}/last-year"
Example
{ "data": { "entries": [ { "type": "match", "at": "2025-12-02T20:00:00.000Z", "fixtureId": 201554, "playedForId": 4402, "leagueId": 200008,
      "rating": 5.4, "minutesPlayed": 67, "goals": 0, "assists": 0, "expectedGoals": 1.23, "goalsConceded": 1, "saves": 0, "missingReason": null },
      { "type": "missing", "at": "2026-03-03T20:00:00.000Z", "fixtureId": 201990, …, "missingReason": "injury" }, … ],
    "leagues": [ { "id": 200008, "name": "LaLiga", … } ] },
  "meta": { "count": 69 } }