TeamsEndpoint 46 of 116
Position history
https://api.datasportsapi.com/
- Plan
- All plans
- Auth
Bearer dsa_live_…- Parameters
- 3 required · 0 optional
- Returns
PositionHistoryPoint[]
Tracks a team’s league position week by week through one season, starting at week 1: the position at the end of each week and the fixtures played in it.
Worth knowing
Works only for league competitions that have a table, not for cups. In a week without a match, the previous week’s position carries over.
01Parameters
idpathRequiredDataSportsAPI team id, a positive integer
leaguequeryRequiredleague id, for instance one returned by /v2/teams/{id}/leagues
seasonqueryRequiredseason id, as listed by /v2/leagues/{id}/seasons
02Request
The same call from the command line and each SDK. The SDK lines assume a client created with your key; left out, it is read from DATASPORTSAPI_API_KEY. Installing a client: SDKs & CLI.
curl -H "Authorization: Bearer dsa_live_…" \
"https://api.datasportsapi.com/v2/teams/{id}/position-history?league=…&season=…"03Response
The top-level keys of the JSON body. Each object links to its full shape in the data reference.
dataPositionHistoryPoint[]meta- league, season, count
{ "data": [ { "week": 1, "from": "2026-08-21", "to": "2026-08-27", "position": 2, "fixtureIds": [201101] },
{ "week": 2, "from": "2026-08-28", "to": "2026-09-03", "position": 1, "fixtureIds": [201188] }, … ],
"meta": { "league": 195828, "season": 200386, "count": 9 } }04Errors
- 400
bad_requestleague or season is absent or malformed
- 403
history_not_in_planthe season finished before your plan’s history window begins
- 404
no_datathe source holds no position history for this team, league and season (an id DataSportsAPI never assigned gives 404 not_found instead)
- 404
not_foundthe season id does not belong to this league; the error message names the offending parameter, and /v2/leagues/{id}/seasons lists the valid ones
unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code