Events

Sport events related endpoints

get
/api/sports/events/trending

Returns trending events for the given time frame.

The events are sorted by trending score.

Trending score

To calculate trending score for an event, each bet placed on this event 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 event as its confidence.

Filtering example

In this example we get all trending events where league is UEFA Champions League.

$ curl --request GET \
  --url 'https://api.vaix.ai/api/sports/events/trending?filters=league%3Aeq%3AUEFA%20Champions%20League'
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
userstringOptional

The user to get recommendations for.

fromstring · date-timeOptional

The minimum event's starting datetime. If not explicitly set it defaults to now.

from_offsetstringOptional

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].

Default: 0Example: -3hPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
to_offsetstringOptional

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].

Default: 2dExample: 2dPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
hoursinteger · min: 1 · max: 72Optional

DEPRECATED: Considers events starting till the from timestamp plus the given hours. If not set defaults to one day (24 hours).

countinteger · min: 1Optional

Number of events to return.

Default: 100Example: 5
exclude_n_popularintegerOptional

Excludes the top n popular events from the results.

Default: 0
filtersstring · enumOptional

Optional filtering of the events to retrieve. It expects a string adhering to the filtering format, as described in the filtering section, e.g. sport:eq:Soccer.

Example: sport:in:Soccer,BasketballPossible values:
event_typesstring · enumOptional

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.
Default: match,forced_eventsPossible values:
operatorstringOptional

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.

bookmaker_idintegerOptional

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.

sub_bookmaker_idintegerOptional

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.

group_limitstring · enumOptional

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.

Possible values:
dynamic_filtersstring · enumOptional

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.

Possible values:
order_bystring · enumOptional

The columns to sort the results by. It expects a string adhering to the ordering format, as described in the ordering section, e.g. +event_confidence,-league_confidence.

Possible values:
reorder_bystring · enumOptional

Optional re ordering of the results based on one or more metrics. Expected format is a comma separated list of keywords where each value should be a float in the range [0,1]. e.g. recommended:0.3,popular:0.2. For more information head to the ordering documentation section.

Possible values:
populationinteger · min: 1Optional

Number of items to use when reordering items with reorder_by parameter. This parameter is meaningful only when reorder_by is also set. If not set, then count will be used as population.

Example: 5
fieldsstring · enumOptional

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. event_id,event_type.

Default: ["event_id","event_type","begin","country","country_id","league","league_id","sport","sport_id","participants","participant_ids","status","confidence","score"]Possible values:
locationstringOptional

The location of the page where the request takes place.

Example: inplay_widget
trending_withinstringOptional

Considers 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].

Default: 2dExample: 3hPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
query_typestring · enumOptional

The sports inference query type. If events the query will use the users_event and users_bet tables to calculate the total bets for each event, distinct per player_id, event_id. If stats_events the query will use the pre-populated table stats_event. To use this option make sure that the stats_events table exists and is being updated since not all operator support it.

Note: stats_events option doesn't support user demographic filters.

Default: eventsPossible values:
Header parameters
x-vaix-client-idstringRequired

Custom client header, the value should be the name of the group the user belongs to

x-vaix-authentication-methodstringOptional

Authentication method to be used, supported values [vaix, iam]. Defaults to vaix

Responses
200

OK

