Roblox's Web APIs

Hi community :wave:

I am working on a game similar to Pls Donate, and I need to get the items for sale (shirts, pants, gamepasses, ect) from a specific player. But I’ve been looking for a Roblox WEB API and I haven’t found any endpoint for what I need. I am currently using these:

I have been checking the apis in this repository, but none of them have documented the endpoints I am using, and I don’t know where else to look because everything is very old and it doesn’t work for me.

I hope you can help me, I really need it :pray:

More information

When getting player passes and shirts, they load shirts that belong to someone other than the actual player (and the name, price and all that comes out perfect except for the id. And everything is obtained correctly).

Some players don’t get their gamepasses while others do (but with the error I said before) .

--!strict
-- TODO: improve the code

------------------------------------------------------------------------------------------------------------------------------------------
local GAMEPASS_URL = "https://www.roproxy.com/users/inventory/list-json?assetTypeId=34&cursor=&itemsPerPage=100&pageNumber=%s&userId=%s"
local SHIRTS_URL = "https://catalog.roproxy.com/v1/search/items/details?Category=3&CreatorName=%s"
------------------------------------------------------------------------------------------------------------------------------------------

local HttpService = game:GetService("HttpService")
local AssetManager = {}

function AssetManager:GetAssets(player: Player)
	return {
		Shirts = self:__GetShirts(player),
		Gamepasses = self:__GetGamepasses(player)
	}
end

function AssetManager:__GetGamepasses(player: Player)
	local gamepasses = {}
	
	local data = HttpService:JSONDecode(HttpService:GetAsync(GAMEPASS_URL:format(1, player.UserId))).Data
	
	for _, gamepass in data.Items do
         -- Some passes do not come with these properties, and may give an error.
		pcall(function()
			if gamepass.Creator.Id == player.UserId and gamepass.Product and gamepass.Product.PriceInRobux then
				table.insert(gamepasses, gamepass)
			end
		end)
	end
	
	return gamepasses
end

function AssetManager:__GetShirts(player: Player)
	local shirts = {}
	
	local data = HttpService:JSONDecode(HttpService:GetAsync(SHIRTS_URL:format(player.Name))).data
	
	for _, shirt in data do
		if shirt.price > 0 then
			table.insert(shirts, shirt)
		end
	end
	
	return shirts
end

return AssetManager

Hi, is this what you’re looking for?

https://catalog.roblox.com/v1/search/items?category=All&creatorName=Meta_data&limit=120&salesTypeFilter=1

1 Like

Yes (I also need the gamepass by the way haha), but can you tell me where did you find that endpoint? I am looking for it in the documentation of catalog.roblox.com and that path does not come out, how do you know what path exists and what query parameters can be passed to it? I would be very grateful if you could tell me :happy1:

I was browsing the marketplace and realized you could search for assets created by someone via their username. This lead me to this page:

I then opened my browser’s inspect window and switched to the network tab until I was able to find that API call:
image

You are right that it doesn’t appear to be documented but you might be able to figure out some parameters through this page:
https://catalog.roblox.com/docs/index.html

The Roblox.Catalog.Api.CatalogSearchDetailedResponseItem section has some parameters that I was able to use against the API, i.e. creatorTargetId which lets you search via the userId instead of the username.

1 Like

you are a life saver, I thank you so much, you totally saved me. Thank you so much! :slight_smile:

1 Like

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