ScriptHaul API
Log inGet API key

Pasted lists and subsets

POST /v1/videos/resolve extracts YouTube video links and bare IDs from text, deduplicates them, validates them in bounded batches, and returns found, notFound, and a stable list: key.

curl https://api.scripthaul.com/v1/videos/resolve \
  -X POST \
  -H "Authorization: Bearer $SCRIPTHAUL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Research queue:\nhttps://youtu.be/jNQXAC9IVRw\ninvalid-id"}'

Use the returned list key with GET /v1/videos?url=list:…. A list may contain up to 500 unique videos. Values that are malformed, unavailable to the validation call, or absent are reported in notFound; they are not silently turned into work.

Subsets are validated against the exact inventory snapshot from which they were selected. A client cannot submit arbitrary IDs under another channel or playlist snapshot.

Resolve a list in four languages

The fixture combines one public video ID with an invalid value. Maintained runnable versions are in the examples directory.

curl https://api.scripthaul.com/v1/videos/resolve -X POST \
  -H "Authorization: Bearer $SCRIPTHAUL_API_KEY" -H "Content-Type: application/json" \
  -d '{"text":"Research queue:\nhttps://youtu.be/jNQXAC9IVRw\ninvalid-id"}'
import json, os, urllib.request
body = json.dumps({"text": "Research queue:\nhttps://youtu.be/jNQXAC9IVRw\ninvalid-id"}).encode()
request = urllib.request.Request("https://api.scripthaul.com/v1/videos/resolve", data=body, method="POST")
request.add_header("Authorization", f"Bearer {os.environ['SCRIPTHAUL_API_KEY']}")
request.add_header("Content-Type", "application/json")
print(urllib.request.urlopen(request).read().decode())
const response = await fetch("https://api.scripthaul.com/v1/videos/resolve", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.SCRIPTHAUL_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ text: "Research queue:\nhttps://youtu.be/jNQXAC9IVRw\ninvalid-id" }),
});
console.log(await response.json());
body := strings.NewReader(`{"text":"Research queue:\nhttps://youtu.be/jNQXAC9IVRw\ninvalid-id"}`)
req, _ := http.NewRequest("POST", "https://api.scripthaul.com/v1/videos/resolve", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SCRIPTHAUL_API_KEY"))
req.Header.Set("Content-Type", "application/json")
response, err := http.DefaultClient.Do(req)
if err != nil { log.Fatal(err) }
defer response.Body.Close()
io.Copy(os.Stdout, response.Body)