npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

get-youtube-transcript

v1.0.0

Published

Fetch YouTube transcripts / subtitles from the command line or in Node — free, no API key. Works in 2026 (handles YouTube's PoToken).

Readme

get-youtube-transcript

Fetch a YouTube transcript / subtitles from the command line or in Node.js — free, no API key. Works in 2026: it handles YouTube's PoToken (BotGuard) requirement that breaks most older transcript tools.

npx get-youtube-transcript https://www.youtube.com/watch?v=jNQXAC9IVRw
All right, so here we are, in front of the elephants...

Why another one?

Most free YouTube transcript libraries stopped working in 2025–2026: YouTube now returns an empty response to caption requests that lack a valid PoToken bound to the video. This tool solves the BotGuard challenge and fetches the real captions, so it keeps working where naive scrapers return nothing.

Install

npm install -g get-youtube-transcript
# or run without installing:
npx get-youtube-transcript <video>

CLI usage

youtube-transcript <video-url-or-id> [--lang en,es] [--format text|json|srt]

youtube-transcript jNQXAC9IVRw
youtube-transcript jNQXAC9IVRw --format json
youtube-transcript jNQXAC9IVRw --lang es --format srt

Use in code

import { getTranscript } from 'get-youtube-transcript';

const { text, segments, language } = await getTranscript('jNQXAC9IVRw', { languages: ['en'] });
console.log(text);
// segments: [{ start, duration, text }, ...]

Scope & limits

This is a single-video, best-effort tool that runs from your own IP. That's perfect for scripts, notebooks, and low-volume use. It is not built for:

  • Bulk extraction (hundreds/thousands of videos)
  • Reliability at scale — YouTube blocks datacenter IPs and rate-limits aggressively, so unattended/server use will get throttled
  • SRT/VTT/RAG-chunk output, 100+ language fallback, or guaranteed uptime

Need that? Use the hosted version

For production workloads — bulk, RAG-ready chunks, SRT/VTT, 100+ languages, hosted residential proxies, retries, and uptime monitoring — use the Apify actor (same engine, run for you at scale, pay per transcript):

YouTube Transcript Scraper on Apify

Also available: YouTube Comments Scraper.

How it works

  1. Fetch the watch page, parse ytInitialPlayerResponse for caption tracks.
  2. Mint a PoToken bound to the video ID via BotGuard (bgutils-js).
  3. Request the caption track with &pot=<token>&c=WEB&fmt=json3 and parse the segments.

License

MIT