Leagues
Sport leagues related endpoints
Returns similar leagues for the given league id(s). Only leagues with events starting between the requested time range will be considered.
The leagues are sorted by distance ascending.
Distance
The metric used to measure similarity between items is called distance. It is a system indicator on how similar the item is to the input.
The smaller the number the more similar the item.
The normalized value of the item's distance to the input is also assigned to each event as its confidence.
Comma separated list of league ids for which to return similar leagues. If multiple leagues are provided the leagues returned are going to be the ones with the shortest average distance to all of the provided leagues.
sr:tournament:17Leagues with events starting after this datetime will be returned.
Considers events starting after the from timestamp plus the given minutes/hours/days.
If not set defaults to 0 minutes.
The value must be in range [-7d - 7d].
0Example: -180mPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$Considers events starting till the from timestamp plus the given
minutes/hours/days. If not set defaults to one day (24 hours).
The value must be in range [-7d - 7d].
2dExample: 2dPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$DEPRECATED: Considers events starting till the from timestamp plus the given
hours. If not set defaults to one day (24 hours).
Number of leagues to return.
5Example: 5Optional filtering of the leagues to retrieve. It expects a string
adhering to the filtering format, as described in the filtering
section, e.g. sport:eq:Soccer.
country:eq:EnglandPossible values: The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
List of event types to consider when generating recommendations. One or more types can be provided. Available options are:
match: Standard matches to be considered.seasonal: Seasonal events to be considered.forced_events: Handpicked events to be considered regardless of their start_time.
match,forced_eventsPossible values: Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. country,country_id.
If it's true include input items in response. By default is set to false.
falseThe location of the page where the request takes place.
inplay_widgetCustom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/sports/leagues/similar?league_ids=text HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"confidence": 1,
"country": "Solomon Islands",
"country_id": "sr:category:884",
"distance": 11.328730583190918,
"league": "Premier League, Women",
"league_id": "sr:simple_tournament:101710",
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.7635782725297198,
"country": "Bulgaria",
"country_id": "sr:category:78",
"distance": 15.203896522521973,
"league": "Third League North West",
"league_id": "sr:simple_tournament:10377",
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.7439161525070912,
"country": "New Zealand",
"country_id": "sr:category:148",
"distance": 15.526176452636719,
"league": "Mainland Championship, Reserves",
"league_id": "sr:simple_tournament:104088",
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.7163495617558485,
"country": "Bulgaria",
"country_id": "sr:category:78",
"distance": 15.978017807006836,
"league": "Third League South West",
"league_id": "sr:simple_tournament:10376",
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.698446841757971,
"country": "Bulgaria",
"country_id": "sr:category:78",
"distance": 16.271459579467773,
"league": "Third League South East",
"league_id": "sr:simple_tournament:10375",
"sport": "Soccer",
"sport_id": "sr:sport:1"
}
],
"status": "success"
}Returns personalized league recommendations.
Only leagues with events starting between the requested time range will be considered.
Confidence
Each returned item is associated with a number from 0 to 1 indicating the confidence of the system in this specific recommendation. The higher the number the more confident the recommendation of it.
Filtering example
In this example we get all recommended leagues for user with id 1, starting till 12 hours from now.
$ curl --request GET \
--url 'https://api.vaix.ai/api/sports/leagues/recommended?user=1&to_offset=12h'The user to get recommendations for.
Leagues with events starting after this datetime will be returned.
Considers events starting after the from timestamp plus the given minutes/hours/days.
If not set defaults to 0 minutes.
The value must be in range [-7d - 7d].
0Example: -180mPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$Considers events starting till the from timestamp plus the given
minutes/hours/days. If not set defaults to one day (24 hours).
The value must be in range [-7d - 7d].
2dExample: 2dPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$DEPRECATED: Considers events starting till the from timestamp plus the given
hours. If not set defaults to one day (24 hours).
Number of leagues to return.
5Example: 5Optional filtering of the leagues to retrieve. It expects a string
adhering to the filtering format, as described in the filtering
section, e.g. sport:eq:Soccer.
country:eq:EnglandPossible values: The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
List of event types to consider when generating recommendations. One or more types can be provided. Available options are:
match: Standard matches to be considered.seasonal: Seasonal events to be considered.forced_events: Handpicked events to be considered regardless of their start_time.
match,forced_eventsPossible values: Applies a limit to a group of items. For more information, head to
Limiting -> Group Limiting section of the docs.
country:5,country_id:2.
The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+league_confidence,-sport_confidence.
Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. country,country_id.
The location of the page where the request takes place.
inplay_widgetComma separated list of keywords. If given, this input will be used
as user demographics data for the recommendations, e.g country:gr,city:ath.
Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/sports/leagues/recommended?user=text HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"confidence": 1,
"country": "International",
"country_id": "sr:category:4",
"league": "Euro Cup",
"league_id": "sr:tournament:1",
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.6001189237401516,
"country": "International",
"country_id": "sr:category:4",
"league": "Copa America",
"league_id": "sr:tournament:133",
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.3775828749814182,
"country": "Norway",
"country_id": "sr:category:5",
"league": "Eliteserien",
"league_id": "sr:tournament:20",
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.25360487587334624,
"country": "Iceland",
"country_id": "sr:category:10",
"league": "Urvalsdeild",
"league_id": "sr:tournament:188",
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.25003716366879736,
"country": "Ireland",
"country_id": "sr:category:51",
"league": "Premier Division",
"league_id": "sr:tournament:192",
"sport": "Soccer",
"sport_id": "sr:sport:1"
}
],
"status": "success"
}Returns popular leagues for the given time frame.
Only leagues with events starting between the requested time range will be considered.
The results are sorted by popularity.
Popularity
The metric used to measure popularity is the number of bets placed on events of each league.
The normalized value of its total bets is also assigned to each league as its confidence.
Filtering example
In this example we get all popular Soccer leagues.
$ curl --request GET \
--url 'https://api.vaix.ai/api/sports/leagues/popular?filters=sport%3Aeq%3ASoccer'The user to get recommendations for.
Leagues with events starting after this datetime will be returned.
Considers events starting after the from timestamp plus the given minutes/hours/days.
If not set defaults to 0 minutes.
The value must be in range [-7d - 7d].
0Example: -180mPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$Considers events starting till the from timestamp plus the given
minutes/hours/days. If not set defaults to one day (24 hours).
The value must be in range [-7d - 7d].
2dExample: 2dPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$DEPRECATED: Considers events starting till the from timestamp plus the given
hours. If not set defaults to one day (24 hours).
Number of leagues to return.
5Example: 5Optional filtering of the leagues to retrieve. It expects a string
adhering to the filtering format, as described in the filtering
section, e.g. sport:eq:Soccer.
country:eq:EnglandPossible values: The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
List of event types to consider when generating recommendations. One or more types can be provided. Available options are:
match: Standard matches to be considered.seasonal: Seasonal events to be considered.forced_events: Handpicked events to be considered regardless of their start_time.
match,forced_eventsPossible values: Applies a limit to a group of items. For more information, head to
Limiting -> Group Limiting section of the docs.
country:5,country_id:2.
Optional dynamic filtering of the items to retrieve. If any dynamic filter is set,
the filter's value will be dynamically calculated and used. Notice that for user
related filters, the user query parameter must be provided. For example,
dynamic_filters=user_country will return data related only to the user's specific country.
The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+league_confidence,-sport_confidence.
Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. country,country_id.
The location of the page where the request takes place.
inplay_widgetCustom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/sports/leagues/popular HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"confidence": 1,
"country": "International Clubs",
"country_id": "sr:category:393",
"league": "Club Friendly Games",
"league_id": "sr:tournament:853",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 14775
},
{
"confidence": 0.8570558375634518,
"country": "International",
"country_id": "sr:category:4",
"league": "Euro Cup",
"league_id": "sr:tournament:1",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 12663
},
{
"confidence": 0.7200676818950931,
"country": "Norway",
"country_id": "sr:category:5",
"league": "1st Division",
"league_id": "sr:tournament:22",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 10639
},
{
"confidence": 0.47736040609137054,
"country": "Ireland",
"country_id": "sr:category:51",
"league": "First Division",
"league_id": "sr:tournament:193",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 7053
},
{
"confidence": 0.4588155668358714,
"country": "International",
"country_id": "sr:category:4",
"league": "Copa America",
"league_id": "sr:tournament:133",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 6779
},
{
"confidence": 0.4159729272419628,
"country": "Ireland",
"country_id": "sr:category:51",
"league": "Premier Division",
"league_id": "sr:tournament:192",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 6146
},
{
"confidence": 0.3030118443316413,
"country": "International Clubs",
"country_id": "sr:category:393",
"league": "AFC Champions League",
"league_id": "sr:tournament:463",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 4477
},
{
"confidence": 0.24649746192893401,
"country": "Kazakhstan",
"country_id": "sr:category:278",
"league": "Premier League",
"league_id": "sr:tournament:682",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 3642
},
{
"confidence": 0.19485617597292723,
"country": "China",
"country_id": "sr:category:99",
"league": "China League 2",
"league_id": "sr:tournament:15636",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 2879
},
{
"confidence": 0.19417935702199662,
"country": "Lithuania",
"country_id": "sr:category:160",
"league": "A Lyga",
"league_id": "sr:tournament:198",
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 2869
}
],
"status": "success"
}Returns trending leagues for the given time frame.
Only leagues with events starting between the requested time range will be considered.
The results are sorted by trending score.
Trending score
To calculate trending score for a league, each bet placed on an event of this league, contributes a value determined by how recently the bet was placed.
Recent bets add more value than older ones.
The normalized value of its score is also assigned to each league as its confidence.
Filtering example
In this example we get all trending Soccer leagues.
$ curl --request GET \
--url 'https://api.vaix.ai/api/sports/leagues/trending?filters=sport%3Aeq%3ASoccer'The user to get recommendations for.
Leagues with events starting after this datetime will be returned.
Considers events starting after the from timestamp plus the given minutes/hours/days.
If not set defaults to 0 minutes.
The value must be in range [-7d - 7d].
0Example: -180mPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$Considers events starting till the from timestamp plus the given
minutes/hours/days. If not set defaults to one day (24 hours).
The value must be in range [-7d - 7d].
2dExample: 2dPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$DEPRECATED: Considers events starting till the from timestamp plus the given
hours. If not set defaults to one day (24 hours).
Number of leagues to return.
5Example: 5Optional filtering of the leagues to retrieve. It expects a string
adhering to the filtering format, as described in the filtering
section, e.g. sport:eq:Soccer.
country:eq:EnglandPossible values: The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
List of event types to consider when generating recommendations. One or more types can be provided. Available options are:
match: Standard matches to be considered.seasonal: Seasonal events to be considered.forced_events: Handpicked events to be considered regardless of their start_time.
match,forced_eventsPossible values: Applies a limit to a group of items. For more information, head to
Limiting -> Group Limiting section of the docs.
country:5,country_id:2.
Optional dynamic filtering of the items to retrieve. If any dynamic filter is set,
the filter's value will be dynamically calculated and used. Notice that for user
related filters, the user query parameter must be provided. For example,
dynamic_filters=user_country will return data related only to the user's specific country.
The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+league_confidence,-sport_confidence.
Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. country,country_id.
The location of the page where the request takes place.
inplay_widgetConsiders bets placed after the current timestamp minus the given
minutes/hours/days. If not set defaults to 2 days.
The value must be in range [1m - 7d].
2dExample: 3hPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/sports/leagues/trending HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"confidence": 1,
"country": "International",
"country_id": "sr:category:4",
"league": "Euro Cup",
"league_id": "sr:tournament:1",
"score": 898.3169,
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.6198989465744216,
"country": "Norway",
"country_id": "sr:category:5",
"league": "1st Division",
"league_id": "sr:tournament:22",
"score": 556.8657000000001,
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.03104216340580924,
"country": "Russia",
"country_id": "sr:category:1683",
"league": "Liga Pro",
"league_id": "sr:tournament:32133",
"score": 27.8857,
"sport": "Table Tennis",
"sport_id": "sr:sport:20"
},
{
"confidence": 0.02298253545046297,
"country": "USA",
"country_id": "sr:category:15",
"league": "NBA",
"league_id": "sr:tournament:132",
"score": 20.6456,
"sport": "Basketball",
"sport_id": "sr:sport:2"
},
{
"confidence": 0.020016655592252578,
"country": "International",
"country_id": "sr:category:88",
"league": "TT Cup",
"league_id": "sr:tournament:32129",
"score": 17.9813,
"sport": "Table Tennis",
"sport_id": "sr:sport:20"
},
{
"confidence": 0.018664237531321074,
"country": "International",
"country_id": "sr:category:103",
"league": "Olympic Games, QF",
"league_id": "sr:tournament:432",
"score": 16.7664,
"sport": "Basketball",
"sport_id": "sr:sport:2"
},
{
"confidence": 0.013444253358697804,
"country": "ATP",
"country_id": "sr:category:3",
"league": "Wimbledon Men Double",
"league_id": "sr:tournament:2557",
"score": 12.0772,
"sport": "Tennis",
"sport_id": "sr:sport:5"
},
{
"confidence": 0.011548040563413646,
"country": "WTA",
"country_id": "sr:category:6",
"league": "Wimbledon Women Singles",
"league_id": "sr:tournament:2559",
"score": 10.373800000000001,
"sport": "Tennis",
"sport_id": "sr:sport:5"
},
{
"confidence": 0.0038243742269571017,
"country": "Russia",
"country_id": "sr:category:262",
"league": "Pro League",
"league_id": "sr:tournament:32175",
"score": 3.4355,
"sport": "Volleyball",
"sport_id": "sr:sport:23"
},
{
"confidence": 0.0031227287385999307,
"country": "USA",
"country_id": "sr:category:37",
"league": "NHL",
"league_id": "sr:tournament:234",
"score": 2.8052,
"sport": "Ice Hockey",
"sport_id": "sr:sport:4"
}
],
"status": "success"
}Was this helpful?