---
title: "Get league by id"
method: GET
path: "/basketball/leagues/{id}"
tags: ["Basketball.Leagues"]
---

# Get league by id

`GET /basketball/leagues/{id}`

## Request

- Base URL: `https://sports.highlightly.net`
- URL: `https://sports.highlightly.net/basketball/leagues/{id}`
- Auth: none declared. Required headers: `x-rapidapi-host`, `x-rapidapi-key`
- TypeScript: <https://skmtc.dev/highlightly/apis/sports-api-highlightly/docs/basketball/leagues/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve league information by specifying the league id path parameter.

> Note: Used to check whether a league still exists or had its information updated.

## Path parameters

- `id` number, required

## Headers

- `x-rapidapi-host` string, required
- `x-rapidapi-key` string, required

## Response `200`

- BasketballLeagueResponseDto[]
  - `id` number, required
  - `logo` string
  - `name` string, required
  - `country` BasketballCountryResponseDto, required
    - `code` string, required: Country code specified by the ISO 3166 standard.
    - `name` string, required
    - `logo` string, required
  - `seasons` BasketballSeasonResponseDto[], required
    - `season` number, required

## Other responses

- `400`: Bad request descriptive error.
- `500`: Internal server error.

---

[API](https://skmtc.dev/highlightly/apis/sports-api-highlightly.md) - [All operations](https://skmtc.dev/highlightly/apis/sports-api-highlightly/llms.txt) - [OpenAPI document](https://skmtc.dev/highlightly/apis/sports-api-highlightly/revisions/c8a366d3091f?raw)
