GET Country by ID
Returns information from your requested country ID.
https://api.sportmonks.com/v3/core/countries/{ID}{
"data": {
"id": 462,
"continent_id": 1,
"name": "United Kingdom",
"official_name": "United Kingdom of Great Britain and Northern Ireland",
"fifa_name": "ENG,NIR,SCO,WAL",
"iso2": "GB",
"iso3": "GBR",
"latitude": "54.56088638305664",
"longitude": "-2.2125117778778076",
"geonameid": 2635167,
"borders": [
"IRL"
],
"image_path": "https://cdn.sportmonks.com/images//countries/png/short/gb.png"
},Field
Description
Type
Query Parameters
Required?
Description
Pagination
Include depth
Include options
Code Example
require "uri"
require "net/http"
url = URI("https://api.sportmonks.com/v3/core/countries/{ID}?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/core/countries/{ID}?api_token={your_token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))Last updated
Was this helpful?