Batch resolve
curl --request POST \
--url https://api.roscripts.io/v1/scripts/batch \
--header 'Content-Type: application/json' \
--data '
{
"refs": [
"<string>"
]
}
'import requests
url = "https://api.roscripts.io/v1/scripts/batch"
payload = { "refs": ["<string>"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({refs: ['<string>']})
};
fetch('https://api.roscripts.io/v1/scripts/batch', 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/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'refs' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.roscripts.io/v1/scripts/batch"
payload := strings.NewReader("{\n \"refs\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.roscripts.io/v1/scripts/batch")
.header("Content-Type", "application/json")
.body("{\n \"refs\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roscripts.io/v1/scripts/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"refs\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"result.scripts": [
{}
],
"result.missing": [
"<string>"
],
"result.count": 123
}Endpoints
Batch resolve
Resolve many scripts in a single request.
POST
/
v1
/
scripts
/
batch
Batch resolve
curl --request POST \
--url https://api.roscripts.io/v1/scripts/batch \
--header 'Content-Type: application/json' \
--data '
{
"refs": [
"<string>"
]
}
'import requests
url = "https://api.roscripts.io/v1/scripts/batch"
payload = { "refs": ["<string>"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({refs: ['<string>']})
};
fetch('https://api.roscripts.io/v1/scripts/batch', 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/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'refs' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.roscripts.io/v1/scripts/batch"
payload := strings.NewReader("{\n \"refs\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.roscripts.io/v1/scripts/batch")
.header("Content-Type", "application/json")
.body("{\n \"refs\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roscripts.io/v1/scripts/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"refs\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"result.scripts": [
{}
],
"result.missing": [
"<string>"
],
"result.count": 123
}Resolve up to 20 scripts (or 100 with an API key) in one request by id, slug, or shortId. Ideal for refreshing a known set — a user’s saved list, a curated hub, a local cache.
curl -X POST "https://api.roscripts.io/v1/scripts/batch" \
-H "Content-Type: application/json" \
-d '{ "refs": ["blox-fruits-hub", "lst_9f2c…", "Ab3xK9q"] }'
Body
Array of script ids, slugs, or shortIds. Max 20 anonymous, 100 with a key. Duplicates are de-duplicated.
Response
The scripts that resolved (live only).
Any refs that didn’t match a live script.
Number of scripts returned.
{
"result": {
"scripts": [
{ "id": "lst_…", "slug": "blox-fruits-hub", "loadstring": "https://script.roscripts.io/…" }
],
"missing": ["Ab3xK9q"],
"count": 1
}
}
Batch is a
POST, so it isn’t shared-cached at the edge. For browsing, prefer the cacheable GET list/search endpoints; reserve batch for resolving a specific known set.⌘I