Getting list of gear IDs via catalog API returning all catalog items

Relatively self-explanatory. I’m using HttpService to try and generate a list of every single gear on the catalog, but other things such as bundles and hats are finding their way into my list!

These hats should not, in fact, be in my list because i added the Category=5 (the one that should filter out everything but gear) parameter into my query.

This is the code I’m using.

local HttpService = game:GetService("HttpService")
local Final = {}
local URL = "https://catalog.roproxy.com/v2/search/items/details?Category=5&CreatorTargetId=1&Limit=30&Cursor="
local Data

repeat
	Data = HttpService:JSONDecode(HttpService:GetAsync(URL))
	for _,item in ipairs(Data.data) do
		table.insert(Final,item.id)
	end
	URL = "https://catalog.roproxy.com/v2/search/items/details?Category=5&CreatorTargetId=1&Limit=30&Cursor="..(Data.nextPageCursor or "")
until not Data.nextPageCursor

print(Final)

The catalog.roblox.com/v2/search/items/details endpoint does not support the category query (the Catalog Search API docs on the Creator Docs are awfully outdated). Please use catalog.roblox.com/v1/search/items/details instead. You’ll also need to change Category=5 to Category=11&Subcategory=5

3 Likes

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