# AFL — 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 live AFL match scores, team standings, player statistics, and fixture schedules directly from official sources. Search player profiles, view news updates, and track competition rounds and seasons all in one place.

**Category:** Sports | **Website:** [afl.com.au/](https://afl.com.au/) | **Docs:** [parse.bot/marketplace/508b1148-40e1-4eec-9a42-76600a2f654e/afl-com-au-api](https://parse.bot/marketplace/508b1148-40e1-4eec-9a42-76600a2f654e/afl-com-au-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-afl-com-au-api-508b1148/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_competitions

Retrieve all AFL competitions (e.g., Premiership, AFLW, VFL). Each competition has a stable numeric ID and a provider ID used across the API.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_competitions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_fixture

Retrieve match schedule and fixture for a season. Optionally filter by round number. Returns match details including teams, scores, venues, and status.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `competition_id` | string | No | Competition ID. |
| `round_number` | string | No | Filter by round number (e.g., '1', '10'). Omitting returns all rounds. |
| `season_id` | string | Yes | Numeric season ID (e.g., '85' for 2026). Obtain from get_seasons. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_fixture \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"competition_id":"<string>","round_number":"<string>","season_id":"<string>"}'
```

### get_ladder

Retrieve team standings and ladder for a season. Returns current ladder positions, win/loss records, percentage, form, and round-by-round comparison.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `season_id` | string | Yes | Numeric season ID (e.g., '85' for 2026). Obtain from get_seasons. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_ladder \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"season_id":"<string>"}'
```

### get_match_centre

Retrieve detailed match data, scores, and player statistics for a specific match. Returns quarter-by-quarter scores, score worm, and full player stat lines for both teams. Requires a match provider ID from get_fixture.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_provider_id` | string | Yes | Match provider ID (e.g., 'CD_M20260140101'). Obtain from get_fixture results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_match_centre \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"match_provider_id":"<string>"}'
```

### get_news

Retrieve latest AFL news articles. Returns paginated list of articles with title, description, author, tags, publish dates, and lead media images.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of articles to return. |
| `offset` | integer | No | Offset for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>"}'
```

### get_player_profile

Retrieve comprehensive profile and career statistics for a specific player. Returns player details (name, age, height, position, draft year), season averages, season totals, career averages, and career totals.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `player_provider_id` | string | Yes | Player provider ID (e.g., 'CD_I1006130'). Obtain from search_players. |
| `season_provider_id` | string | Yes | Season provider ID (e.g., 'CD_S2025014'). Obtain from get_seasons. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_player_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"player_provider_id":"<string>","season_provider_id":"<string>"}'
```

### get_player_stats_leaders

Retrieve ranked list of player statistics leaders for a completed season. Returns top players in categories like goals, disposals, marks, tackles, clearances. Works best with completed seasons.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max leaders per category. |
| `season_provider_id` | string | Yes | Season provider ID (e.g., 'CD_S2025014') or numeric season ID (e.g., '73'). Obtain from get_seasons. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_player_stats_leaders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","season_provider_id":"<string>"}'
```

### get_rounds

Retrieve all rounds for a given season. Returns round numbers, names, bye teams, and start/end times. Use season_id from get_seasons.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `season_id` | string | Yes | Numeric season ID (e.g., '85' for 2026, '73' for 2025). Obtain from get_seasons. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_rounds \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"season_id":"<string>"}'
```

### get_seasons

Retrieve seasons for a given competition. Returns all available seasons with numeric IDs, provider IDs (CD_S format), names, and current round number. Use competition_id from get_competitions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `competition_id` | string | Yes | Competition ID (e.g., '1' for AFL Premiership, '3' for AFLW). Obtain from get_competitions. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_seasons \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"competition_id":"<string>"}'
```

### get_team_list

Retrieve list of teams for a season. Returns team names, abbreviations, club info, and metadata including social links and home venue.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `season_id` | string | Yes | Numeric season ID (e.g., '85' for 2026). Obtain from get_seasons. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/get_team_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"season_id":"<string>"}'
```

### search_players

List players for a season with optional filtering by team. Returns paginated player list with basic info including position, team, and jumper number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page_num` | integer | No | Page number. |
| `page_size` | integer | No | Results per page. |
| `season_provider_id` | string | Yes | Season provider ID (e.g., 'CD_S2025014'). Obtain from get_seasons. |
| `team_ids` | string | No | Filter by team ID (e.g., 'CD_T70' for Geelong Cats). Obtain from get_team_list. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afl-com-au-api-508b1148/search_players \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page_num":"<integer>","page_size":"<integer>","season_provider_id":"<string>","team_ids":"<string>"}'
```
