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

# Competitor Details

> Get comprehensive details about a specific team or club

## Overview

To fetch detailed information about a specific competitor (team/club), use the fixtures or results endpoints with the competitor ID. The `/stats` endpoint may return empty data for some competitors, so using fixtures/results endpoints is more reliable.

<Warning>
  The `/stats` endpoint may return empty data for some competitors. Always use the fixtures or results endpoints as the primary source for competitor details, with stats as supplementary data.
</Warning>

## Recommended Approach

### Step 1: Fetch Competitor Data via Fixtures

```
GET https://v1.football.sportsapipro.com/games/fixtures?competitors={competitorId}
```

This returns upcoming matches for the competitor along with competitor metadata in the `competitors` array.

### Step 2: Fallback to Results if No Fixtures

If the competitor has no upcoming fixtures, use the results endpoint:

```
GET https://v1.football.sportsapipro.com/games/results?competitors={competitorId}
```

## Parameters

| Parameter      | Type    | Description                                                                        |
| -------------- | ------- | ---------------------------------------------------------------------------------- |
| `competitors`  | number  | Competitor ID to fetch details for                                                 |
| `showOdds`     | boolean | Include betting odds (optional)                                                    |
| `timezoneName` | string  | Timezone for date/time values (auto-resolved, or specify e.g., `America/New_York`) |

<Note>
  All `startTime` fields in game data use ISO 8601 format with a dynamic timezone offset based on the resolved or specified timezone.
</Note>

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://v1.football.sportsapipro.com/games/fixtures?competitors=2112" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  // First try fixtures
  const fixturesResponse = await fetch(
    "https://v1.football.sportsapipro.com/games/fixtures?competitors=2112",
    {
      headers: { "x-api-key": "YOUR_API_KEY" }
    }
  );
  const fixturesData = await fixturesResponse.json();

  // Find competitor in the response
  let competitor = fixturesData.competitors?.find(c => c.id === 2112);

  // If not found in fixtures, try results
  if (!competitor) {
    const resultsResponse = await fetch(
      "https://v1.football.sportsapipro.com/games/results?competitors=2112",
      {
        headers: { "x-api-key": "YOUR_API_KEY" }
      }
    );
    const resultsData = await resultsResponse.json();
    competitor = resultsData.competitors?.find(c => c.id === 2112);
  }
  ```

  ```python Python theme={null}
  import requests

  # First try fixtures
  fixtures_response = requests.get(
      "https://v1.football.sportsapipro.com/games/fixtures",
      params={"competitors": 2112},
      headers={"x-api-key": "YOUR_API_KEY"}
  )
  fixtures_data = fixtures_response.json()

  # Find competitor in the response
  competitor = next(
      (c for c in fixtures_data.get("competitors", []) if c["id"] == 2112),
      None
  )

  # If not found in fixtures, try results
  if not competitor:
      results_response = requests.get(
          "https://v1.football.sportsapipro.com/games/results",
          params={"competitors": 2112},
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      results_data = results_response.json()
      competitor = next(
          (c for c in results_data.get("competitors", []) if c["id"] == 2112),
          None
      )
  ```
</CodeGroup>

## Response

The `competitors` array in the response contains competitor details:

```json theme={null}
{
  "competitors": [
    {
      "id": 2112,
      "countryId": 190,
      "sportId": 1,
      "name": "Slovan Bratislava",
      "longName": "ŠK Slovan Bratislava",
      "shortName": "Sl. Bratislava",
      "symbolicName": "SLO",
      "nameForURL": "slovan-bratislava",
      "type": 1,
      "popularityRank": 8234,
      "imageVersion": 2,
      "color": "#0066CC",
      "awayColor": "#FFFFFF",
      "mainCompetitionId": 128,
      "hasSquad": true,
      "hasTransfers": false
    }
  ],
  "games": [
    // Array of upcoming fixtures
  ]
}
```

## Important Notes

1. **Always filter by ID**: The `competitors` array may contain additional related teams (opponents). Always filter by the specific competitor ID you're looking for.

2. **Use fixtures first**: Fixtures endpoint is preferred as it includes upcoming matches. Fall back to results if no fixtures are available.

3. **Country lookup**: Use the `countryId` to look up the country name from the `/countries` endpoint or the `countries` array in the response.

## Competitor Fields

| Field               | Type    | Description                                   |
| ------------------- | ------- | --------------------------------------------- |
| `id`                | number  | Unique competitor identifier                  |
| `countryId`         | number  | ID of the country the competitor belongs to   |
| `sportId`           | number  | ID of the sport (1 = Football)                |
| `name`              | string  | Full competitor name                          |
| `longName`          | string  | Extended official name                        |
| `shortName`         | string  | Abbreviated display name                      |
| `symbolicName`      | string  | 3-letter code (e.g., "SLO", "BAR")            |
| `nameForURL`        | string  | URL-friendly name for SEO                     |
| `type`              | number  | Competitor type (1 = club, 2 = national team) |
| `popularityRank`    | number  | Popularity score (higher = more popular)      |
| `imageVersion`      | number  | Version number for logo assets                |
| `color`             | string  | Primary brand color in hex format             |
| `awayColor`         | string  | Away kit/secondary color in hex format        |
| `mainCompetitionId` | number  | Primary competition ID                        |
| `hasSquad`          | boolean | Whether squad data is available               |
| `hasTransfers`      | boolean | Whether transfer data is available            |

## SEO-Friendly URLs

For SEO purposes, use the `nameForURL` field to construct URLs:

```
/sports/competitor/{nameForURL}-{id}
```

Example:

```
/sports/competitor/slovan-bratislava-2112
```

The route extracts the ID from the last segment of the slug (after the final hyphen) to fetch the competitor data.

## Related Endpoints

* [Competitor Fixtures](/api-reference/games/fixtures) - Get upcoming matches
* [Competitor Results](/api-reference/games/results) - Get past match results
* [Competitor Squad](/api-reference/squads/squad) - Get team roster
* [Top Competitors](/api-reference/competitors/top) - Get popular teams


## OpenAPI

````yaml GET /games/fixtures
openapi: 3.1.0
info:
  title: SportsAPI Pro - Basketball API
  description: >-
    Professional basketball data API providing live scores, standings, player
    statistics, betting odds, and more for NBA, EuroLeague, and 50+ leagues
    worldwide.
  version: 1.0.0
  contact:
    name: SportsAPI Pro Support
    email: support@sportsapipro.com
servers:
  - url: https://v1.basketball.sportsapipro.com
    description: Production API Server
security:
  - ApiKeyAuth: []
tags:
  - name: Games
    description: Live scores, fixtures, and game data
  - name: Competitions
    description: Leagues and tournaments
  - name: Standings
    description: League standings and rankings
  - name: Athletes
    description: Player statistics and data
  - name: Betting
    description: Betting lines, props, and predictions
  - name: Search
    description: Search entities
  - name: Account
    description: Account status and usage
paths:
  /games/fixtures:
    get:
      tags:
        - Games
      summary: Upcoming Games
      description: Get upcoming basketball games (fixtures)
      operationId: getFixtures
      parameters:
        - name: competitions
          in: query
          description: Filter by competition ID
          schema:
            type: integer
            example: 132
        - name: date
          in: query
          description: Filter by date (YYYY-MM-DD)
          schema:
            type: string
            format: date
            example: '2026-01-26'
      responses:
        '200':
          description: Fixtures retrieved successfully
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your SportsAPI Pro API key

````