GET Leagues by Team ID
https://api.sportmonks.com/v3/motorsport/leagues/teams/TEAM_ID{
"data": {
"id": 3468,
"sport_id": 2,
"country_id": 190324,
"name": "Formula 1",
"active": true,
"short_code": "F1",
"image_path": "https://cdn.sportmonks.com/images/motorsport/leagues/12/3468.png",
"type": "league",
"sub_type": "international",
"last_played_at": "2025-06-13 21:00:00",
"category": 1,
"has_jerseys": false
},id
Refers to the unique id of the league
integer
sport_id
Refers to the sport of the league
integer
country_id
Refers to the country of the league
integer
name
The name of the league
string
active
Indicates if the league is active or inactive
integer
short_code
The short code of the league
string / null
image_path
Image path to the league logo
string
type
Indicates the type of the league
string
sub_type
Indicates the subtype of the league
string
last_played_at
The date of when the last fixture was being held in the league
string
category
Indicates the category of the league
integer
has_jerseys
Not used in the Motorsport API
boolean
api_token
YES
Your unique API token
include
NO
Enrich the API with more data by using includes
select
NO
Select specific fields on the base entity
filters
NO
Filter the API response on multiple related entities. There are static filters and dynamic filters.
Please find the possibilities in the Static and Dynamic Filter tab.
Static filters are always the same and filter in one specific way without any custom options. Each static filter is listed below and has a description of how it filters. For more information, please look at our Filters page.
Not applicable for this endpoint.
Pagination
YES
Include depth
You can use a total of 2 nested includes on this endpoint
Include options
sport country stages latest upcoming inplay today currentSeason seasons
Related Entities:
Get an overview and explanation of all the fields returned in the API response. The related entities for the Leagues endpoints are:
Code Example
require "uri"
require "net/http"
url = URI("https://api.sportmonks.com/v3/motorsport/leagues?api_token={your_token}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.sportmonks.com")
payload = ''
headers = {}
conn.request("GET", "/v3/motorsport/leagues?api_token={your_token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))Last updated
Was this helpful?