How to get recommended gamepasses?

I know how to get recommended bundles and assets via game:GetService("AvatarEditorService")

However, is there a way to get recommended gamepasses?
I see this method of MarketplaceService: RecommendTopProductsAsync

However it returns an empty table if I pass in any valid argument, how can I actually use it?

Bad news: you can’t.

Claude Summary

RecommendTopProductsAsync was designed for Roblox catalog asset recommendations, not for arbitrary experience gamepasses. In most cases it either:

• Returns an empty table
• Returns results only for specific supported asset types
• Is internally gated / deprecated behavior

It does not reliably return recommended gamepasses for your experience.

That is why you’re getting an empty table even with valid arguments.

There is currently no public API that:

• Returns “recommended gamepasses” for your experience
• Returns Roblox’s internal recommendation system results
• Mimics the “Recommended” section seen on web/game pages

Roblox does not expose that system to developers.

If you want to recommend your own game-passes to the person, then I guess the best thing you can do is get the games they play or favorited, and try to retrieve gamepasses from such.

Claude Summary 2: Electric Boogaloo

Using external web APIs (advanced, not officially supported)

Roblox’s public web APIs can return:

• A user’s favorited games
• A user’s groups
• A user’s badges
• Experience details
• Experience gamepasses

Endpoints such as:

games.roblox.com
inventory.roblox.com

However:

• You cannot directly call these from Roblox without a proxy server
• Many endpoints require authentication cookies
• Some data is restricted
• It may violate Roblox policy if misused
• These endpoints can change at any time

So this approach is fragile and risky.

If you’re thinking of how Roblox does their “offer” with Robux purchases, they just recommend a game you’ve played recently and a gamepass from it. You’d have to get the player to agree however to an Oauth2 just to get their recent games considering there’s no official API; which at that point it’s a lost cause.

1 Like

My guess it’s probably because the gamepasses and products doesn’t have enough data to be recommended yet?

From the docs:
image

I tested it on my game and it lists the gamepasses and products that have been bought by players:

-- Get the MarketplaceService
local MarketplaceService = game:GetService("MarketplaceService")

-- Create an array of product types to include. In this case both game passes and developer products
local productTypes = {Enum.InfoType.GamePass, Enum.InfoType.Product}

-- Call in a protected call to handle errors gracefully
local success, topRankedItems = pcall(function()
	return MarketplaceService:RecommendTopProductsAsync(productTypes)
end)
print(topRankedItems)
if not success then
	error("Failed to rank products")
end

-- Load the returned items into the store. Make sure to filter out any ineligible items from topRankedItems such as developer products the user can no longer purchase
for i, rankedItem in ipairs(topRankedItems) do
	local productIdentifier = rankedItem.ProductIdentifier
	local productInfo = rankedItem.ProductInfo
	-- ...
	-- Logic to add products into store
end

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.