This is super basic, but this is just a super quick explanation as to how you could get the full list of servers of a game.
Roblox has a very open (and well documented) games api that you can use with HttpService. There’s a lot of stuff in that API, however the endpoint we’re looking for is the /v1/games/{placeId}/servers/{serverType}
. The documentation will essentially help you build a URL you can GET from, however a minor issue is that you’re limited to only 100 servers at a time. This could easily be mitigated with a while loop. I made a quick example of a function that would get all the servers of a specified placeId
below:
local HttpService = game:GetService("HttpService")
function getServerList(placeId)
local cursor
local servers = {}
repeat
local response = HttpService:JSONDecode(HttpService:GetAsync("https://games.roblox.com/v1/games/" .. placeId .. "/servers/Public?sortOrder=Asc&limit=100" .. (cursor and "&cursor=" .. cursor or "")))
for _, v in pairs(response.data) do
table.insert(servers, v)
end
cursor = response.nextPageCursor
until not cursor
return servers
end
As shown in the games API documentation, the array this function returns should be filled with objects formatted like so:
{
"id": "00000000-0000-0000-0000-000000000000",
"maxPlayers": 0,
"playing": 0,
"playerIds": [
0
],
"fps": 0,
"ping": 0,
"name": "string",
"vipServerId": 0,
"accessCode": "00000000-0000-0000-0000-000000000000"
}
(yes id
is the job id)
Hope you found this helpful, cheers!
EDIT: You may want to add a delay in-between requests to avoid being rate-limited.
LATE EDIT: Sorry if I didn’t mention this, but you probably will have to use a proxy or something for this to work