How to check for recent items

I want to create a game where part of it has a section where there’s a surface guy that periodically scans for items on the Roblox catalog under a certain price, but I looked and I’m not sure of how to achieve this. Help is appreciated :slight_smile:

1 Like

If I’m not wrong the URL should have parameters taht act as the filter, give me moment and I’ll check
Edit: yes there is

2 Likes

You can use AvatarEditorService:SearchCatalog() + CatalogParams
Here’s an example:

local AES = game:GetService("AvatarEditorService")
local params = CatalogSearchParams.new()
params.MaxPrice = -- put max price
params.MinPrice = --put min price
params.Limit -- put a limit on it
local result  = AES:SearchCatalog(params)
for _, v in ipairs(result) do
    print(v.Name)
end

You can also use a keyword

1 Like

Great! Is there a way to distinct between regular items and limiteds?

I think you have to check if the LowestPrice of the asset is over 0, and for LimitedUs you have to check if the UnitsAvailableForConsumption of the asset is over 0, but there are LimitedUs with 0 Units, so beware of that.

1 Like

This code doesn’t work. First of all params.limit isn’t even valid, and the for loop doesn’t work because the results variable returns an instance and not a table.

Have you tried using the URL method?

I’m sorry I’m not totally sure on how to use a url with this

I’m almost able to use the avatar editor service, however when I try to call the name of an item on the catalog, I get a “attempt to index Name with boolean” error. my code is this:

local AES = game:GetService("AvatarEditorService")
local params = CatalogSearchParams.new()
	params.MaxPrice = 10-- put max price
	params.MinPrice = 0--put min price

local result  = AES:SearchCatalog(params)
for _, v in pairs(result:GetCurrentPage()[1]) do
	print(v["Name"])
end

I suspect it has something to do with the fact that the Search catalog function returns an object with multiple dictionaries inside of it, but I’m not sure how to deal with it.

I don’t have any idea of how to do it either, I though you knew :sweat_smile:

Please I would like this fixed