YouTube
YouTube Transcript
Fetch a video's transcript as plain text, or as timed SRT subtitles with start and end times — one synchronous call, as JSON. Videos without captions are transcribed from their audio. Costs 5 credits per call.
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonvideo_idstringrequiredThe YouTube video id (11 characters) or any video URL: watch, Shorts (youtube.com/shorts/...), youtu.be and embed links all work.
Example: n61ULEU7CO0
languagestringdefault:enCaption language code to fetch (e.g. en, es, fr). If the video has no track in that language, content is null and the response lists available_languages so you can retry with one of them. The call is still billed.
formatenum<string>default:textOutput format: text for a plain transcript, srt for timed subtitles. Videos without captions are transcribed from their audio, which takes longer (about 10 to 15 seconds). For a video with no speech, an srt request returns content null with the message "No speech detected in this video."
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
results = client.youtube.transcript(video_id="n61ULEU7CO0", format="srt")
print(results)Response