Any way to detect if a place is restricted/doesn't exist?

I’m making a game in the Place Roulette style, where it picks a random game and you can go with a group. However, like 95% of the time it would take you to “nonexistent (click me)” or restricted (click me) places (these videos are from today!). I’ve since implemented a basic filter that removes those, but it still occasionally takes you to them. (but seriously, how can a place not exist when the roblox API clearly shows all the information like what)

The basic filter only blacklists a few place creators who have tons of restricted games (possibly from using the create place api) and default places. My question is is there any API or anything to detect if a place is restricted (friends only, createplace, etc) or nonexistent? (i’m guessing they were deleted, but what?!?!)

I’ve tried looking in the GetProductInfo API, but that doesn’t seem to look like it could do much. I could scrape the page using a proxy to see if it has certain text, but that could break and possibly wear out the proxy I’d use. I don’t know of any Roblox APIs that could help.

Any suggestions would be amazing! Thanks!

filter code:
knownAmountOfPlayers: 1000000000 + 19321883
knownAcceptedIds: 1500
defaultDesc: “This is your very first ROBLOX creation. Check it out, then make it your own with ROBLOX Studio!”
filteredDesc: “This is your very ##### ROBLOX creation. Check it out, then make it your own with ROBLOX Studio!”

local function getRandomPlace()
	local usedID = knownAcceptedIds
	while fast:wait() do
		local theoreticalID = rng:NextInteger(knownAcceptedIds,knownAmountOfPlayers)
		local isPlace = false
		pcall(function()
			local info = MPS:GetProductInfo(theoreticalID,Enum.InfoType.Asset)
			local assettype = info.AssetTypeId
			if assettype == 9 then --9 means Place
				if filterOn then
					if not string.find(info.Name,"'s Place") and not info.PriceInRobux then
						local creator = info.Creator.Id
						if not blacklisted[creator] then
							if string.lower(info.Description) ~= string.lower(defaultDesc) then
								if string.lower(info.Description) ~= string.lower(filteredDesc) then
									isPlace = true
								end
							end
						end
					end
				else
					isPlace = true
				end
			end
		end)
		if isPlace then
			usedID = theoreticalID
			break
		end
	end
	return usedID
end
1 Like

Ended up using TeleportInitFailed to detect when a failure happens and then saving the broken place to a blacklist datastore. Sure, it’ll still get those errors, but it won’t get them nearly as much. Consider this solved :slight_smile:

3 Likes