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

> Track badminton tournaments worldwide by browsing the BWF calendar, viewing tournament draw brackets, and retrieving detailed match results with player stats and scores. Stay updated on competitions and analyze matchups with comprehensive tournament data from the Badminton World Federation.

**Category:** Sports | **Website:** [bwfbadminton.com/calendar/](https://bwfbadminton.com/calendar/) | **Docs:** [parse.bot/marketplace/c37e9385-9b41-4d04-ae82-89160e6f1d88/bwfbadminton-com-api](https://parse.bot/marketplace/c37e9385-9b41-4d04-ae82-89160e6f1d88/bwfbadminton-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-bwfbadminton-com-api-c37e9385/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_rankings

Get BWF world rankings for a given discipline or all disciplines. Returns ranked players/pairs with their current rank, previous rank, points, and tournaments played. Rankings are the latest published BWF World Rankings week. For doubles disciplines (MD, WD, XD), player_name contains both players separated by ' / '. When discipline is omitted, returns rankings for all five disciplines combined. Supports comma-separated discipline list (e.g. 'MS,WD') to fetch multiple specific disciplines in one call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `discipline` | string | No | Discipline(s) to fetch rankings for. A single code (MS, WS, MD, WD, XD), a comma-separated list (e.g. 'MS,WD'), or omit for all disciplines combined. |
| `limit` | integer | No | Number of ranking entries to return per discipline. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bwfbadminton-com-api-c37e9385/get_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"discipline":"<string>","limit":"<integer>"}'
```

### get_tournament_draw_bracket

Get the full draw bracket for all disciplines (MS, WS, MD, WD, XD) in a tournament. Returns every round (R64, R32, R16, QF, SF, Final) with all match pairings grouped by discipline. Each match includes player names, countries, seeds, game scores, match status, winner, and round label. Internally resolves the tournament code to a numeric ID by searching recent years. This is a heavier call as it fetches bracket data for each discipline separately.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tournament_code` | string | Yes | Tournament UUID code. Obtain from list_tournaments endpoint's tournament_code field. |

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

### get_tournament_draws

Get draw categories (disciplines) for a specific tournament. Returns available draws such as MS, WS, MD, WD, XD with codes, sizes, and stage information. Each draw represents a bracket for one discipline at the tournament.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tournament_code` | string | Yes | Tournament UUID code. Obtain from list_tournaments endpoint's tournament_code field. |

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

### get_tournament_matches

Get detailed match results for a tournament on a specific date or date range. Includes player names, countries, seeds, scores per game, duration, round, discipline, and court. Requires either a single date or both date_start and date_end. Supports filtering by discipline (MS, WS, MD, WD, XD).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | No | Single date in YYYY-MM-DD format. Use either this OR date_start+date_end. |
| `date_end` | string | No | End date for range query (YYYY-MM-DD). Must be used with date_start. |
| `date_start` | string | No | Start date for range query (YYYY-MM-DD). Must be used with date_end. |
| `discipline` | string | No | Filter by discipline: MS (Men's Singles), WS (Women's Singles), MD (Men's Doubles), WD (Women's Doubles), XD (Mixed Doubles). |
| `tournament_code` | string | Yes | Tournament UUID code. Obtain from list_tournaments endpoint's tournament_code field. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bwfbadminton-com-api-c37e9385/get_tournament_matches \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>","date_end":"<string>","date_start":"<string>","discipline":"<string>","tournament_code":"<string>"}'
```

### list_tournaments

List BWF tournaments for a given year. Returns tournament names, dates, locations, categories, prize money, and tournament codes needed for draw and match queries. Supports filtering by BWF category tier. Paginates as a single page containing all tournaments for the year.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Comma-separated category IDs to filter. Accepted values: 20, 21, 22, 23, 24, 25, 26, 27. These map to BWF tournament tiers. Omitting returns all categories. |
| `year` | integer | No | Year to fetch tournaments for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bwfbadminton-com-api-c37e9385/list_tournaments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","year":"<integer>"}'
```
