All guides

November 9, 2026 · 3 min read

How to Download YouTube Transcripts from the Command Line (curl)

In short

Get YouTube transcripts from the terminal with curl and jq: plain text, SRT and VTT files, translations, and a Bash loop that downloads a whole list of videos.

You don't need Python or Node to get a transcript. One curl command against the TranscriptYT YouTube Transcript API prints any public video's transcript, saves a subtitle file, or, in a short Bash loop, downloads a whole list of videos.

Plain text in one command

Create a free key in the dashboard (100 transcripts, no card) and export it. format=text returns the transcript without timestamps; leave format out for JSON.

export TRANSCRIPTYT_KEY="ts_live_..."

curl -s "https://transcript-yt.com/v1/transcript?url=5f3Pn-N6yLc&format=text" \
  -H "Authorization: Bearer $TRANSCRIPTYT_KEY"

Subtitle files and translation

Use format=srt or vtt with -o to save a file, and translate_to to translate it into one of 150+ languages. --fail makes curl exit non-zero on an error instead of saving the error body.

curl -s --fail -o captions.es.srt \
  "https://transcript-yt.com/v1/transcript?url=5f3Pn-N6yLc&format=srt&translate_to=es" \
  -H "Authorization: Bearer $TRANSCRIPTYT_KEY"

Pick fields from the JSON with jq

curl -s "https://transcript-yt.com/v1/transcript?url=5f3Pn-N6yLc" \
  -H "Authorization: Bearer $TRANSCRIPTYT_KEY" \
  | jq -r '.segments[] | "\(.start | floor)s  \(.text)"'

Download a list of videos

Put one video ID or link per line in videos.txt. Failed requests aren't billed, so the loop just reports them and moves on.

mkdir -p transcripts
while read -r video; do
  id=$(basename "$video" | sed 's/.*v=//; s/[?&].*//')
  curl -s --fail -o "transcripts/$id.txt" \
    "https://transcript-yt.com/v1/transcript?url=$id&format=text" \
    -H "Authorization: Bearer $TRANSCRIPTYT_KEY" || echo "failed: $video"
done < videos.txt

Whole playlists and channels

List a playlist's or channel's videos with /v1/playlist and feed the IDs into the loop above. The channel and playlist guide covers it end to end, and the docs list every parameter.

curl -s "https://transcript-yt.com/v1/playlist?url=https://www.youtube.com/@veritasium" \
  -H "Authorization: Bearer $TRANSCRIPTYT_KEY" \
  | jq -r '.videos[].videoId' > videos.txt

Common questions

How do I download a YouTube transcript with curl?

Run curl "https://transcript-yt.com/v1/transcript?url=VIDEO_ID&format=text" -H "Authorization: Bearer $TRANSCRIPTYT_KEY". Use format=srt or vtt for subtitle files.

Can I download transcripts without yt-dlp?

Yes. yt-dlp downloads subtitle files from YouTube directly and often gets blocked on servers; the API returns the transcript over HTTPS from any machine, and creates one with AI when a video has no captions.

How do I download transcripts for a whole playlist?

Call /v1/playlist to list the video IDs, then loop over them with the command in this guide, or use the batch endpoint to fetch many in one request.

Try the YouTube Transcript API

Get transcripts as JSON, text, SRT, or VTT. 100 free credits, no card required.

More guides