A free, fast, self-hostable YouTube transcript generator. Paste any YouTube link and get a clean, searchable, timestamped transcript you can copy or export as TXT, SRT, VTT, or JSON.
A modern, distinct take on the youtubetotranscript.com concept — same job, nicer UI, more export options.
- Any YouTube URL — full links,
youtu.be, Shorts, embeds,/live, or a bare video id - Clickable timestamps that jump to the exact second on YouTube
- Live search across the transcript with highlighting
- Auto-detected captions — pulls the best track in the video's own language
- Plain-text (default) or timestamped views
- Export as
.txt,.txt(with timestamps),.srt,.vtt, or.json - Dark / light theme, fully responsive
- One-click copy, word count, and reading time
- Persistent caching (memory + disk) and rate limiting — repeat and shared lookups return in ~1ms and survive restarts; popular example videos are pre-warmed on boot
YouTube now gates its caption endpoint behind an anti-bot token, so a plain HTTP
request returns nothing. Scriptly drives yt-dlp
— the most reliable YouTube extractor — to resolve fresh, working caption URLs
plus video metadata, then downloads and parses the captions itself
(json3 → srv1 → vtt fallback) into clean segments.
Browser ──▶ /api/transcript ──▶ yt-dlp (metadata + caption URLs) ──▶ fetch + parse ──▶ JSON
- Node.js 18+
- yt-dlp on the server's PATH
# install yt-dlp (pick one)
pip install -U yt-dlp
# or download the standalone binary from https://github.com/yt-dlp/yt-dlp/releasesOptional but recommended for resilience:
pip install -U "yt-dlp[default]" curl_cffienables request impersonation, which reduces the chance of YouTube throttling.
npm install
npm start # http://localhost:3000
# or: npm run dev (auto-restart on change)Environment variables:
| Variable | Default | Purpose |
|---|---|---|
PORT |
3000 |
Port to listen on |
YTDLP_PATH |
yt-dlp |
Full path to the yt-dlp binary |
PREWARM |
(on) | Set to 0 to skip warming example videos on boot |
YTDLP_COOKIES_FILE |
(none) | Path to a Netscape cookies.txt (beats YouTube's bot check on cloud IPs) |
YTDLP_COOKIES_B64 |
(none) | base64 of a cookies.txt, if you can't mount a file |
YTDLP_PROXY |
(none) | Proxy URL for yt-dlp and the caption download (HTTPS_PROXY/HTTP_PROXY also work) |
A note on speed: the first fetch of a new video takes ~2s because YouTube gates caption text behind an anti-bot token that only yt-dlp reliably defeats — a direct API call returns empty. Already-seen videos are served from the memory/disk cache in ~1ms. Transcripts are cached for 7 days under
.cache/(git-ignored).
GET /api/transcript?url=<youtube-url>&lang=<optional-lang-code>
Example:
curl "http://localhost:3000/api/transcript?url=https://youtu.be/jNQXAC9IVRw"Response shape:
Errors return { "error": "...", "code": "..." } with an appropriate HTTP status
(404 no captions, 422 unavailable/private, 429 rate-limited, 503 blocked).
Any host that can run the included Dockerfile works (a small VPS,
Fly.io, Render, Railway, a container, etc.). For Render there's a one-click
render.yaml Blueprint.
From a datacenter IP (Render, Fly, most clouds) YouTube frequently responds with
“Sign in to confirm you're not a bot”, which surfaces as a 503 blocked
error. This is YouTube rejecting the IP, not a bug. Two ways around it:
- Cookies (free). Export
youtube.comcookies in Netscape format from a browser logged into a throwaway Google account, then expose them to the app:- Render: Service → Environment → Secret Files → add
cookies.txt, then setYTDLP_COOKIES_FILE=/etc/secrets/cookies.txt. - Or set
YTDLP_COOKIES_B64to the base64 of the file. - Tip: export from a fresh private/incognito window and close it right after, so YouTube doesn't rotate (invalidate) the cookies. Re-export when they expire.
⚠️ Use a disposable account — automated use can get a Google account flagged.
- Render: Service → Environment → Secret Files → add
- Proxy (most reliable, usually paid). Point
YTDLP_PROXYat a residential/ mobile proxy; it's applied to both yt-dlp and the caption download.
Scriptly only reads publicly available captions on demand and stores nothing in a database. It is not affiliated with YouTube. Respect creators' rights and only use transcripts where you're permitted to.
MIT
{ "video": { "id", "title", "author", "lengthSeconds", "viewCount", "thumbnail", "url" }, "language": { "code", "label", "auto" }, "available":[ { "languageCode", "label", "auto" } ], "segments": [ { "start", "duration", "text" } ] }