# Worldsurfleague — 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 World Surf League competition data including event schedules, heat-by-heat results, athlete profiles, and tour rankings. Retrieve detailed statistics and standings across all WSL tours.

**Category:** Sports | **Website:** [worldsurfleague.com/](https://worldsurfleague.com/) | **Docs:** [parse.bot/marketplace/78839bb0-be93-4b35-a89d-db38c3867e4c/worldsurfleague-com-api](https://parse.bot/marketplace/78839bb0-be93-4b35-a89d-db38c3867e4c/worldsurfleague-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-worldsurfleague-com-api-78839bb0/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_athlete_profile

Get full profile of an athlete including personal details and career event results. Returns hometown, stance, age, height, and a list of competition results with placements and points. Requires athlete_id and slug obtainable from get_athletes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `athlete_id` | string | Yes | Athlete ID from get_athletes results |
| `slug` | string | Yes | Athlete slug from get_athletes results |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-worldsurfleague-com-api-78839bb0/get_athlete_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"athlete_id":"<string>","slug":"<string>"}'
```

### get_athletes

Search for athletes by name or filter by tour. Returns a list of matching athletes with their IDs, slugs, names, and profile URLs. Without parameters, returns athletes visible on the default athletes page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | Athlete name to search for |
| `tour` | string | No | Tour code to filter athletes (e.g. mct, wct, mcs, wcs) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-worldsurfleague-com-api-78839bb0/get_athletes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","tour":"<string>"}'
```

### get_event_results

Get results for a specific event including rounds and heats with athlete scores. Each heat includes athlete names, scores, score breakdowns, and winner status. Requires event identifiers obtainable from get_event_schedule.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `event_id` | string | Yes | Event ID from get_event_schedule results |
| `slug` | string | Yes | Event slug from get_event_schedule results |
| `tour` | string | Yes | Tour code from get_event_schedule results (e.g. ct, qs) |
| `year` | string | Yes | Year of the event from get_event_schedule results |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-worldsurfleague-com-api-78839bb0/get_event_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event_id":"<string>","slug":"<string>","tour":"<string>","year":"<string>"}'
```

### get_event_schedule

Get event schedule for a specific year and optional tour. Returns a list of events with IDs, tour codes, slugs, names, dates, locations, and status. Events include all information needed to call get_event_results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tour_code` | string | No | Tour code to filter events (e.g. ct, qs, lt, bwt) |
| `year` | string | No | Year to fetch schedule for |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-worldsurfleague-com-api-78839bb0/get_event_schedule \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tour_code":"<string>","year":"<string>"}'
```

### get_heat_details

Get detailed wave-by-wave scores for a specific heat. Returns individual wave scores for each athlete and optional fantasy statistics. Requires heat_id from get_event_results and the same event identifiers.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `event_id` | string | Yes | Event ID from get_event_schedule results |
| `heat_id` | string | Yes | Heat ID from get_event_results heats[*].id |
| `slug` | string | Yes | Event slug from get_event_schedule results |
| `tour` | string | Yes | Tour code (e.g. ct) |
| `year` | string | Yes | Year of the event |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-worldsurfleague-com-api-78839bb0/get_heat_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event_id":"<string>","heat_id":"<string>","slug":"<string>","tour":"<string>","year":"<string>"}'
```

### get_tour_rankings

Get tour rankings for a specific year and tour. Returns ranked list of athletes with their points, ordered by ranking position. Covers all WSL tour types including Championship Tour and Challenger Series for both men and women.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tour` | string | No | Tour code (mct, wct, mcs, wcs, mqs, wqs) |
| `year` | string | No | Year for rankings |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-worldsurfleague-com-api-78839bb0/get_tour_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tour":"<string>","year":"<string>"}'
```
