Skip to content
Roblox API Reference

RecommendationService

A service that provides an interface for you to manage and display personalized content recommendations.
  • Not creatable
  • Service
Memory category
Instances
Own members
8
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods50

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byRecommendationService8
  • RecommendationService:GenerateItemListAsync(generateRecommendationItemListRequest: { [string]: any }): RecommendationPages
    Returns a paginated list of personalized recommendation items for the specified request configuration.
    • Yields
    • Capabilities: Basic
    Parameters
    ParameterDescription
    generateRecommendationItemListRequest: { [string]: any }
    A dictionary containing the following fields:
    • ConfigName — A unique ID for the specific configuration. This determines how the candidates are ranked.
    • LocationId — A developer-defined string that specifies the location where the recommendation is used, such as "For_you" or "Lobby". This parameter will not affect the items returned, and it can help you track the performance of multiple recommendation features within your experience. Recommendation metrics for each individual location will be displayed in the Creator Hub. LocationIdmust be a string and cannot be "Other" or "other" as these values are reserved by the Creator Hub.
    • PageSize — The number of items returned for each page.
    • BoostCustomTags — A list of string tags. Any item with this tag will be boosted in ranking. Supports boosting one tag.
    • CustomContexts — A table of key-value pairs used to pass in additional context data for ranking. For example, UserId for a Server script.
    Returns
    TypeDescription
    RecommendationPages
    A RecommendationPages object containing the paginated list of recommended items for the given request configuration.
  • RecommendationService:GetRecommendationItemAsync(itemId: string): { [string]: any }
    Retrieves a single registered recommendation item by its ItemId.
    • Yields
    • Capabilities: Basic
    Parameters
    ParameterDescription
    itemId: string
    The ID of the item to retrieve.
    Returns
    TypeDescription
    { [string]: any }
    A dictionary representing the recommendation item with the following fields:
    • ItemId — The unique ID for the item.
    • ReferenceId — The developer-provided ID for the item.
    • TracingId — An ID for tracking recommendation sessions. This will be empty when fetching a single item directly.
    • Creator — A table containing the CreatorId and CreatorType.
    • Attributes — A list of content attributes associated with the item.
    • CustomTags — A list of custom string tags.
    • Visibility — An enum of type RecommendationItemVisibility.
  • RecommendationService:LogActionEvent(actionType: Enum.RecommendationActionType,itemId: string,tracingId: string,actionEventDetails: { [string]: any }? = nil,)
    Logs a user action, such as a reaction or play, taken on a recommended item.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    actionType: Enum.RecommendationActionType
    The enum for the type of action.
    itemId: string
    The item ID returned from registration and GenerateItemListAsync.
    tracingId: string
    The tracing ID returned from the GenerateItemListAsync response. Each item has a TracingId.
    actionEventDetails: { [string]: any }? = nil
    A dictionary containing the following fields:
    • Weight — A number representing the weight of the action. Default is 1.
    • DestinationPlaceId — The ID of the place the user was sent to after the action. Used for Play.
    • CommentText — Any text associated with the action, such as a comment. Used for Comment.
    • ReactionType — A string describing the type of reaction, for example, "like" or "dislike". Used for AddReaction or RemoveReaction.
  • RecommendationService:LogImpressionEvent(impressionType: Enum.RecommendationImpressionType,itemId: string,tracingId: string,impressionEventDetails: { [string]: any }? = nil,)
    Logs an impression event, such as a user viewing a recommended item.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    impressionType: Enum.RecommendationImpressionType
    The enum for the type of the impression.
    itemId: string
    The item ID returned from registration and GenerateItemListAsync.
    tracingId: string
    The tracing ID returned from the GenerateItemListAsync response. Each item has a TracingId.
    impressionEventDetails: { [string]: any }? = nil
    A dictionary containing the following fields:
    • Duration — The duration of the impression in seconds.
    • Weight — A number representing the weight of the impression. Default is 1.
    • ItemPosition — The position of the item in the recommendation list.
    • DepartureIntent — The RecommendationDepartureIntent indicating the user's intent when leaving a view. For example, Positive if the view is considered good.
  • RecommendationService:LogPreferenceEvent(preferenceType: Enum.RecommendationPreferenceType,targetType: Enum.RecommendationPreferenceTargetType,targetId: string,tracingId: string? = "",itemId: string? = "",)
    Logs a user preference signal, such as follow or mute, toward a user, universe, or custom content tag.
    • Capabilities: Basic
    Parameters
    ParameterDescription
    preferenceType: Enum.RecommendationPreferenceType
    The enum for the type of preference.
    targetType: Enum.RecommendationPreferenceTargetType
    The enum for the type of target.
    targetId: string
    The identifier of the preference target. The format depends on targetType.
    tracingId: string? = ""
    The tracing ID returned from the GenerateItemListAsync response. Pass an empty string if the preference originates outside a recommendation feed.
    itemId: string? = ""
    The item ID returned from the GenerateItemListAsync response. Pass an empty string if the preference originates outside a recommendation feed.
  • RecommendationService:RegisterItemAsync(player: Player,registerRecommendationItemsRequest: { [string]: any },): { [string]: any }
    Registers a new item on the server so it can be included in recommendations, returning the generated ItemId and ReferenceId.
    • Yields
    • Capabilities: Basic
    Parameters
    ParameterDescription
    player: Player
    The player who created the item.
    registerRecommendationItemsRequest: { [string]: any }
    A dictionary containing the following fields:
    • ContentType — The RecommendationItemContentType specifying the type of content. Type is defined in a generic way. For example, you can use Static for images, Dynamic for videos, and Interactive for 3D models that support interaction.
    • ReferenceId — The developer-defined string that uniquely identifies the item.
    • Duration — The duration of the content in seconds.
    • Attributes — The table of attributes for the item, such as AssetId or Description.
    • CustomTags — The list of string tags for filtering and boosting. Individual custom tags can't contain commas.
    • Visibility — The RecommendationItemVisibility enum that controls the item's visibility, such as Public or Private.
    Returns
    TypeDescription
    { [string]: any }
    A table with only two fields: ItemId and ReferenceId.
  • RecommendationService:RemoveItemAsync(itemId: string)
    Removes a registered item from the recommendation system by its ItemId.
    • Yields
    • Capabilities: Basic
    Parameters
    ParameterDescription
    itemId: string
    The itemId to remove.
  • RecommendationService:UpdateItemAsync(updateRecommendationItemRequest: { [string]: any })
    Updates the mutable attributes of an existing recommendation item.
    • Yields
    • Capabilities: Basic
    Parameters
    ParameterDescription
    updateRecommendationItemRequest: { [string]: any }
    A dictionary containing the following fields:
    • ItemId — The ID of the item to update.
    • ReferenceId — The new developer-defined string to identify the item.
    • Creator — The new creator for the item. Creator is a table containing two fields: CreatorId: number and CreatorType: Enum.CreatorType.
    • Duration — The new duration for the content in seconds.
    • Visibility — The new visibility setting for the item.
    • Attributes — The new table of attributes for the item.
    • CustomTags — The new list of string tags. Individual custom tags can't contain commas.

Events10

Inherited fromObject1
Inherited fromInstance9