application/json
get
/api/sports/events/trending
GET /api/sports/events/trending HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
  "data": [
    {
      "begin": "2021-07-02T16:00:00Z",
      "confidence": 1,
      "country": "International",
      "country_id": "sr:category:4",
      "event_id": "sr:match:21514503",
      "event_type": null,
      "league": "Euro Cup",
      "league_id": "sr:tournament:1",
      "participant_ids": [
        "sr:competitor:4699",
        "sr:competitor:4698"
      ],
      "participants": [
        "Switzerland",
        "Spain"
      ],
      "score": 480.0202,
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-03T00:00:00Z",
      "confidence": 0.6169990346239597,
      "country": "International",
      "country_id": "sr:category:4",
      "event_id": "sr:match:27738714",
      "event_type": null,
      "league": "Copa America",
      "league_id": "sr:tournament:133",
      "participant_ids": [
        "sr:competitor:4748",
        "sr:competitor:4754"
      ],
      "participants": [
        "Brazil",
        "Chile"
      ],
      "score": 296.172,
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T00:30:00Z",
      "confidence": 0.5946593497523647,
      "country": "Chile",
      "country_id": "sr:category:49",
      "event_id": "sr:match:27913362",
      "event_type": null,
      "league": "Copa Chile",
      "league_id": "sr:tournament:1221",
      "participant_ids": [
        "sr:competitor:3161",
        "sr:competitor:434014"
      ],
      "participants": [
        "Universidad de Chile",
        "Arturo Fernandez Vial"
      ],
      "score": 285.4485,
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T01:30:00Z",
      "confidence": 0.46657932312015205,
      "country": "USA",
      "country_id": "sr:category:26",
      "event_id": "sr:match:26574064",
      "event_type": null,
      "league": "Major League Soccer",
      "league_id": "sr:tournament:242",
      "participant_ids": [
        "sr:competitor:772256",
        "sr:competitor:22007"
      ],
      "participants": [
        "Austin FC",
        "Portland Timbers"
      ],
      "score": 223.9675,
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T01:00:00Z",
      "confidence": 0.4522461763067471,
      "country": "USA",
      "country_id": "sr:category:26",
      "event_id": "sr:match:26682066",
      "event_type": null,
      "league": "USL Championship",
      "league_id": "sr:tournament:28163",
      "participant_ids": [
        "sr:competitor:206017",
        "sr:competitor:235850"
      ],
      "participants": [
        "Colorado Springs Switchbacks FC",
        "Orange County SC"
      ],
      "score": 217.0873,
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    }
  ],
  "status": "success"
}

Get similar events

get
/api/sports/events/similar

Returns similar events for the given event id(s). Only events starting between the requested time range will be considered.

The events 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 selection as its confidence.

Query example

In this example we get the similar events to the event with id SBTE_25008061

$ curl --request GET \
  --url 'https://api.vaix.ai/api/sports/events/similar?event_ids=SBTE_25008061'

Getting live similar events

In this example we get live events similar to the event with id SBTE_25008061. Notice the from_offset parameter that should be provided with a negative value, to return events that are already live for a maximum of 3 hours.

$ curl --request GET \
  --url 'https://api.vaix.ai/api/sports/events/similar?event_ids=SBTE_25008061&filters=status%3Aeq%3Alive&from_offset=-3h'
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
event_idsstringRequired

Comma separated list of event ids for which to return similar events. If multiple events are provided the events returned are going to be the ones with the shortest average distance to all of the provided events.

Example: sr:match:27971270
fromstring · date-timeOptional

The minimum event's starting datetime. If not explicitly set it defaults to now.

from_offsetstringOptional

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].

Default: 0Example: -3hPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
to_offsetstringOptional

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].

Default: 2dExample: 2dPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
hoursinteger · min: 1 · max: 72Optional

DEPRECATED: Considers events starting till the from timestamp plus the given hours. If not set defaults to one day (24 hours).

countinteger · min: 1Optional

Number of events to return.

Default: 100Example: 5
filtersstring · enumOptional

Optional filtering of the events to retrieve. It expects a string adhering to the filtering format, as described in the filtering section, e.g. sport:eq:Soccer.

Example: sport:in:Soccer,BasketballPossible values:
operatorstringOptional

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.

bookmaker_idintegerOptional

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.

sub_bookmaker_idintegerOptional

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.

event_typesstring · enumOptional

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.
Default: match,forced_eventsPossible values:
order_bystring · enumOptional

The columns to sort the results by. It expects a string adhering to the ordering format, as described in the ordering section, e.g. +event_confidence,-league_confidence.

