Baseball.Highlights

Get geo restrictions for highlight

Refresh interval: Once an hour

Note: Endpoint is not available in the Basic/Free plan.

Geo restrictions are a plague that have been around for quite a while. They restrict access to online content based on the viewers geographical location. Trying to show restricted highlights to your users can greatly hinder the viewing experience.

Each highlight has a state property which defines how the geo restrictions are applied.

StateDescription
No restricitons appliedHighlight has no restrictions applied and is available globally.
Allowed countries restrictionHighlight is only available to users whose country code is found in the allowedCountries list.
Blocked countries restrictionHighlight is blocked to all users whose country code is found in the blockedCountries list.
Unknown restrictionsThere is no guaranteed way to define all allowed or blocked countries.

As presented before, certain highlights have an embedUrl field which can be used to directly embed the video into your website or application. The embeddable field specifies whether this is allowed or not.

get/baseball/highlights/geo-restrictions/{id}

Request

Path parameters

idnumber required

Requested highlight id.

Headers

x-rapidapi-hoststring required

sport-highlights-api.p.rapidapi.com

x-rapidapi-keystring required

Rapid API Token

Response

state'No restricitons applied' | 'Allowed countries restriction' | 'Blocked countries restriction' | 'Unknown restrictions' required

Specifies which restriction rule is applied to the requested highlight. If allowed restriction is applied, read from allowedCountries field. When blocked restriction is applied, countries from blockedCountries field are applied.

allowedCountriesstring[] required

ISO 3166 two letter country list of allowed countries when restriction rules is in allowed state.

blockedCountriesstring[] required

ISO 3166 two letter country list of blocked countries. Rule list is valid when restriction rules is in blocked state.

embeddableboolean required

Boolean flag which indicates whether highlight provider allows embedding inside web applications.

Example response

{
  "state": "Allowed countries restriction",
  "allowedCountries": [
    "IT"
  ],
  "blockedCountries": [],
  "embeddable": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.