Code examples for the GetTranscript API. Extract YouTube transcripts, subtitles and captions for single videos, playlists and channels from your own code.
- Export transcripts as TXT, Markdown, SRT, VTT, JSON or CSV
- Get timestamped captions
- Extract transcripts for single videos, playlists and channels
- Rate limit: 60 requests per minute per API key / IP
- Credits: 1 credit per successfully processed video
Create a free API key in your GetTranscript dashboard. Credit packs are listed on the pricing page.
The Python and Node.js examples load the key from a .env file (via python-dotenv / dotenv). Create a .env file in the example's folder and set your key there. The exact variable name is at the top of each example script.
cd python
pip install requests python-dotenv
python fetch_transcript.pycd nodejs
npm install axios dotenv
node fetch_transcript.jscd curl
bash request.shEndpoints, parameters and error responses are described in the official API documentation.
- Free YouTube transcript extractor: web interface for single videos, no sign-up
- Bulk transcript extractor: web interface for playlists and channels, up to 100 videos per job
- Pricing: pay-as-you-go credits, 1 video = 1 credit