Skip to main content

Search and query YouTube videos using AI embeddings

Project description

YouTube Search Tool

Search and query YouTube videos using AI embeddings. Add individual videos or entire channels, then search through their content using natural language.

Features

  • 🎥 Process individual YouTube videos or entire channels
  • 🔍 Semantic search through video transcripts
  • 🤖 Multiple AI providers (OpenAI, Google, Local models)
  • 🌐 Web interface with Gradio
  • ⚡ Fast batch processing with concurrent downloads

Installation

pip install youtube-search-tool

Quick Start

1. Set up environment

Create a .env file:

# Choose your AI provider
USE_EMBEDDING_PROVIDER=openai  # or 'google' or 'local'
USE_LLM_PROVIDER=openai

# API Keys (if using cloud providers)
OPENAI_API_KEY=your_openai_key
GEMINI_API_KEY=your_google_key

# Optional: Customize processing
MAX_WORKERS=4
MAX_CHANNEL_VIDEOS=100

2. Add videos

# Add a single video
yt-search add "https://www.youtube.com/watch?v=QPM0WNqwJBc"

# Add an entire channel
yt-search add "https://www.youtube.com/@Lamediainglesa"

3. Search

# Search through your videos
yt-search search "machine learning basics"
yt-search search "python tutorial"

4. Web Interface

# Launch the web interface
yt-search web

Requirements

  • Python 3.8+
  • Chrome/Chromium browser (for channel scraping)
  • API keys for cloud providers (optional, can use local models)

Supported AI Providers

  • OpenAI: text-embedding-ada-002 (requires API key)
  • Google: text-embedding-004 (requires API key)
  • Local: all-MiniLM-L6-v2 (no API key needed)

License

MIT License

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

youtube_search_tool_using_subtitles-0.1.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file youtube_search_tool_using_subtitles-0.1.0.tar.gz.

File metadata

File hashes

Hashes for youtube_search_tool_using_subtitles-0.1.0.tar.gz
Algorithm Hash digest
SHA256 039297dbc2e9bdf57f387084ac5780f6ae59e61bd6d0c8ebe16102d6497767b2
MD5 f5e753c8616d824f8ca7cdeb6a4803aa
BLAKE2b-256 cbba593d4ce2f029ca459a1c952f0402bd8799b24585bde9aa7ecd6e34fe9d9c

See more details on using hashes here.

File details

Details for the file youtube_search_tool_using_subtitles-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for youtube_search_tool_using_subtitles-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 093cf70e3f9fbe4db149f7e93000cc753cd8832925e5a72b0688d59c9e1d73ca
MD5 36f91c450a55d15bfe3d13430ba325a3
BLAKE2b-256 bf02f8a6af90bbba2bf296748db26ee970c1d29a743fe4a0df4b12d47ad38d30

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