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

> Motorsport V2 live sessions, schedules, search, and discovery

## Live & Schedule Endpoints (7)

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

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

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

```json theme={null}
{
  "events": [
    {
      "id": 12345678,
      "homeTeam": { "id": 0, "name": "Race" },
      "awayTeam": { "id": 0, "name": "" },
      "homeScore": {
        "current": 0,
        "display": 0
      },
      "status": { "code": 6, "description": "In Progress", "type": "inprogress" },
      "tournament": { "name": "Formula 1", "id": 130 },
      "season": { "name": "Australian Grand Prix" },
      "startTimestamp": 1737331200
    }
  ]
}
```

<Note>Motorsport events don't have traditional home/away scoring. Use the `/match/:matchId/scores` endpoint for finishing positions and lap times. The `homeTeam` field typically shows the session type (Race, Qualifying, Practice).</Note>

<Warning>
  **`/api/today`, `/api/schedule/:date`, and `/api/scheduled-tournaments/:date` return empty for motorsport by design.** The upstream date-scoped feed does not publish motorsport stages. To list the season's races (past, present, future), use the race calendar instead:

  ```bash theme={null}
  # F1 2026 (uniqueStage 40, season 214140)
  GET /api/motorsport/tournament/40/season/214140/races

  # MotoGP — discover the current season via /api/tournament/17/seasons
  GET /api/motorsport/tournament/17/season/{seasonId}/races
  ```

  For standings: `/api/motorsport/tournament/:id/season/:sid/standings` (constructors) and `/standings/teams`.
</Warning>

### Categories

| Category ID | Championship |
| ----------- | ------------ |
| 36          | Formula 1    |
| 37          | MotoGP       |
| 74          | NASCAR       |
| 164         | WRC          |
| 38          | Formula E    |

## Search & Discovery Endpoints (7)

```bash theme={null}
GET /api/search?q=verstappen            # Search drivers, teams, championships
GET /api/countries                      # Categories (F1, MotoGP, etc.)
GET /api/countries/all                  # Extended categories
GET /api/categories/:categoryId/tournaments  # Championships in category
GET /api/trending-players               # Trending drivers
GET /api/news?lang=en                   # Motorsport news
GET /api/country/:code/flag             # Country flag URL
```

### Example: Find Live Sessions

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

### Example: Browse F1 Championships

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.sportsapipro.com/v2/motorsport/categories/36/tournaments"
```
