Authorization: Bearer rk_live_… header for higher limits.
Search and list
local HttpService = game:GetService("HttpService")
local function search(query)
local url = ("https://api.roscripts.io/v1/scripts/search?q=%s&max=10")
:format(HttpService:UrlEncode(query))
local ok, body = pcall(function() return game:HttpGet(url) end)
if not ok then return {} end
return HttpService:JSONDecode(body).result.scripts
end
for _, s in ipairs(search("blox fruits")) do
print(("%s — %s%s"):format(
s.title,
s.verified and "✔ " or "",
s.key and "[key]" or ""
))
end
async function search(query) {
const url = `https://api.roscripts.io/v1/scripts/search?q=${encodeURIComponent(query)}&max=10`;
const res = await fetch(url);
if (!res.ok) throw new Error((await res.json()).error.message);
const { result } = await res.json();
return result.scripts;
}
for (const s of await search("admin")) {
console.log(s.title, s.slug, s.loadstring);
}
using System.Net.Http.Json;
using System.Text.Json;
var http = new HttpClient();
var url = "https://api.roscripts.io/v1/scripts/search?q=admin&max=10";
var data = await http.GetFromJsonAsync<JsonElement>(url);
foreach (var s in data.GetProperty("result").GetProperty("scripts").EnumerateArray())
{
Console.WriteLine($"{s.GetProperty("title").GetString()} — {s.GetProperty("slug").GetString()}");
}
Fetch one script and run it
local HttpService = game:GetService("HttpService")
local function getScript(ref)
local url = "https://api.roscripts.io/v1/scripts/" .. ref
return HttpService:JSONDecode(game:HttpGet(url)).result.script
end
local s = getScript("blox-fruits-hub") -- id, slug, or shortId all work
if s.patched then warn("Heads up: this script may be patched.") end
loadstring(game:HttpGet(s.loadstring))()
const res = await fetch("https://api.roscripts.io/v1/scripts/blox-fruits-hub");
const { result } = await res.json();
const s = result.script;
console.log(s.title, "by", s.owner?.username);
console.log("Run with:", s.loadstring);
Browse a game
// Top scripts for Blox Fruits, no key systems
const res = await fetch(
"https://api.roscripts.io/v1/games/2753915549/scripts?key=0&sortBy=score&max=20"
);
const { result } = await res.json();
console.log(`${result.total} scripts for placeId ${result.placeId}`);
local HttpService = game:GetService("HttpService")
local placeId = game.PlaceId
local url = ("https://api.roscripts.io/v1/games/%d/scripts?key=0&sortBy=score"):format(placeId)
local res = HttpService:JSONDecode(game:HttpGet(url))
for _, s in ipairs(res.result.scripts) do print(s.title) end
Keep a local mirror in sync
JavaScript
let lastSeen = loadLastSeen() ?? "1970-01-01T00:00:00Z";
while (true) {
const url = `https://api.roscripts.io/v1/scripts?updatedSince=${encodeURIComponent(lastSeen)}&sortBy=updatedAt&order=asc&max=100`;
const { result } = await (await fetch(url)).json();
if (result.scripts.length === 0) break;
for (const s of result.scripts) {
upsert(s);
if (s.updatedAt > lastSeen) lastSeen = s.updatedAt;
}
saveLastSeen(lastSeen);
}
Building a wrapper library for a language we don’t list here? Tell us on Discord and we’ll feature it.