How can I get the RAP of an item?

I’m trying to make a UI that gives you info about collectables on the marketplace. I would like to include the RAP of the collectable, but it isn’t returned when I use avatarEditorService to search the catalog. I looked through old posts for roblox APIs, but all the ones I tried are outdated and return
“HttpService is not allowed to access ROBLOX resources”

Here is an example of one of the APIs I tried.

getRap.OnServerEvent:Connect(function(id)
	local url = "https://economy.roblox.com/v1/assets/"..tostring(id).."/resale-data"
	local response = HttpService:GetAsync(url)
	local data = game:GetService("HttpService"):JSONDecode(response)
	return data.AveragePrice or 0
end)

Any help would be greatly appreciated, as all the other posts seem to be outdated.

youre going to need a proxy for this

getRap.OnServerEvent:Connect(function(id)
	local url = "https://economy.roproxy.com/v1/assets/"..tostring(id).."/resale-data"
	local response = HttpService:GetAsync(url)
	local data = game:GetService("HttpService"):JSONDecode(response)
	return data.recentAveragePrice or 0
end)
3 Likes

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