Possible values:
fieldsstring · enumOptional

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. event_id,event_type.

Default: ["event_id","event_type","begin","country","country_id","league","league_id","sport","sport_id","participants","participant_ids","status","confidence","distance"]Possible values:
include_inputbooleanOptional

If it's true include input items in response. By default is set to false.

Default: false
unique_participantsbooleanOptional

If true, ensures that all participants will be unique in respect to the input events' participants. Defaults to false.

Default: false
query_typestring · enumOptional

The sports inference query type. If events the query will use the users_event and users_bet tables to calculate the total bets for each event, distinct per player_id, event_id. If stats_events the query will use the pre-populated table stats_event. To use this option make sure that the stats_events table exists and is being updated since not all operator support it.

Note: stats_events option doesn't support user demographic filters.

Default: eventsPossible values:
locationstringOptional

The location of the page where the request takes place.

Example: inplay_widget
Header parameters
x-vaix-client-idstringRequired

Custom client header, the value should be the name of the group the user belongs to

x-vaix-authentication-methodstringOptional

Authentication method to be used, supported values [vaix, iam]. Defaults to vaix

Responses
200

OK

application/json
get
/api/sports/events/similar
GET /api/sports/events/similar?event_ids=text HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
  "data": [
    {
      "begin": "2021-07-02T19:00:00Z",
      "confidence": 1,
      "country": "International",
      "country_id": "sr:category:4",
      "distance": 2.9910531044006348,
      "event_id": "sr:match:21516115",
      "event_type": null,
      "league": "Euro Cup",
      "league_id": "sr:tournament:1",
      "participant_ids": [
        "sr:competitor:4717",
        "sr:competitor:4707"
      ],
      "participants": [
        "Belgium",
        "Italy"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-03T16:00:00Z",
      "confidence": 0.9393898133192602,
      "country": "International",
      "country_id": "sr:category:4",
      "distance": 5.696497440338135,
      "event_id": "sr:match:21514507",
      "event_type": null,
      "league": "Euro Cup",
      "league_id": "sr:tournament:1",
      "participant_ids": [
        "sr:competitor:4714",
        "sr:competitor:4476"
      ],
      "participants": [
        "Czech Republic",
        "Denmark"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-03T05:00:00Z",
      "confidence": 0.06440678397027055,
      "country": "Rugby League",
      "country_id": "sr:category:83",
      "distance": 44.752933502197266,
      "event_id": "sr:match:24719112",
      "event_type": null,
      "league": "NRL",
      "league_id": "sr:tournament:294",
      "participant_ids": [
        "sr:competitor:4253",
        "sr:competitor:4259"
      ],
      "participants": [
        "Canterbury-Bankstown Bulldogs",
        "Manly Sea Eagles"
      ],
      "sport": "Rugby",
      "sport_id": "sr:sport:12",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T20:30:00Z",
      "confidence": 0,
      "country": "Portugal",
      "country_id": "sr:category:286",
      "distance": 47.627845764160156,
      "event_id": "sr:match:24710548",
      "event_type": null,
      "league": "2A Divisao",
      "league_id": "sr:simple_tournament:29547",
      "participant_ids": [
        "sr:competitor:544883",
        "sr:competitor:297336"
      ],
      "participants": [
        "FC Porto B",
        "AD Modicus Sandim"
      ],
      "sport": "Handball",
      "sport_id": "sr:sport:6",
      "status": "not_started"
    }
  ],
  "status": "success"
}

Get frequently combined events

get
/api/sports/events/combined

Returns events that the players who have placed bets on the event with the given event_id have also placed bets on (not necessarily in the same betslip).

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
event_idstringRequired

The event id for which we seek frequently combined events.

Example: sr:match:21514503
fromstring · date-timeOptional

The minimum event's starting datetime. If not explicitly set it defaults to now.

from_offsetstringOptional

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].

Default: 0Example: -3hPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
to_offsetstringOptional

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].

