{
  "openapi": "3.0.1",
  "info": {
    "title": "Cycling Races, Riders & Results",
    "description": "Professional cycling data: race calendar, startlists, stage and GC results, rider profiles with specialty points, and UCI/team/nation rankings. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "9AVELGj7QQoi67j7x"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapermaster~cycling-races-riders-results/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapermaster-cycling-races-riders-results",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapermaster~cycling-races-riders-results/runs": {
      "post": {
        "operationId": "runs-sync-scrapermaster-cycling-races-riders-results",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapermaster~cycling-races-riders-results/run-sync": {
      "post": {
        "operationId": "run-sync-scrapermaster-cycling-races-riders-results",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "calendar",
              "startlist",
              "results",
              "rider",
              "rankings"
            ],
            "type": "string",
            "description": "What to extract. calendar: races of a season. startlist: riders entered in a race. results: finishers of a stage / the final classification. rider: rider profiles. rankings: season or rolling rankings.",
            "default": "calendar"
          },
          "year": {
            "title": "Season (year)",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Season used by calendar and rankings. In startlist and results it is only used for race entries given as a bare slug (for example \"tour-de-france\").",
            "default": 2026
          },
          "circuit": {
            "title": "Calendar circuit (calendar mode)",
            "enum": [
              "",
              "1",
              "24",
              "26",
              "2",
              "13",
              "11",
              "12",
              "14",
              "18",
              "16",
              "15",
              "17",
              "23"
            ],
            "type": "string",
            "description": "Which circuit to list. Leave on 'All circuits' for every race of the year.",
            "default": "1"
          },
          "startDate": {
            "title": "Races ending on/after (calendar mode)",
            "type": "string",
            "description": "Optional ISO date (YYYY-MM-DD). Races that finish before this date are skipped."
          },
          "endDate": {
            "title": "Races starting on/before (calendar mode)",
            "type": "string",
            "description": "Optional ISO date (YYYY-MM-DD). Races that start after this date are skipped."
          },
          "includeStagesCount": {
            "title": "Look up number of stages (calendar mode)",
            "type": "boolean",
            "description": "Opens each race page to count its stages. One extra request per race, so it is slower. Off by default.",
            "default": false
          },
          "raceUrls": {
            "title": "Races (startlist and results modes)",
            "type": "array",
            "description": "Race page URLs or short paths, one per line, for example https://www.procyclingstats.com/race/tour-de-france/2025 or race/tour-de-france/2025. URLs copied from the calendar output work as they are.",
            "default": [
              "race/tour-de-france/2025"
            ],
            "items": {
              "type": "string"
            }
          },
          "stage": {
            "title": "Stage (results mode)",
            "type": "string",
            "description": "gc = final classification (or the result of a one-day race). A number such as 5 = that stage. prologue = the prologue. all = every stage of the race, one after another (one request per stage).",
            "default": "gc"
          },
          "riderUrls": {
            "title": "Rider URLs (rider mode)",
            "type": "array",
            "description": "Rider page URLs or paths, for example rider/tadej-pogacar.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "riderNames": {
            "title": "Rider names (rider mode)",
            "type": "array",
            "description": "Plain rider names such as \"Jonas Vingegaard\". The name is converted to a profile address, so unusual spellings may not be found; use a URL in that case.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lookupUciRanking": {
            "title": "Look up UCI ranking (rider mode)",
            "type": "boolean",
            "description": "Reads up to the first 500 places of the UCI individual ranking (at most five extra requests, shared by all riders) to fill uciRanking and uciPoints.",
            "default": true
          },
          "rankingType": {
            "title": "Ranking type (rankings mode)",
            "enum": [
              "individual",
              "team",
              "nations",
              "uciIndividual"
            ],
            "type": "string",
            "description": "Which ranking table to read.",
            "default": "individual"
          },
          "rankingScope": {
            "title": "Ranking scope (rankings mode)",
            "enum": [
              "season",
              "rolling"
            ],
            "type": "string",
            "description": "season = points scored in the chosen year (end of that year, or today for the current year). rolling = the current rolling ranking; the year is ignored.",
            "default": "season"
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on the number of result rows. The run also stops when your maximum charge for the run is reached.",
            "default": 20
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Requests in flight at the same time (1 to 3). Small random pauses are added between requests regardless.",
            "default": 2
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}