Skip to main content
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:
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

ref
string
required
The script’s id, slug, or shortId.

Query parameters

Include up to 6 related scripts (same game first). Set 0 to skip.
fields
string
Sparse fieldset for the script object.

Response

result.script
Script
The full Script object, including the long-form body.
Related scripts, unless related=0 or a fields set was requested.
Returns 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
Returns the script’s raw Lua source as 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"
SituationResponse
Free, keyless200 with the Lua source
Paid script402 payment_required + details.marketplaceUrl
Key-system script403 forbidden + details.keyLink
Not found / not live404 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
Returns the changelog and metadata for each published version (newest first). Source is not included.
{
  "result": {
    "listingId": "lst_…",
    "versions": [
      { "id": "ver_…", "label": "v3", "changelog": "Fixed auto-farm after the May update", "sizeBytes": 18422, "uploadedAt": "2026-05-28T11:04:00Z" }
    ]
  }
}