Get a script
curl --request GET \
--url https://api.roscripts.io/v1/scripts/{ref}import requests
url = "https://api.roscripts.io/v1/scripts/{ref}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.roscripts.io/v1/scripts/{ref}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roscripts.io/v1/scripts/{ref}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.roscripts.io/v1/scripts/{ref}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.roscripts.io/v1/scripts/{ref}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roscripts.io/v1/scripts/{ref}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"result.script": {},
"result.related": [
{}
]
}Endpoints
Get a script
Fetch one script’s full detail, its raw source, or its version history.
GET
/
v1
/
scripts
/
{ref}
Get a script
curl --request GET \
--url https://api.roscripts.io/v1/scripts/{ref}import requests
url = "https://api.roscripts.io/v1/scripts/{ref}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.roscripts.io/v1/scripts/{ref}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roscripts.io/v1/scripts/{ref}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.roscripts.io/v1/scripts/{ref}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.roscripts.io/v1/scripts/{ref}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roscripts.io/v1/scripts/{ref}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"result.script": {},
"result.related": [
{}
]
}Resolve a single script by id, slug, or shortId — all three work in the same path:
Returns
Returns the script’s raw Lua source as
Returns the changelog and metadata for each published version (newest first). Source is not included.
curl "https://api.roscripts.io/v1/scripts/blox-fruits-hub"
curl "https://api.roscripts.io/v1/scripts/lst_9f2c4a1b7d6e5f0a1234abcd"
curl "https://api.roscripts.io/v1/scripts/Ab3xK9q"
Path parameters
string
required
The script’s
id, slug, or shortId.Query parameters
0 | 1
default:"1"
Include up to 6 related scripts (same game first). Set
0 to skip.string
Sparse fieldset for the script object.
Response
Script
The full Script object, including the long-form
body.Script[]
Related scripts, unless
related=0 or a fields set was requested.404 not_found if the script doesn’t exist, isn’t live, or is hidden.
Raw source
GET https://api.roscripts.io/v1/scripts/{ref}/raw
text/plain. Only free, keyless scripts are servable — for everything else, prefer the loadstring URL.
curl "https://api.roscripts.io/v1/scripts/blox-fruits-hub/raw"
| Situation | Response |
|---|---|
| Free, keyless | 200 with the Lua source |
| Paid script | 402 payment_required + details.marketplaceUrl |
| Key-system script | 403 forbidden + details.keyLink |
| Not found / not live | 404 not_found |
A script object only includes a non-null
rawUrl when its source is servable — check that first to avoid a 402/403. For execution, loadstring is almost always what you want.Version history
GET https://api.roscripts.io/v1/scripts/{ref}/versions
{
"result": {
"listingId": "lst_…",
"versions": [
{ "id": "ver_…", "label": "v3", "changelog": "Fixed auto-farm after the May update", "sizeBytes": 18422, "uploadedAt": "2026-05-28T11:04:00Z" }
]
}
}