Ordering roblox hats by the year they were created efficiently

how would i order Roblox hats by the creation year efficiently? (like really quick)
i’m trying to make a thing that orders hats made by Roblox into different rarity categories (for example if a hat was created in 2009 or earlier then it will be legendary, between 2015 and 2017 epic etc.)
i’m trying to find an efficient way to do this, because MarketplaceService:GetProductInfo() is too slow for how many hats Roblox has made, and AvatarEditorService:SearchCatalog() (what i’m using to get all hats created by Roblox) doesn’t provide the creation date for each hat.
i’m not asking someone to write the code for me, but if someone could give me any useful tips or functions to make it that would be greatly appreciated

It’d be pretty hard to do it without MarketplaceService:GetProductInfo(), you’d probably have to use something like a proxy to search on the website. I would recommend using GetProductInfo.

Get all the data using MarketplaceService:GetProductInfo() in studio enviroment and print it in json format. Sort it and save the table in a module so you can index it fast. Use get productinfo to add to the table the future hats or periodically update the table (Essentially you are caching data)

3 Likes

i cant find any api endpoints that let me search for hats

updating the table would still be insanely slow and i aint waiting that long lol