New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

ytranscript-api

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ytranscript-api

Reliable YouTube transcript extraction API client — no IP bans, no proxy management, Whisper fallback for captionless videos.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
14
-46.15%
Maintainers
1
Weekly downloads
 
Created
Source

ytranscript-api

Official JavaScript/TypeScript client for the yTranscript API — reliable YouTube transcript extraction without IP bans, proxy management, or player-response scraping.

  • No IP bans — the managed extraction layer absorbs YouTube's bot detection for you
  • Captionless videos work — automatic Whisper speech-to-text fallback
  • Simple, typed — one method, structured segments, zero dependencies

Install

npm install ytranscript-api

Quickstart

import { YTranscript } from "ytranscript-api";

const yt = new YTranscript("yk_live_...");   // get a key at ytranscript.com/developers

const t = await yt.transcript("dQw4w9WgXcQ");        // video ID or any YouTube URL
console.log(t.lang);                                  // "en"
console.log(t.segments[0]);                           // { text, offset, duration }
console.log(t.text);                                  // full transcript as one string

console.log(yt.lastQuota);                            // { limit, used, rateLimitRemaining }

Options

await yt.transcript("https://youtu.be/dQw4w9WgXcQ", { lang: "es" });

new YTranscript(key, { timeoutMs: 60_000 });

Error handling

import { YTranscriptError } from "ytranscript-api";

try {
  await yt.transcript(videoId);
} catch (err) {
  if (err instanceof YTranscriptError) {
    err.code;    // "no_transcript" | "quota_exceeded" | "rate_limited" | ...
    err.status;  // HTTP status
  }
}

Pricing & keys

Plans start at $29/mo for 10,000 units (captions = 1 unit, Whisper = 15 units). Get an API key at ytranscript.com/developers.

License

MIT

Keywords

youtube

FAQs

Package last updated on 02 Jul 2026

Related posts