I need help with the catalog API

I want it to print the ID’s on the output

local function lol(plr, thing)
	wait()
	local ij = game.HttpService:GetAsync("https://search.roblox.com/catalog/json?CatalogContext=2&Category=9&Keyword=" .. thing .. "&SortType=0&ResultsPerPage=50")
	local ok = game.HttpService:JSONDecode(ij)
for i,v in pairs(ok) do
	wait()
		print(v.AssetId)
	end
end
game.ReplicatedStorage.RemoteFunction.OnServerInvoke = lol

I keep getting trust check failed

2 Likes

To my knowledge ROBLOX doesn’t allow you to send HTTP requests to to it’s own servers.

1 Like

Whats the point of their api then?

1 Like

They don’t let you use their API Directly from Roblox Servers, because Roblox Servers have access to some APIs which aren’t given access to everyone, and if someone maliciously did a request, it can effect their servers.

You can use a proxy to do this though.

1 Like

Proxy tutorial: Fixing HttpService: Make PUT, PATCH, DELETE requests, access response headers, proxy to any site, and more

For external use, not in Roblox games.