> ## 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

> 14 endpoints for live handball games, schedules, search, and discovery

## Live & Schedule (7 endpoints)

### Live Games

```
GET /api/live
```

Curated live games with teams, scores, and half info.

### Live (All)

```
GET /api/live/all
```

Raw live data for all handball games.

### Today's Games

```
GET /api/today
```

### Schedule by Date

```
GET /api/schedule/:date
```

Date format: `YYYY-MM-DD`. **Example:** `GET /api/schedule/2026-03-12`

### Live Tournaments

```
GET /api/live-tournaments
```

Leagues with live games right now.

### Scheduled Tournaments

```
GET /api/scheduled-tournaments/:date
```

Leagues with games on a specific date.

### Newly Added Events

```
GET /api/newly-added-events
```

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

```json theme={null}
{
  "events": [
    {
      "id": 12345678,
      "homeTeam": { "id": 2104, "name": "FC Barcelona" },
      "awayTeam": { "id": 2105, "name": "THW Kiel" },
      "homeScore": {
        "current": 28,
        "display": 28,
        "period1": 14,
        "period2": 14
      },
      "awayScore": {
        "current": 25,
        "display": 25,
        "period1": 12,
        "period2": 13
      },
      "status": { "code": 7, "description": "2nd Half", "type": "inprogress" },
      "tournament": { "name": "EHF Champions League", "id": 149 },
      "startTimestamp": 1737331200
    }
  ]
}
```

### Score Fields

| Field      | Description                      |
| ---------- | -------------------------------- |
| `period1`  | 1st half goals                   |
| `period2`  | 2nd half goals                   |
| `overtime` | Extra time goals (if applicable) |
| `current`  | Total goals                      |

### Status Codes

| Code | Description |
| ---- | ----------- |
| 0    | Not started |
| 6    | 1st Half    |
| 7    | 2nd Half    |
| 31   | Halftime    |
| 40   | Overtime    |
| 100  | Ended       |

***

## Search & Discovery (7 endpoints)

### Search

```
GET /api/search?q=barcelona
```

Search teams, players, and tournaments.

### Countries / Categories

```
GET /api/countries
```

Handball categories and countries (36 categories).

### Countries (Extended)

```
GET /api/countries/all
```

### Category Tournaments

```
GET /api/categories/:categoryId/tournaments
```

Leagues in a country/category.

### Trending Players

```
GET /api/trending-players
```

### Handball News

```
GET /api/news?lang=en
```

### Country Flag

```
GET /api/country/:code/flag
```
