GET Drivers by Country ID
This endpoint returns all the drivers available for a provided country ID.
https://api.sportmonks.com/v3/motorsport/drivers/countries/COUNTRY_ID{
"data": {
"id": 37920800,
"sport_id": 2,
"country_id": 38,
"nationality_id": 38,
"city_id": null,
"position_id": 9730,
"detailed_position_id": 9730,
"type_id": null,
"common_name": "M. Verstappen",
"firstname": "Max",
"lastname": "Verstappen",
"name": "Max Verstappen",
"display_name": "Max Verstappen",
"image_path": "https://cdn.sportmonks.com/images/motorsport/players/0/37920800.png",
"height": null,
"weight": null,
"date_of_birth": "1997-09-30",
"gender": "male"
},id
Refers to the unique id of the driver (referred to as player_id in API responses)
integer
sport_id
Refers to the sport
integer
country_id
Refers to the country of birth of the driver
integer
nationality_id
Refers to the nationality that the driver has opted to represent
integer
city_id
Refers to the city of birth of the driver
integer
position_id
Refers to the position of the driver within the team (first, second, or test driver)
integer
detailed_position_id
Not used in the Motorsport API
integer
type_id
Not used in the Motorsport API
integer
common_name
Refers to the name the player is known for
string
firstname
Refers to the first name of the driver
string
lastname
Refers to the last name of the driver
string
name
Refers to the name of the driver
string
display_name
Refers to the name that is often used to display in applications
string
image_path
Image path to the driver headshot
string
height
Refers to the height of the driver
integer
weight
Refers to the weight of the driver
integer
date_of_birth
Refers to the date of birth of the driver
string
gender
Refers to the gender of the driver
string
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 3 nested includes on this endpoint
Include options
sport country city nationality teams latest position lineups metadata
Related Entities:
Get an overview and explanation of all the fields returned in the API response. The related entities for the Drivers endpoints are:
Code Example
require "uri"
require "net/http"
url = URI("https://api.sportmonks.com/v3/motorsport/drivers/countries/462?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/drivers/countries/462?api_token={your_token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))Last updated
Was this helpful?