LlamaIndex Readers Integration: Youtube-Metadata
pip install llama_index.readers.youtube_metadata
This loader fetches the metadata of Youtube videos using the Google APIs. (https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics&id={videos_string}&key={api_key}). You must have a Google API key to use.
Transcripts of the text transcript of Youtube videos is fetched using the youtube_transcript_api Python package.
Usage
Simply pass an array of YouTube Video_ID into load_data.
from llama_index.readers.youtube_metadata import YoutubeMetaData
api_key = "Axxxxx" # youtube API Key
video_ids = ["S_0hBL4ILAg", "a2skIq6hFiY"]
youtube_meta = YoutubeMetaData(api_key)
details = youtube_meta.load_data(video_ids)
This can be combined with the YoutubeTranscriptReader to provide more information for RAG AI inquiries.
from llama_index.readers.youtube_transcript import YoutubeTranscriptReader
from llama_index.readers.youtube_metadata import YoutubeMetaData
video_ids = ["S_0hBL4ILAg", "a2skIq6hFiY"] # Example video IDs
yt_metadata = YouTubeMetaData(api_key=api_key)
print("Testing YouTubeMetaData...")
print(yt_metadata.load_data(video_ids))
yt_meta_transcript = YouTubeMetaDataAndTranscript(api_key=api_key)
print("Testing YouTubeMetaDataAndTranscript...")
print(yt_meta_transcript.load_data(video_ids))
The Video_id for youtube videos is right in the URL. In this URL: https://www.youtube.com/watch?v=a2skIq6hFiY&t=60s
The video_Id is 'a2skIq6hFiY&t'.
Metadata
Release files for llama-index-readers-youtube-metadata 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_readers_youtube_metadata-0.3.0.tar.gz | 3.0 kB | Without provenance | Details for llama_index_readers_youtube_metadata-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_readers_youtube_metadata-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_readers_youtube_metadata-0.3.0-py3-none-any.whl |
Total release size: 6.5 kB
Release files / llama_index_readers_youtube_metadata-0.3.0.tar.gz
| Download URL | llama_index_readers_youtube_metadata-0.3.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53de669ef800e3f5a2933daee30b8eb8c98f9380a14a0a17d1be011a7c667826
|
|
BLAKE2b-256 checksum How to use checksums |
89256df26cd0617c7c989922ff447e1f548f48d7add851c984d4ed3b30329898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
|
Release files / llama_index_readers_youtube_metadata-0.3.0-py3-none-any.whl
| Download URL | llama_index_readers_youtube_metadata-0.3.0-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31d7be5314f39529e71403e345c733dc8a5b380565a0d7edb87f0f9190deb535
|
|
BLAKE2b-256 checksum How to use checksums |
768043264604a6b4dd3b2726178d582a0c3f7cbca704da7c705aff07483296c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
|
Security for llama-index-readers-youtube-metadata 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.