---
title: "Get all leagues"
method: GET
path: "/cricket/leagues"
tags: ["Cricket.Leagues"]
---

# Get all leagues

`GET /cricket/leagues`

## Request

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

> Refresh interval: Multiple times a day
 
Retrieve a list of leagues.

By utilising the `leagueName` query parameter you can check whether a specific league exists or simply retrieve the associated data. You can also narrow down your search by specifying the `countryCode` or `countryName` query parameters. 

There are two other important query parameters. The `limit` parameter defines what the number of returned leagues will be. If the number of actual leagues is above the `limit` value you can make subsequent requests by increasing the `offset` value.

The league information and their associated seasons can be used to request data from other endpoints such as `standings`.

## Query parameters

- `limit` number
- `offset` number
- `season` number
- `leagueName` string
- `countryCode` string
- `countryName` string

## Headers

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

## Response `200`

- CricketLeaguePaginatedResponseDto
  - `data` CricketLeagueResponseDto[], required
    - `id` string, required
    - `logo` string
    - `name` string, required
    - `country` CricketCountryResponseDto, required
      - `code` string, required: Country code specified by the ISO 3166 standard.
      - `name` string, required
      - `logo` string, required
    - `seasons` CricketSeasonResponseDto[], required
      - `season` number, required
  - `pagination` PaginationResponseDto, required
    - `totalCount` number, required: Available number of items, relevant to the provided query.
    - `offset` number, required
    - `limit` number, required
  - `plan` PlanResponseDto, required
    - `tier` string, required: Your current API subscription tier.
    - `message` string, required: Explanation message regarding your current tier.

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