API Documentation
The ScribeTube API is a single endpoint that returns a YouTube video's transcript as JSON.
Base URL
https://api.scribetube.app/v1
Authentication
All requests require a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
GET /v1/transcript
Returns the transcript for a YouTube video.
Query parameters
| Name | Type | Required | Notes |
|---|---|---|---|
id | string | yes | YouTube video ID or full URL |
lang | string | no | BCP-47, default en |
Code samples
curl -X GET "https://api.scribetube.app/v1/transcript?id=dQw4w9WgXcQ&lang=en" \
-H "Authorization: Bearer $SCRIBETUBE_API_KEY"
import os, requests
r = requests.get(
"https://api.scribetube.app/v1/transcript",
params={"id": "dQw4w9WgXcQ", "lang": "en"},
headers={"Authorization": f"Bearer {os.environ['SCRIBETUBE_API_KEY']}"},
timeout=15,
)
r.raise_for_status()
data = r.json()
text = " ".join(s["text"] for s in data["segments"])
print(text)
const res = await fetch(
`https://api.scribetube.app/v1/transcript?id=dQw4w9WgXcQ&lang=en`,
{ headers: { Authorization: `Bearer ${process.env.SCRIBETUBE_API_KEY}` } }
);
const data = await res.json();
const text = data.segments.map(s => s.text).join(" ");
console.log(text);
req, _ := http.NewRequest("GET",
"https://api.scribetube.app/v1/transcript?id=dQw4w9WgXcQ&lang=en", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SCRIBETUBE_API_KEY"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out struct {
Segments []struct{ T, D float64; Text string } `json:"segments"`
}
json.NewDecoder(resp.Body).Decode(&out)
Success response
{
"video_id": "dQw4w9WgXcQ",
"language": "en",
"is_auto_generated": false,
"duration_s": 213,
"segments": [
{ "t": 0.5, "d": 2.1, "text": "We're no strangers to love" },
{ "t": 2.8, "d": 2.4, "text": "You know the rules and so do I" }
],
"cache_hit": true,
"quota_remaining": 947,
"quota_period": "month"
}
Error responses
| HTTP | error | Meaning |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key |
| 402 | quota_exceeded | Plan quota used; upgrade or wait |
| 404 | no_captions | Video exists, no captions available |
| 422 | invalid_url | Could not parse a video ID |
| 502 | upstream | YouTube error; retry with backoff |
Rate limits & quota
Quota is per calendar month, resets at the 1st UTC. Concurrency limit per plan applies in addition. Exceeding concurrency returns 429 Too Many Requests with a Retry-After header.
Webhooks (Growth+ only)
Configure a webhook to receive POSTs when your monthly quota crosses 50%, 80%, and 100%. Configure in dashboard or via:
POST /v1/account/webhook
{ "url": "https://your.app/webhooks/tubescribe", "events": ["quota.80", "quota.100"] }
Status & SLA
Status page: status.scribetube.app. Growth+ plans carry a 99.9% monthly uptime SLA with 10% credit for breaches.