How can I get all Emotes IDs in a table?

Hello,I’m working for something which is really clear ; I want to see how can I get all Emote IDs of featured roblox emotes in a single table,but I don’t know how to do that.Could anybody give me a helping hand on this?

3 Likes

Try this:

local HttpService = game:GetService("HttpService")

local function getFeaturedEmoteIds()
	local emoteIds = {}
	local url = "https://catalog.roproxy.com/v1/search/items?category=Emotes&limit=100&sortType=3"

	while url do
		local success, response = pcall(function()
			return HttpService:GetAsync(url)
		end)
		
		if success then
			local data = HttpService:JSONDecode(response)

			for _, item in ipairs(data.data) do
				table.insert(emoteIds, item.id)
			end

			url = data.nextPageCursor
			if url then
				url = "https://catalog.roproxy.com/v1/search/items?category=Emotes&limit=100&sortType=3&cursor=" .. url
			end
		else
			warn("Failed to fetch data:", response)
			break
		end
	end

	return emoteIds
end

local featuredEmotes = getFeaturedEmoteIds()
print(HttpService:JSONEncode(featuredEmotes))
4 Likes

Thank you!It worked,from what I have understood and I implemented the way I wanted!

1 Like

How do we use roproxy though,It’s quite complicated like for other situations?

1 Like

No, just use the normal roblox proxy like how you would but replace roblox with roproxy

3 Likes

One more question though,When I tried it and got one random url from the table at the last section,It didn’t give me an emote but an actual shirt,how can I fix it?

I don’t know what your talking about