# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/bwfbadminton/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/bwfbadminton/get-rankings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bwfbadminton/get-tournament-draw-bracket \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bwfbadminton/get-tournament-draws \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bwfbadminton/get-tournament-matches \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bwfbadminton/list-tournaments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","year":"<integer>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.