Get all users whose username match a string, even offline users

How can I input, for example, epicUsername and get an output of all the users which name matches, even offline users? For example, return an array {epicUsername,epicUsername1,epicUsername7798,epicUsername127318238,etc}?

Thanks in advance

Search for string manipulation or pattern matching on the developer hub. You should find API references and tutorials there…

Sorry, I didn’t make it clear.

Including users offline at the moment

local tab = {}
for i, v in pairs(game.Players:GetChildren()) do
 if string.match("epicUsername",v.Name) then
  table.insert(tab, v)

You’d have to use roblox’s API; you’ll have to use this endpoint to search for users. However, you can’t send a request directly to this endpoint from roblox because they don’t allow you to send requests to any of their domain (anything inclusive of You’ll have to use a proxy where you’ll have to set up an external server.

But, you don’t have to do that because a proxy for all of roblox’s API has been set up already: For example, you’d have to send requests to to search players with “Rare” in their name, but now with the proxy, you’d just have to replace with, and you’re good to go:

In studio now, you’ll have to use GetAsync since the API requires you to use the “GET” method and decode it from JSON to make it into a Lua table:

local name = "Rare"
local HttpService = game:GetService("HttpService")
local res = HttpService:GetAsync("" .. name .. "&limit=10"
res = HttpService:JSONDecode(res)