Black Friday · 30% off

Get 30% off

Python reader

YouTube transcripts in LlamaIndex

GetYouTubeTranscriptReader has the same load_data(ytlinks=[...]) call as LlamaIndex's YoutubeTranscriptReader, but the transcripts are fetched by the GetYouTubeTranscript API. It keeps working on cloud servers where YouTube blocks direct requests.

Set it up

  1. 1

    Install the reader

    Into the same environment as llama-index:

    pip install llama-index-readers-getyoutubetranscript
  2. 2

    Get an API key

    Sign in at getyoutubetranscript.com and create a key on the developers page (100 free credits, no card). Keys start with sk_live_. Set it as an environment variable:

    export GETYOUTUBETRANSCRIPT_API_KEY=sk_live_...
  3. 3

    Swap the import

    If you used YoutubeTranscriptReader, change the import and class name; load_data(ytlinks=...) stays the same.

Build an index from a video

from llama_index.core import VectorStoreIndex
from llama_index.readers.getyoutubetranscript import GetYouTubeTranscriptReader

documents = GetYouTubeTranscriptReader().load_data(ytlinks=["https://youtu.be/5e37ZT3SQbk"])
index = VectorStoreIndex.from_documents(documents)
print(index.as_query_engine().query("What does the speaker say about education?"))

What you can build

  • A query engine over a course playlist or a creator's back catalog.
  • Timestamped retrieval: timestamps=True keeps {start, duration, text} segments in metadata, hidden from embeddings.
  • Multilingual indexes: pass language="es" (or any caption language) per call.

Links

Questions about LlamaIndex

Which links does it accept?

Any YouTube URL (watch, youtu.be, Shorts, live) or an 11-character video ID.

Is the API key stored in serialized readers?

No. The key is read from the api_key argument or the environment and is never serialized.

What does it cost?

Each transcript, search or channel page uses one credit from your account, and failed requests are not charged. New accounts get 100 free credits, no card, and paid plans add more credits each month.

Use it in your other tools

All integrations

Featured on aitoolfame.comFeatured on Aura++Featured on DeepLaunch.ioFeatured on Dofollow.ToolsFeatured on EasyDoFollowFeatured on EarlyHuntFeatured on Findly.toolsFeatured on FoundrListGood AI ToolsFeatured on IndieHuntFeatured on LaunchBuffFeatured on launched.toolsFeatured on Launch Llama ToolsFeatured on LemonLaunchLiftOff launch badgeMy Launch StashGetYouTubeTranscript on Nick LaunchesOpenHunts Club MemberFeatured on saasfame.comShinyLaunchFeatured on ShowMeBestAIFeatured on toolfame.comListed on Turbo0Featured on Twelve ToolsHuzzler Embed BadgeFeatured on CodeHypeGetYouTubeTranscript on Better LaunchDokeyAIFeatured on WayfindioFeatured on LaunchZoneFeatured on NoonlaunchFeatured on WhatsthebigdataSurfaced on CodeTrendyFeatured on ScrollLaunchFeatured on ufind.bestFeatured on ShipBoostProduct WingWe Like ToolsAppa ListAcid ToolsPower Up ToolsToshi ListAIGC 160Appsy ToolsHunt for ToolsBeam ToolsTool Find DirTool SignalSaaS Tools DirSoftware BoltProduct List DirStack DirectorySaaS FieldSaaS WheelSaaS RootsStartup BenchmarksUnite ListTrustinerBest Tool VaultSolver ToolsAsh ListSmart Kit HubAI X CollectionAI Tech ViralMillion Dot HomepageThat App ShowLaunch ScrollMy Start ToolsLatest AI UpdatesSuper AI BoomTools Under RadarThe Key ToolsTool JourneyTools List HQThe App ToolsThe Mega ToolsSource DirTool CosmosTop Trend ToolsTiny Tool HubTool PrismStartup AIdeasFeatured on WonderLaunchFeatured on ShipycornFeatured on ToolsClawListed on ProofStoriesFeatured on ToolListedLaunched on Launch Streak