Get country by code

GET https://rugby.highlightly.net/countries/{countryCode} Rugby API
GET https://sports.highlightly.net/rugby/countries/{countryCode} All Sports API

Retrieve one country by its code.

Refresh interval
Once a day

The path parameter follows the ISO 3166 standard, for example /countries/EU.

Country name and code can then be used to query other resources such as matches, leagues and highlights.

Parameters

Parameter Type Description
countryCoderequired stringpath A string value code of the country, following the ISO 3166 standard.

Request

curl --request GET \
  --url 'https://rugby.highlightly.net/countries/{countryCode}' \
  --header 'x-rapidapi-key: YOUR_API_KEY'
const response = await fetch('https://rugby.highlightly.net/countries/{countryCode}', {
  headers: {
    'x-rapidapi-key': process.env.HIGHLIGHTLY_API_KEY
  }
})

if (!response.ok) {
  throw new Error(`Highlightly responded ${response.status}`)
}

const data = await response.json()
import os
import requests

response = requests.get(
    'https://rugby.highlightly.net/countries/{countryCode}',
    headers={
        'x-rapidapi-key': os.environ['HIGHLIGHTLY_API_KEY'],
    },
    timeout=10,
)

response.raise_for_status()
data = response.json()

Response

codestringrequiredCountry code specified by the ISO 3166 standard.
namestringrequired
logostringrequired

Example response

200 application/json
[
  {
    "code": "EU",
    "name": "Europe",
    "logo": "https://example.com/logos/country/EU.png"
  }
]

Values are the examples declared in the OpenAPI spec, not a captured live response.

Errors

Status Description
400 Bad request descriptive error.
500 Internal server error.

Using a country code

Country codes come from countries. These endpoints accept one.

Endpoint Parameter
Highlights countryCode
Leagues countryCode
Matches countryCode