CYCLINGdata api2 races live

Cycling Data API documentation

Build with every stage.

Teams

Team history

One team across all its seasons and sponsor names, from any one of its seasons.

GET/v1/teams/{id}/historyLive, Archive and Complete

Your keyNot saved in this browser. Paste it to run the examples, or get a free key.

Request

curl "https://api.cyclingapi.com/v1/teams/tm_n9sr4w03/history" \
  -H "Authorization: Bearer YOUR_KEY"
$ch = curl_init('https://api.cyclingapi.com/v1/teams/tm_n9sr4w03/history');
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_KEY']]);
$data = json_decode(curl_exec($ch), true);
import requests
r = requests.get("https://api.cyclingapi.com/v1/teams/tm_n9sr4w03/history",
  headers={"Authorization": "Bearer YOUR_KEY"})
data = r.json()
const r = await fetch("https://api.cyclingapi.com/v1/teams/tm_n9sr4w03/history", {
  headers: { Authorization: "Bearer YOUR_KEY" } });
const data = await r.json();
Try itRuns from this page with your saved key. Needs a paid plan.

Parameters

NameTypeNeedAbout
idpathRequiredTeam id (tm_...)

Example answer

Response200 OK · application/json

{
    "data": {
        "line": "",
        "name": "Tour de France",
        "code": "ABC",
        "country": "FRA",
        "discipline": "road",
        "first_season": 1869,
        "last_season": 0,
        "season_count": 0,
        "names": [],
        "seasons": 9
    }
}

Fields

FieldTypeMeaning
linestringThe continuous team: one discipline, code and country held in consecutive seasons
namestringThe team's name in its latest season
codestringShort code (team code, or three-letter nation code)
countrystringThree-letter country code where the race is held
disciplinestringDiscipline: road, track, cyclocross, mtb, bmx, gravel
first_seasonintegerFirst season of the continuous team
last_seasonintegerLatest season of the continuous team
season_countintegerNumber of seasons the continuous team ran
namesarrayEach sponsor name the team raced under, with the first and last season of it
seasonsarrayEvery season within your plan: year, team season id, name and category

Limits

PlansLive, Archive and Complete; each reads its own window of seasons (plans and windows)
RateFree key 10 a minute, Live 60 a minute, Archive 60 a minute, Complete 120 a minute
RowsOne answer
Kept for1.1 hours; the X-Cache header says whether the answer was stored (hit) or worked out now (build), and X-Cache-Age how old it is
Errors401 unauthorized, 400 bad_request, 403 upgrade_required, 404 not_found, 429 rate_limited (errors)
CountedEach call counts toward your allowance