Migrating from transcriptapi.com
ScriptHaul uses Bearer authentication, explicit language results, free cache hits, and pay-as-you-go credit blocks.
| Existing concept | ScriptHaul |
|---|---|
| API key query parameter | Authorization: Bearer sh_live_… |
| YouTube URL parameter | Extract its 11-character YouTube ID and send it as video_id |
| Plain transcript | format=clean |
| Timestamped transcript | format=timestamped |
| JSON transcript | format=json |
| Translation language | language=xx; inspect requested/delivered/translation |
| Silent language fallback | fallback=true, always labelled |
| Strict language | fallback=false; refusal is retryable and costs 0 |
| One credit for every call | 1 only for a successful cold delivery; cache hits and failures cost 0 |
| Subscription/top-up balance | One-time blocks; purchased credits never expire |
| Client-side channel loop | One durable bulk job with manifests, per-file downloads, events, and a signed webhook |
curl --get https://api.scripthaul.com/v1/transcript \
-H "Authorization: Bearer $SCRIPTHAUL_API_KEY" \
--data-urlencode "video_id=jNQXAC9IVRw" \
--data-urlencode "format=json" \
--data-urlencode "language=en" \
--data-urlencode "fallback=false"
Do not mechanically copy a key from a query string into a new URL. Move it into the header first, then verify your retry policy against typed errorClass and retryable fields.
Equivalent request in four languages
Each version uses an Authorization header, strict English, and JSON output. Maintained runnable variants are in the examples directory.
curl --get https://api.scripthaul.com/v1/transcript \
-H "Authorization: Bearer $SCRIPTHAUL_API_KEY" \
--data-urlencode "video_id=jNQXAC9IVRw" --data-urlencode "format=json" \
--data-urlencode "language=en" --data-urlencode "fallback=false"
import os, urllib.request
url = "https://api.scripthaul.com/v1/transcript?video_id=jNQXAC9IVRw&format=json&language=en&fallback=false"
request = urllib.request.Request(url, headers={"Authorization": f"Bearer {os.environ['SCRIPTHAUL_API_KEY']}"})
print(urllib.request.urlopen(request).read().decode())
const url = "https://api.scripthaul.com/v1/transcript?video_id=jNQXAC9IVRw&format=json&language=en&fallback=false";
const response = await fetch(url, { headers: { Authorization: `Bearer ${process.env.SCRIPTHAUL_API_KEY}` } });
console.log(await response.json());
url := "https://api.scripthaul.com/v1/transcript?video_id=jNQXAC9IVRw&format=json&language=en&fallback=false"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SCRIPTHAUL_API_KEY"))
response, err := http.DefaultClient.Do(req)
if err != nil { log.Fatal(err) }
defer response.Body.Close()
io.Copy(os.Stdout, response.Body)