# Whatsonzwift — 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.

> Browse Zwift's complete workout library, view training plan schedules, and access detailed workout specifications including intervals, durations, TSS values, and intensity zones. Find group workouts and explore available training plans.

**Category:** Sports | **Website:** [whatsonzwift.com/](https://whatsonzwift.com/) | **Docs:** [parse.bot/marketplace/f63c8119-1263-4219-b942-6a0e694da30a/whatsonzwift-com-api](https://parse.bot/marketplace/f63c8119-1263-4219-b942-6a0e694da30a/whatsonzwift-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-whatsonzwift-com-api-f63c8119/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_all_collections

List all workout collections, training plans, and legacy collections available on Zwift. Returns an array of collection objects classified by type (collection, plan, or legacy_collection). Each entry includes a slug usable as input to get_collection_details.

**Estimated cost:** Metered

_No parameters required._

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

### get_collection_details

Get all workouts within a collection or training plan. For structured plans, includes week grouping. Returns the collection title, description, and a list of workouts with their metadata (name, slug, duration, TSS, week). Each workout slug can be passed to get_workout_details for full interval breakdowns.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Collection or plan slug from get_all_collections results (e.g. 'build-me-up', 'endurance'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-whatsonzwift-com-api-f63c8119/get_collection_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_group_workouts

List all currently scheduled group workout events on Zwift. Returns events happening today and in the near future, including event details, start times, routes, and group categories. Events are deduplicated by event ID and start time.

**Estimated cost:** Metered

_No parameters required._

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

### get_workout_details

Get full details for a specific workout including description, interval steps, intensity zones, duration, and TSS. Steps describe each interval segment with duration, cadence, and power targets. Zones show time distribution across Z1-Z6 power zones.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `collection_slug` | string | Yes | Parent collection or plan slug (e.g. 'build-me-up'). Available from get_all_collections or get_collection_details. |
| `workout_slug` | string | Yes | Workout slug (e.g. 'week-1-devedeset'). Available from get_collection_details results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-whatsonzwift-com-api-f63c8119/get_workout_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"collection_slug":"<string>","workout_slug":"<string>"}'
```
