Skip to main content
The leagues endpoints let you browse the competition catalog for a given sport. Use GET /leagues to retrieve the full list of leagues your account can access, or GET /leagues/active to narrow the list to only leagues that currently have something happening — at least one match that is NOT_STARTED or STARTED.

Endpoints

GET https://api.sportrixdata.com/api/leagues
GET https://api.sportrixdata.com/api/leagues/active
/leagues/active accepts the same parameters and returns the same shape as /leagues, but filters results to leagues with at least one live or upcoming match.

Authentication and Scope

Both endpoints require the fixtures scope. Include your API key in the X-API-Key header.

Query Parameters

sport
integer
required
The sport id to list leagues for. Obtain this value from GET /sports. Must be within your account’s enabled sports allowlist.
limit
integer
Number of leagues to return per page. Default 100, maximum 200. Values above 200 are clamped to 200.
offset
integer
Number of leagues to skip before returning results. Default 0. Use with limit to page through results.

Response

Both endpoints return a pagination envelope. Each item in items is a league object with the following fields:
FieldTypeDescription
idintegerLeague id — use this as the league parameter in /matches
namestringDisplay name of the league

Example Requests

# All leagues for soccer (sport id 1)
curl "https://api.sportrixdata.com/api/leagues?sport=1" \
  -H "X-API-Key: $KEY"

# Only leagues with live or upcoming matches
curl "https://api.sportrixdata.com/api/leagues/active?sport=1" \
  -H "X-API-Key: $KEY"

Example Response

{
  "items": [
    { "id": 172, "name": "USA USL W-League Women" }
  ],
  "total": 1,
  "limit": 100,
  "offset": 0,
  "count": 1,
  "page": 1,
  "total_pages": 1,
  "has_more": false
}
See the Pagination guide for a full description of the envelope fields and how to page through results.