# Procyclingstats — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access comprehensive professional cycling data including race results, team rosters, and rider victory rankings to analyze performance and track statistics across the sport. Build cycling applications that deliver real-time insights into races, teams, and top-performing athletes.

**Category:** Sports | **Website:** [procyclingstats.com/](https://procyclingstats.com/) | **Docs:** [parse.bot/marketplace/5e1fc7dd-2556-4f19-a5ec-1b945e990340/procyclingstats-com-api](https://parse.bot/marketplace/5e1fc7dd-2556-4f19-a5ec-1b945e990340/procyclingstats-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_all_teams

Extract a list of professional cycling teams (WorldTour and ProTeams) and their countries for a given year. Returns team names and two-letter country codes. The list includes all UCI WorldTeam and ProTeam registered squads for the specified season.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `year` | string | No | The year to retrieve teams for (e.g. '2024', '2023'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_all_teams \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"year":"<string>"}'
```

### get_race_results

Extract detailed race metadata and results for a specific event (stage or one-day race). Returns race information such as date, distance, departure/arrival cities, stage type, elevation gain, profile/map image URLs, jersey leader classifications after the stage, and a full list of finishing positions with rider names, teams, times, and UCI points. The url parameter is the path portion on ProCyclingStats (e.g. 'race/tour-de-france/2024/stage-1' or 'race/milano-sanremo/2024'). Metadata fields vary by race type; results are ordered by finishing position.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The race URL path on ProCyclingStats (e.g. 'race/tour-de-france/2024/stage-1' or 'race/milano-sanremo/2024'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_race_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_race_riders

Extract the full startlist/roster of riders entered in a race. Returns rider names, team affiliations, nationalities, and bib numbers. The url parameter is the path portion on ProCyclingStats (e.g. 'race/tour-de-france/2024/startlist'). Results are auto-iterated (single page).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The race startlist URL path on ProCyclingStats (e.g. 'race/tour-de-france/2024/startlist'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_race_riders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_race_stages

Extract stage-by-stage route information from a race's stage profiles page. Returns one record per stage with distance, elevation, profile scores, and time trial indicators. The url parameter is the race stage profiles path on ProCyclingStats (e.g. 'race/tour-de-pologne/2026/route/stage-profiles'). Results are auto-iterated (single page).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The race stage profiles URL path on ProCyclingStats (e.g. 'race/tour-de-pologne/2026/route/stage-profiles'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_race_stages \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_race_standings

Extract the full classification standings table for a Tour de France or other stage race classification. Returns ordered standings with rider positions, time gaps (or points), team names, and UCI points. Supports general classification (gc), points, king of the mountains (kom), and youth classification URLs. Results are auto-iterated (single page).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The classification URL path on ProCyclingStats (e.g. 'race/tour-de-france/2024/gc', 'race/tour-de-france/2024/points', 'race/tour-de-france/2024/kom', 'race/tour-de-france/2024/youth'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_race_standings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_rider_profile

Extract a rider's profile information from their ProCyclingStats page. Returns numeric ID, name, nationality, date of birth, current team, profile photo URL, PCS ranking, and career victories count. The url parameter is the rider path (e.g. 'rider/tadej-pogacar').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The rider URL path on ProCyclingStats (e.g. 'rider/tadej-pogacar', 'rider/jonas-vingegaard'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_rider_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_rider_recent_results

Extract a rider's most recent race results from their ProCyclingStats profile. Returns the last 20 actual race/stage results (excluding overall classification standings like GC/points/KOM). Each result includes date, race name, stage name if applicable, finishing position, distance, vertical meters, and PCS points earned. Profile score is not available from this source and is returned as null. Results are ordered by date descending (most recent first).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The rider URL path on ProCyclingStats (e.g. 'rider/jonathan-milan', 'rider/tadej-pogacar'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_rider_recent_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_rider_results_by_tier

Extract a rider's PCS points and win counts from the last 24 months, broken down by race tier/category. Fetches the rider's results for each relevant season, filters to the 24-month window, and categorizes each result into one of seven tiers: GT overall (Grand Tour GC/classifications), GT stage (Grand Tour individual stages), Monument (the five classics), WorldTour one-day (other 1.UWT races), WorldTour stage (other 2.UWT stage race results), ProSeries (1.Pro/2.Pro), and 1.1/1.2/2.1/2.2 (lower-tier races). Each tier entry includes total PCS points earned and number of wins. Results are auto-iterated (single page).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The rider URL path on ProCyclingStats (e.g. 'rider/jonathan-milan', 'rider/tadej-pogacar'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_rider_results_by_tier \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_rider_upcoming_races

Extract a rider's upcoming race schedule from their ProCyclingStats profile page, including remaining stages of any in-progress multi-stage race. Detects active stage races (e.g. Tour de France currently running) from the rider's profile, fetches remaining stages from today onwards, and merges them with the rider's other planned future races. Results are deduplicated and ordered by date ascending. Each entry includes race name, URL, date, and optionally start time and race category.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The rider URL path on ProCyclingStats (e.g. 'rider/tadej-pogacar', 'rider/remco-evenepoel'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_rider_upcoming_races \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_startlist_form

Extract per-rider PCS form scores and current PCS ranking positions from a race startlist. Fetches the form page for form scores and the top-competitors page for PCS rankings, merging both into a single record per rider. Returns all riders on the startlist, not just the top 20 visible on the page. Riders without recent form have form_score of '0'. Results are auto-iterated (single page).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The race startlist form URL path on ProCyclingStats (e.g. 'race/tour-de-pologne/2026/startlist/form'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_startlist_form \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_startlist_specialties

Extract per-rider PCS specialty points from a race startlist. Parses all six specialty tables (GC, Time Trial, Sprint, One Day Races, Climber, Hills) including hidden rows, and returns one merged record per rider with their points in each category. Riders not ranked in a category have null for that field. Results are auto-iterated (single page).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The race startlist specialties URL path on ProCyclingStats (e.g. 'race/tour-de-pologne/2026/startlist/best-per-specialty'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_startlist_specialties \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_team_riders

Extract the list of riders on a professional cycling team's roster for a given season. Returns the team's numeric ID, plus rider names, profile URLs, nationalities, PCS world rankings, and accumulated PCS points. The url parameter is the team path on ProCyclingStats (e.g. 'team/alpecin-deceuninck-2024'). Results are auto-iterated (single page).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The team URL path on ProCyclingStats (e.g. 'team/alpecin-deceuninck-2024', 'team/uae-team-emirates-xrg-2026'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_team_riders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_top_competitors

Extract per-rider PCS top-competitors scores from a race startlist. Returns all riders on the startlist with their aggregated PCS score for that specific race. The page may show only the top rows by default, but the endpoint extracts all riders including hidden rows. Results are auto-iterated (single page).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The race startlist top-competitors URL path on ProCyclingStats (e.g. 'race/tour-de-pologne/2026/startlist/top-competitors'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_top_competitors \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_victory_ranking

Extract a ranking of professional cyclists by their total number of all-time career victories. Returns the top 100 riders sorted by victory count descending. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-procyclingstats-com-api-5e1fc7dd/get_victory_ranking \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
