Skip to main content

llama-index readers youtube transcript integration

Project description

Youtube Transcript Loader

pip install llama-hub-youtube-transcript

pip install llama-index-readers-youtube-transcript

This loader fetches the text transcript of Youtube videos using the youtube_transcript_api Python package.

Usage

To use this loader, you will need to first pip install youtube_transcript_api.

Then, simply pass an array of YouTube links into load_data:

from llama_index.readers.youtube_transcript import YoutubeTranscriptReader

loader = YoutubeTranscriptReader()
documents = loader.load_data(
    ytlinks=["https://www.youtube.com/watch?v=i3OYlaoj-BM"]
)

Supported URL formats: + youtube.com/watch?v={video_id} (with or without 'www.') + youtube.com/embed?v={video_id} (with or without 'www.') + youtu.be/{video_id} (never includes www subdomain)

To programmatically check if a URL is supported:

from llama_index.readers.youtube_transcript.utils import is_youtube_video

is_youtube_video("https://youtube.com/watch?v=j83jrh2")  # => True
is_youtube_video("https://vimeo.com/272134160")  # => False

This loader is designed to be used as a way to load data into LlamaIndex.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_readers_youtube_transcript-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_readers_youtube_transcript-0.5.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_youtube_transcript-0.5.0.tar.gz
Algorithm Hash digest
SHA256 496489ed2574a507de494dbca71cfe0c3d621bb7d735bd0c3c50d8dca77bdd9b
MD5 60962971c3b9a0984283e5fb5377a83a
BLAKE2b-256 4b2405fddf856555bafca8fd711d81b5ccd4571b39918bc683b4ef75ff0c654f

See more details on using hashes here.

File details

Details for the file llama_index_readers_youtube_transcript-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_readers_youtube_transcript-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_youtube_transcript-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb69021d519a71f6cd88dc05a85f3d28e11da4ccd4bfdc4882fbe17e5ba5318d
MD5 a63c6e058b7100536dee8501b8e2aede
BLAKE2b-256 489be90da39358d6c221e05ecc589e345cf03c5028f162b71a878d736ae9ac11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page