Catalog API, how to use it?

Oh well, I have read the entire Catalog APIs, as far as I am understanding, it is what I am looking for exactly, however, I don’t know how to actually, well, use it in a ROBLOX Lua script. What I am looking for is to get a specific item search with all the items in a table (I’m saying nonsense as an example), Catalog API is the thing I’m looking for but I don’t know how to use it? :man_shrugging:

1 Like

Would be appreciated if you could explain what you were trying to do with it, but first and foremost you’ll have to HttpService alongside a proxy such as rprxy.

1 Like

I got started a bit with this post that helped me get the thing I’m looking for, however, ROBLOX is declining my access returning “Trust check failed”.
image
I tried to find a solution however I couldn’t find one.

Yes HttpService doesn’t work for ‘Library Catalog Api’, which is for non wearable items, you need to use a proxy, i got the same problem, I dont know if its the same for ‘Catalog Api’ but if that happened using it means that is for both.

This post helped me achieve that trust check and get the data with a free heroku server, however if you want to use it for a big game, a free proxy may not be enought, hope it helps for everyone looking for.

Is just basically 3 steps
-set a heroku(or any u want) proxy
-import a proxy module into your game
-call the proxy and make your request

this an example i used in the past:

local ProxyService = require(game:GetService('ServerScriptService'):WaitForChild('ProxyService'))
local Proxy = ProxyService:New('https://yourHerokuProxyName.herokuapp.com/', 'yourPrivateToken')

game.ReplicatedStorage.SearchMusic.OnServerInvoke = function(plr,keywords,items,sort)
    local Result = Proxy:Get("https://search.roblox.com/catalog/json?CatalogContext=2&PageNumber=1&Category=9&keyword="..keywords.."&ResultsPerPage="..items..'&SortType='..sort)
    local body = HtttpService:JSONDecode(Result.body)
    print(body)
    return body
end
7 Likes