> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sportsapipro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Live, Schedule & Search Endpoints

> Badminton V2 live scores, schedules, search, and discovery

## Live & Schedule Endpoints (7)

All endpoints use base URL `https://api.sportsapipro.com/v2/badminton`.

```bash theme={null}
GET /api/live                           # Curated live matches
GET /api/live/all                       # Raw live data
GET /api/today                          # Today's scheduled matches
GET /api/schedule/:date                 # Schedule by date (YYYY-MM-DD)
GET /api/live-tournaments               # Tournaments with live matches
GET /api/scheduled-tournaments/:date    # Tournaments with matches on date
GET /api/newly-added-events             # Recently added matches
```

### Response Example — `/api/live`

```json theme={null}
{
  "events": [
    {
      "id": 12345678,
      "homeTeam": { "id": 5201, "name": "Viktor Axelsen" },
      "awayTeam": { "id": 5202, "name": "Kodai Naraoka" },
      "homeScore": {
        "current": 1,
        "display": 1,
        "period1": 21,
        "period2": 18,
        "period3": 0,
        "point": "12"
      },
      "awayScore": {
        "current": 1,
        "display": 1,
        "period1": 18,
        "period2": 21,
        "period3": 0,
        "point": "9"
      },
      "status": { "code": 13, "description": "3rd Game", "type": "inprogress" },
      "tournament": { "name": "BWF World Tour Finals", "id": 1200 },
      "startTimestamp": 1737331200
    }
  ]
}
```

### Score Fields

| Field                 | Description                                                   |
| --------------------- | ------------------------------------------------------------- |
| `period1` – `period3` | Points scored in each game (games to 21, win by 2, cap at 30) |
| `point`               | Current point score within the active game                    |
| `current`             | Games won (best of 3)                                         |

### Status Codes

| Code | Description |
| ---- | ----------- |
| 0    | Not started |
| 11   | 1st Game    |
| 12   | 2nd Game    |
| 13   | 3rd Game    |
| 31   | Game Break  |
| 100  | Ended       |

## Search & Discovery Endpoints (7)

```bash theme={null}
GET /api/search?q=axelsen               # Search players, tournaments
GET /api/countries                       # Categories (BWF International)
GET /api/countries/all                   # Extended categories
GET /api/categories/:categoryId/tournaments  # Tournaments in category
GET /api/trending-players                # Trending badminton players
GET /api/news?lang=en                    # Badminton news
GET /api/country/:code/flag              # Country flag URL
```

### Example: Find Live Matches

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  https://api.sportsapipro.com/v2/badminton/live
```

### Example: Search for a Player

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.sportsapipro.com/v2/badminton/search?q=axelsen"
```
