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

# Sports, Counts & Search

> List supported sports, live + today counts per sport, and global search

## Get All Sports

Returns the 15 sports supported by V6 with their numeric IDs and slugs.

```text theme={null}
GET /api/v1/sports
```

<CodeGroup>
  ```bash New canonical theme={null}
  curl -H "x-api-key: YOUR_API_KEY" \
    "https://api.sportsapipro.com/v6/football/sports"
  ```

  ```bash Classic theme={null}
  curl -H "x-api-key: YOUR_API_KEY" \
    "https://api.sportsapipro.com/v6/football/sports"
  ```
</CodeGroup>

```json theme={null}
{
  "success": true,
  "sports": [
    { "id": 1, "slug": "football" },
    { "id": 2, "slug": "basketball" },
    { "id": 3, "slug": "tennis" },
    { "id": 5, "slug": "cricket" },
    { "id": 6, "slug": "baseball" },
    { "id": 7, "slug": "handball" },
    { "id": 8, "slug": "ice-hockey" },
    { "id": 10, "slug": "volleyball" },
    { "id": 11, "slug": "table-tennis" },
    { "id": 14, "slug": "hockey" },
    { "id": 17, "slug": "american-football" },
    { "id": 19, "slug": "snooker" },
    { "id": 22, "slug": "water-polo" },
    { "id": 24, "slug": "badminton" },
    { "id": 100, "slug": "esports" }
  ]
}
```

## Get Match Counts

Live + today match counts for every sport. Useful for dashboard tiles.

```text theme={null}
GET /api/v1/counts
```

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.sportsapipro.com/v6/football/counts"
```

```json theme={null}
{
  "success": true,
  "items": [
    { "sportId": 1, "sport": "football", "liveCount": 39, "todayCount": 491 },
    { "sportId": 2, "sport": "basketball", "liveCount": 6, "todayCount": 106 },
    { "sportId": 100, "sport": "esports", "liveCount": 5, "todayCount": 40 }
  ]
}
```

**Cache TTL:** 15 s

## Global Search

```text theme={null}
GET /api/v1/search?q={query}
```

<Warning>
  Search is best-effort and may return an empty array for niche queries.
</Warning>

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.sportsapipro.com/v6/football/search?q=real+madrid"
```

## Cache Stats

Internal cache diagnostics — useful for debugging stale data and observing the V6 hit rate.

```text theme={null}
GET /api/v1/cache/stats
```

```bash theme={null}
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.sportsapipro.com/v6/football/cache/stats"
```

```json theme={null}
{
  "success": true,
  "size": 1284,
  "active": 1102,
  "hits": 89432,
  "misses": 6711
}
```

The cache auto-evicts expired entries once `size` exceeds 2000.

## FIFA Rankings

See the dedicated [Match H2H & Rankings](/api-reference/v6-aiscore/match-h2h) page — both `/fifa/rankings` and `/rankings?sport_id=1` (with 348 historical publication dates) are documented there.
