/
v3.0.11Get access

subscribeToGamesCount

This API function establishes a real-time subscription to track the numeric count of active matches/games rather than streaming the match data itself. It allows the frontend to maintain highly accurate, live-updating badge counts across navigation menus and sports categories by filtering down through the sports hierarchy.

Request parameters:

NameDescriptionTypeValuesDefault
gameType
Filters the count based on the live status of the matchesstring"sport", "live", "willBeLiveSoon"-
sportAlias
Scopes the match count to a specific sport aliasstring--
regionAlias
Narrows the count down to a specific geographical regionstring--
competitionId
Targets a single tournament or league to count how many fixtures are currently available or active within it.number--
includeSportTypes
An array of specific sport types to explicitly target for counting.array["esport", "racing", "virtual", "general", "fighting"]-
excludeSportTypes
An array of sport types to completely ignore (useful for hiding virtual sports, esports, or niche categories from a global counter).array["esport", "racing", "virtual", "general", "fighting"]-

Call example:

subscribeToGamesCount({
  excludeSportTypes: ['virtual', 'racing'],
  gameType: 'live'
})

Response examples:

{
  game: 148
}