Default: 2dExample: 2dPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
hoursinteger · min: 1 · max: 72Optional

DEPRECATED: Considers events starting till the from timestamp plus the given hours. If not set defaults to one day (24 hours).

countinteger · min: 1Optional

Number of events to return.

Default: 100Example: 5
operatorstringOptional

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.

bookmaker_idintegerOptional

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.

sub_bookmaker_idintegerOptional

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.

event_typesstring · enumOptional

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.
Default: match,forced_eventsPossible values:
fieldsstring · enumOptional

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. event_id,event_type.

Default: ["event_id","event_type","begin","country","country_id","league","league_id","sport","sport_id","participants","participant_ids","status","times_combined"]Possible values:
locationstringOptional

The location of the page where the request takes place.

Example: inplay_widget
filtersstring · enumOptional

Optional filtering of the events to retrieve. It expects a string adhering to the filtering format, as described in the filtering section, e.g. sport:eq:Soccer.

Example: sport:in:Soccer,BasketballPossible values:
Header parameters
x-vaix-client-idstringRequired

Custom client header, the value should be the name of the group the user belongs to

x-vaix-authentication-methodstringOptional

Authentication method to be used, supported values [vaix, iam]. Defaults to vaix

Responses
200

OK

application/json
get
/api/sports/events/combined
GET /api/sports/events/combined?event_id=text HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
  "data": [
    {
      "begin": "2020-01-03T13:00:00Z",
      "country": "Israel",
      "country_id": "sr:category:66",
      "event_id": "sr:match:18499668",
      "event_type": null,
      "league": "National League",
      "league_id": "sr:tournament:727",
      "participant_ids": [
        "sr:competitor:5199",
        "sr:competitor:7381"
      ],
      "participants": [
        "Hapoel Petah Tikva FC",
        "Hapoel Ashkelon FC"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "times_combined": 2
    },
    {
      "begin": "2020-01-03T13:00:00Z",
      "country": "Israel",
      "country_id": "sr:category:66",
      "event_id": "sr:match:18499676",
      "event_type": null,
      "league": "National League",
      "league_id": "sr:tournament:727",
      "participant_ids": [
        "sr:competitor:5394",
        "sr:competitor:238982"
      ],
      "participants": [
        "Hapoel Rishon Lezion FC",
        "FC Kafr Qasim"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "times_combined": 2
    },
    {
      "begin": "2020-01-03T13:00:00Z",
      "country": "Israel",
      "country_id": "sr:category:66",
      "event_id": "sr:match:18499678",
      "event_type": null,
      "league": "National League",
      "league_id": "sr:tournament:727",
      "participant_ids": [
        "sr:competitor:5393",
        "sr:competitor:7380"
      ],
      "participants": [
        "Hapoel Nof Hagalil FC",
        "Hapoel Acre FC"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "times_combined": 2
    },
    {
      "begin": "2020-01-03T13:00:00Z",
      "country": "Israel",
      "country_id": "sr:category:66",
      "event_id": "sr:match:18506794",
      "event_type": null,
      "league": "National League",
      "league_id": "sr:tournament:727",
      "participant_ids": [
        "sr:competitor:7385",
        "sr:competitor:86406"
      ],
      "participants": [
        "Hapoel Ramat Gan Givatayim FC",
        "Hapoel Jerusalem FC"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "times_combined": 2
    },
    {
      "begin": "2020-01-03T11:45:00Z",
      "country": "Portugal",
      "country_id": "sr:category:44",
      "event_id": "sr:match:18886698",
      "event_type": null,
      "league": "U23 Championship",
      "league_id": "sr:tournament:26080",
      "participant_ids": [
        "sr:competitor:473115",
        "sr:competitor:452101"
      ],
      "participants": [
        "CD Aves",
        "Rio Ave"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "times_combined": 2
    }
  ],
  "status": "success"
}
get
/api/sports/events/recommended

Returns personalized event recommendations. Only 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.

Result ordering

By default events are sorted based on confidence, with the most confident one on top. The order_by parameter can be used to order the results in the desired order.

Picking the correct date parameters

To best utilize the endpoint and its caching mechanisms, it is advised to use the from parameter only when requesting items for a specific datetime, e.g 2021-12-25 19:45:00. To query for the current datetime plus/minus a given amount, it is heavily recommended to avoid using from and use the from_offset parameter instead.

Getting live recommended events

In this example we get all recommended events for the user with id 1 where status is live. Notice the from_offset parameter that should be provided with a negative value, to return events that are already live for a maximum of 2 hours.

$ curl --request GET \
  --url 'https://api.vaix.ai/api/sports/events/recommended?user=1&filters=status%3Aeq%3Alive&from_offset=-2h'
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
userstringRequired

The user to get recommendations for.

fromstring · date-timeOptional

The minimum event's starting datetime. If not explicitly set it defaults to now.

from_offsetstringOptional

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].

Default: 0Example: -3hPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
to_offsetstringOptional

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].

Default: 2dExample: 2dPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
hoursinteger · min: 1 · max: 72Optional

DEPRECATED: Considers events starting till the from timestamp plus the given hours. If not set defaults to one day (24 hours).

countinteger · min: 1Optional

Number of events to return.

Default: 100Example: 5
exclude_n_popularintegerOptional

Excludes the top n popular events from the results.

Default: 0
filtersstring · enumOptional

Optional filtering of the events to retrieve. It expects a string adhering to the filtering format, as described in the filtering section, e.g. sport:eq:Soccer.

Example: sport:in:Soccer,BasketballPossible values:
event_typesstring · enumOptional

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.
Default: match,forced_eventsPossible values:
operatorstringOptional

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.

bookmaker_idintegerOptional

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.

sub_bookmaker_idintegerOptional

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.

group_limitstring · enumOptional

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.

Possible values:
prioritized_limitstring · enumOptional

Applies prioritization limits to a group of items. The limited items are ensured to be present in the response. It expects a string adhering to the prioritized_limit format, e.g. field:value_1=2,value_2=4. For more information head to the Limiting -> Prioritized limiting section of the docs.

Possible values:
order_bystring · enumOptional

The columns to sort the results by. It expects a string adhering to the ordering format, as described in the ordering section, e.g. +event_confidence,-league_confidence.

Possible values:
reorder_bystring · enumOptional

Optional re ordering of the results based on one or more metrics. Expected format is a comma separated list of keywords where each value should be a float in the range [0,1]. e.g. popular:0.3,trending:0.2. For more information head to the ordering documentation section.

Possible values:
populationinteger · min: 1Optional

Number of items to use when reordering items with reorder_by parameter. This parameter is meaningful only when reorder_by is also set. If not set, then count will be used as population.

Example: 5
fieldsstring · enumOptional

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. event_id,event_type.

Default: ["event_id","event_type","begin","country","country_id","league","league_id","sport","sport_id","participants","participant_ids","status","confidence","league_confidence","sport_confidence","country_confidence"]Possible values:
rawstring · enumOptional

Comma separated list of keywords. If given, this input will be used as user demographics data for the recommendations, e.g country:gr,city:ath.

Possible values:
locationstringOptional

The location of the page where the request takes place.

Example: inplay_widget
diversity_limitstring · enumOptional

A string in the format 'field:value', where 'field' is a supported field and 'value' is a positive integer. Used for configuration, filtering, or limiting based on field values.

Example: sport:3Possible values:
exclude_topstring · enumOptional

A string in the format 'field:value', where 'field' is a supported field and 'value' is a positive integer. Used for configuration, filtering, or limiting based on field values.

Example: sport_id:1Possible values:
Header parameters
x-vaix-client-idstringRequired

Custom client header, the value should be the name of the group the user belongs to

x-vaix-authentication-methodstringOptional

Authentication method to be used, supported values [vaix, iam]. Defaults to vaix

Responses
200

OK

application/json
get
/api/sports/events/recommended
GET /api/sports/events/recommended?user=text HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
  "data": [
    {
      "begin": "2021-07-02T14:00:00Z",
      "confidence": 0.723419964,
      "country": "International Clubs",
      "country_confidence": 0.723419964,
      "country_id": "sr:category:393",
      "event_id": "sr:match:27186050",
      "event_type": null,
      "league": "AFC Champions League",
      "league_confidence": 0.723419964,
      "league_id": "sr:tournament:463",
      "participant_ids": [
        "sr:competitor:7644",
        "sr:competitor:3376"
      ],
      "participants": [
        "Daegu FC",
        "Beijing Guoan"
      ],
      "sport": "Soccer",
      "sport_confidence": 0.723419964,
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T16:00:00Z",
      "confidence": 0.689064801,
      "country": "International",
      "country_confidence": 0.689064801,
      "country_id": "sr:category:4",
      "event_id": "sr:match:21514503",
      "event_type": null,
      "league": "Euro Cup",
      "league_confidence": 0.689064801,
      "league_id": "sr:tournament:1",
      "participant_ids": [
        "sr:competitor:4699",
        "sr:competitor:4698"
      ],
      "participants": [
        "Switzerland",
        "Spain"
      ],
      "sport": "Soccer",
      "sport_confidence": 0.723419964,
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T16:30:00Z",
      "confidence": 0.648355,
      "country": "International Clubs",
      "country_confidence": 0.723419964,
      "country_id": "sr:category:393",
      "event_id": "sr:match:27925686",
      "event_type": null,
      "league": "Club Friendly Games",
      "league_confidence": 0.648355,
      "league_id": "sr:tournament:853",
      "participant_ids": [
        "sr:competitor:6281",
        "sr:competitor:218138"
      ],
      "participants": [
        "SKU Amstetten",
        "SV Stripfing"
      ],
      "sport": "Soccer",
      "sport_confidence": 0.723419964,
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T12:00:00Z",
      "confidence": 0.623228192,
      "country": "International Clubs",
      "country_confidence": 0.723419964,
      "country_id": "sr:category:393",
      "event_id": "sr:match:27710342",
      "event_type": null,
      "league": "Club Friendly Games",
      "league_confidence": 0.648355,
      "league_id": "sr:tournament:853",
      "participant_ids": [
        "sr:competitor:1676",
        "sr:competitor:1662"
      ],
      "participants": [
        "Amiens SC",
        "Le Havre AC"
      ],
      "sport": "Soccer",
      "sport_confidence": 0.723419964,
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T12:00:00Z",
      "confidence": 0.62144506,
      "country": "International Clubs",
      "country_confidence": 0.723419964,
      "country_id": "sr:category:393",
      "event_id": "sr:match:27982086",
      "event_type": null,
      "league": "Club Friendly Games",
      "league_confidence": 0.648355,
      "league_id": "sr:tournament:853",
      "participant_ids": [
        "sr:competitor:212844",
        "sr:competitor:2333"
      ],
      "participants": [
        "FK Nizhny Novgorod",
        "FK Rubin Kazan"
      ],
      "sport": "Soccer",
      "sport_confidence": 0.723419964,
      "sport_id": "sr:sport:1",
      "status": "closed"
    }
  ],
  "status": "success"
}

Sort list of events

get
/api/sports/events/sorted

Ranks a specific set of events for a given user. A confidence value is assigned to each event and the results are returned sorted by relevance.

Endpoint usage

This endpoint should be used to rank a static set of events, for example to personalize the promoted events of the day for each user. To get the most relevant recommendations across all the available events refer to get_recommended_events.

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.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
userstringRequired

The user to get recommendations for.

event_idsstringRequired

Comma separated list of event ids to rank.

Example: sr:match:21514503,sr:match:25852926,sr:match:21516115
operatorstringOptional

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.

bookmaker_idintegerOptional

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.

sub_bookmaker_idintegerOptional

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.

fieldsstring · enumOptional

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. event_id,event_type.

Default: ["event_id","event_type","begin","country","country_id","league","league_id","sport","sport_id","participants","participant_ids","status","confidence"]Possible values:
locationstringOptional

The location of the page where the request takes place.

Example: inplay_widget
rawstring · enumOptional

Comma separated list of keywords. If given, this input will be used as user demographics data for the recommendations, e.g country:gr,city:ath.

Possible values:
Header parameters
x-vaix-client-idstringRequired

Custom client header, the value should be the name of the group the user belongs to

x-vaix-authentication-methodstringOptional

Authentication method to be used, supported values [vaix, iam]. Defaults to vaix

Responses
200

OK

application/json
get
/api/sports/events/sorted
GET /api/sports/events/sorted?user=text&event_ids=text HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
  "data": [
    {
      "begin": "2021-07-02T16:00:00Z",
      "confidence": 0.734172881,
      "country": "International",
      "country_id": "sr:category:4",
      "event_id": "sr:match:21514503",
      "event_type": null,
      "league": "Euro Cup",
      "league_id": "sr:tournament:1",
      "participant_ids": [
        "sr:competitor:4699",
        "sr:competitor:4698"
      ],
      "participants": [
        "Switzerland",
        "Spain"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T19:00:00Z",
      "confidence": 0.680896223,
      "country": "International",
      "country_id": "sr:category:4",
      "event_id": "sr:match:21516115",
      "event_type": null,
      "league": "Euro Cup",
      "league_id": "sr:tournament:1",
      "participant_ids": [
        "sr:competitor:4717",
        "sr:competitor:4707"
      ],
      "participants": [
        "Belgium",
        "Italy"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    },
    {
      "begin": "2021-07-02T19:00:00Z",
      "confidence": 0.567047298,
      "country": "Ireland",
      "country_id": "sr:category:51",
      "event_id": "sr:match:25852926",
      "event_type": null,
      "league": "Premier Division",
      "league_id": "sr:tournament:192",
      "participant_ids": [
        "sr:competitor:3177",
        "sr:competitor:3179"
      ],
      "participants": [
        "Shamrock Rovers",
        "Dundalk FC"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed"
    }
  ],
  "status": "success"
}
get
/api/sports/events/popular

Returns popular events for the given time frame.

The events are sorted by popularity.

Popularity

The metric used to measure popularity is the number of bets placed on each event.

The normalized value of its total bets is also assigned to each event as its confidence.

Filtering example

In this example we get all popular events where league is UEFA Champions League.

$ curl --request GET \
  --url 'https://api.vaix.ai/api/sports/events/popular?filters=league%3Aeq%3AUEFA%20Champions%20League'
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
userstringOptional

The user to get recommendations for.

fromstring · date-timeOptional

The minimum event's starting datetime. If not explicitly set it defaults to now.

from_offsetstringOptional

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].

Default: 0Example: -3hPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
to_offsetstringOptional

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].

Default: 2dExample: 2dPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$
hoursinteger · min: 1 · max: 72Optional

DEPRECATED: Considers events starting till the from timestamp plus the given hours. If not set defaults to one day (24 hours).

countinteger · min: 1Optional

Number of events to return.

Default: 100Example: 5
filtersstring · enumOptional

Optional filtering of the events to retrieve. It expects a string adhering to the filtering format, as described in the filtering section, e.g. sport:eq:Soccer.

Example: sport:in:Soccer,BasketballPossible values:
event_typesstring · enumOptional

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.
Default: match,forced_eventsPossible values:
operatorstringOptional

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.

bookmaker_idintegerOptional

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.

sub_bookmaker_idintegerOptional

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.

group_limitstring · enumOptional

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.

Possible values:
dynamic_filtersstring · enumOptional

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.

Possible values:
order_bystring · enumOptional

The columns to sort the results by. It expects a string adhering to the ordering format, as described in the ordering section, e.g. +event_confidence,-league_confidence.

Possible values:
reorder_bystring · enumOptional

Optional re ordering of the results based on one or more metrics. Expected format is a comma separated list of keywords where each value should be a float in the range [0,1]. e.g. recommended:0.3,trending:0.2. For more information head to the ordering documentation section.

Possible values:
populationinteger · min: 1Optional

Number of items to use when reordering items with reorder_by parameter. This parameter is meaningful only when reorder_by is also set. If not set, then count will be used as population.

Example: 5
fieldsstring · enumOptional

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. event_id,event_type.

Default: ["event_id","event_type","begin","country","country_id","league","league_id","sport","sport_id","participants","participant_ids","status","confidence","total_bets"]Possible values:
locationstringOptional

The location of the page where the request takes place.

Example: inplay_widget
Header parameters
x-vaix-client-idstringRequired

Custom client header, the value should be the name of the group the user belongs to

x-vaix-authentication-methodstringOptional

Authentication method to be used, supported values [vaix, iam]. Defaults to vaix

Responses
200

OK

application/json
get
/api/sports/events/popular
GET /api/sports/events/popular HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
  "data": [
    {
      "begin": "2021-07-02T19:00:00Z",
      "confidence": 1,
      "country": "International",
      "country_id": "sr:category:4",
      "event_id": "sr:match:21516115",
      "event_type": null,
      "league": "Euro Cup",
      "league_id": "sr:tournament:1",
      "participant_ids": [
        "sr:competitor:4717",
        "sr:competitor:4707"
      ],
      "participants": [
        "Belgium",
        "Italy"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "total_bets": 2170
    },
    {
      "begin": "2021-07-02T16:00:00Z",
      "confidence": 0.8585253456221198,
      "country": "International",
      "country_id": "sr:category:4",
      "event_id": "sr:match:21514503",
      "event_type": null,
      "league": "Euro Cup",
      "league_id": "sr:tournament:1",
      "participant_ids": [
        "sr:competitor:4699",
        "sr:competitor:4698"
      ],
      "participants": [
        "Switzerland",
        "Spain"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "total_bets": 1863
    },
    {
      "begin": "2021-07-03T00:00:00Z",
      "confidence": 0.5285714285714286,
      "country": "International",
      "country_id": "sr:category:4",
      "event_id": "sr:match:27738714",
      "event_type": null,
      "league": "Copa America",
      "league_id": "sr:tournament:133",
      "participant_ids": [
        "sr:competitor:4748",
        "sr:competitor:4754"
      ],
      "participants": [
        "Brazil",
        "Chile"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "total_bets": 1147
    },
    {
      "begin": "2021-07-02T21:00:00Z",
      "confidence": 0.3497695852534562,
      "country": "International",
      "country_id": "sr:category:4",
      "event_id": "sr:match:27738708",
      "event_type": null,
      "league": "Copa America",
      "league_id": "sr:tournament:133",
      "participant_ids": [
        "sr:competitor:4790",
        "sr:competitor:4789"
      ],
      "participants": [
        "Peru",
        "Paraguay"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "total_bets": 759
    },
    {
      "begin": "2021-07-02T18:45:00Z",
      "confidence": 0.3336405529953917,
      "country": "Ireland",
      "country_id": "sr:category:51",
      "event_id": "sr:match:26142132",
      "event_type": null,
      "league": "First Division",
      "league_id": "sr:tournament:193",
      "participant_ids": [
        "sr:competitor:3174",
        "sr:competitor:190654"
      ],
      "participants": [
        "Shelbourne FC",
        "Cabinteely FC"
      ],
      "sport": "Soccer",
      "sport_id": "sr:sport:1",
      "status": "closed",
      "total_bets": 724
    }
  ],
  "status": "success"
}

Was this helpful?