Sports
Sport related endpoints
Returns trending sports for the given time frame.
Only sports 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 sport, each bet placed on an event of this sport 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 sport as its confidence.
Filtering example
In this example we get all trending sports taking place in USA.
$ curl --request GET \
--url 'https://api.vaix.ai/api/sports/sports/trending?filters=country%3Aeq%3AUSA'The user to get recommendations for.
Sports 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: 0Pattern: ^[+-]?[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 sports to return.
5Example: 5Optional filtering of the sports to retrieve. It expects a string
adhering to the filtering format, as described in the filtering
section, e.g. sport:eq:Soccer.
sport:eq:SoccerPossible 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. sport,sport_id.
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 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/sports/trending HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"score": 6419.4403,
"sport_id": "sr:sport:1"
},
{
"score": 74.0655,
"sport_id": "sr:sport:2"
},
{
"score": 67.9125,
"sport_id": "sr:sport:5"
},
{
"score": 45.867000000000004,
"sport_id": "sr:sport:20"
},
{
"score": 3.7195,
"sport_id": "sr:sport:4"
}
],
"status": "success"
}Returns popular sports for the given time frame.
Only sports 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 sport.
The normalized value of its total bets is also assigned to each sport as its confidence.
Filtering example
In this example we get all popular sports taking place in USA.
$ curl --request GET \
--url 'https://api.vaix.ai/api/sports/sports/popular?filters=country%3Aeq%3AUSA'The user to get recommendations for.
Sports 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: 0Pattern: ^[+-]?[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 sports to return.
5Example: 5Optional filtering of the sports to retrieve. It expects a string
adhering to the filtering format, as described in the filtering
section, e.g. sport:eq:Soccer.
sport:eq:SoccerPossible 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. sport,sport_id.
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 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/sports/popular HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"confidence": 1,
"sport": "Soccer",
"sport_id": "sr:sport:1",
"total_bets": 102833
},
{
"confidence": 0.022521953069539934,
"sport": "Tennis",
"sport_id": "sr:sport:5",
"total_bets": 2316
},
{
"confidence": 0.017241546974220336,
"sport": "Table Tennis",
"sport_id": "sr:sport:20",
"total_bets": 1773
},
{
"confidence": 0.006544591716666829,
"sport": "Basketball",
"sport_id": "sr:sport:2",
"total_bets": 673
},
{
"confidence": 0.0010307975066369745,
"sport": "Volleyball",
"sport_id": "sr:sport:23",
"total_bets": 106
},
{
"confidence": 0.0008363074110450925,
"sport": "Darts",
"sport_id": "sr:sport:22",
"total_bets": 86
},
{
"confidence": 0.0007779603823675279,
"sport": "Rugby",
"sport_id": "sr:sport:12",
"total_bets": 80
},
{
"confidence": 0.00022366360993066427,
"sport": "Ice Hockey",
"sport_id": "sr:sport:4",
"total_bets": 23
},
{
"confidence": 0.00009724504779594099,
"sport": "Cricket",
"sport_id": "sr:sport:21",
"total_bets": 10
},
{
"confidence": 0.00007779603823675279,
"sport": "Handball",
"sport_id": "sr:sport:6",
"total_bets": 8
}
],
"status": "success"
}Returns personalized sport recommendations.
Only sports 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 sports taking place in USA.
$ curl --request GET \
--url 'https://api.vaix.ai/api/sports/sports/recommended?filters=country%3Aeq%3AUSA'The user to get recommendations for.
Sports 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: 0Pattern: ^[+-]?[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 sports to return.
5Example: 5Optional filtering of the sports to retrieve. It expects a string
adhering to the filtering format, as described in the filtering
section, e.g. sport:eq:Soccer.
sport:eq:SoccerPossible 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. sport,sport_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/sports/recommended?user=text HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"confidence": 1,
"sport": "Soccer",
"sport_id": "sr:sport:1"
},
{
"confidence": 0.013570194917345176,
"sport": "Basketball",
"sport_id": "sr:sport:2"
},
{
"confidence": 0.0076486553170490995,
"sport": "Rugby",
"sport_id": "sr:sport:12"
},
{
"confidence": 0.005921539600296077,
"sport": "Tennis",
"sport_id": "sr:sport:5"
},
{
"confidence": 0.005674808783617074,
"sport": "Table Tennis",
"sport_id": "sr:sport:20"
}
],
"status": "success"
}Was this helpful?