JUHE API Marketplace
KnightMode avatar
MCP Server

YouTube Search MCP Server

A Model Context Protocol server that provides comprehensive YouTube search functionality, enabling users to search for videos, channels, and playlists with advanced filtering options using the YouTube Data API.

0
GitHub Stars
11/22/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. youtube-mcp

README Documentation

YouTube Search MCP Server

A fast and comprehensive MCP (Model Context Protocol) server that provides YouTube search functionality using the YouTube Data API v3.

Features

  • Comprehensive Search: Search videos, channels, and playlists
  • Advanced Filtering: Duration, quality, date range, region, and language filters
  • Pagination Support: Handle large result sets with pagination tokens
  • Multiple Search Types: Specialized tools for different content types
  • Error Handling: Robust error handling and validation
  • Rate Limiting Aware: Optimized for YouTube API quota management

Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Set up your YouTube API key:
export YOUTUBE_API_KEY="your_youtube_api_key_here"
  1. Run the server:
python youtube_search_mcp.py

API Setup

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the YouTube Data API v3
  4. Create an API key in the credentials section
  5. Set the API key as an environment variable

Available Tools

Main Search Tool

  • search_youtube - Full-featured search with all available filters

Specialized Search Tools

  • search_youtube_videos - Video-specific search with video filters
  • search_youtube_channels - Channel-specific search
  • search_youtube_playlists - Playlist-specific search
  • search_youtube_by_channel - Search within a specific channel

Resource

  • youtube-search-help - Comprehensive help documentation

Usage Examples

Basic Video Search

# Search for programming videos
search_youtube_videos("python programming", max_results=10, order="date")

Advanced Video Search

# Search for short programming videos from last month
search_youtube_videos(
    "machine learning", 
    max_results=20,
    duration="short",
    order="viewCount",
    published_after="2024-01-01T00:00:00Z"
)

Channel Search

# Find channels about data science
search_youtube_channels("data science", max_results=15)

Search Within Channel

# Search within a specific channel
search_youtube_by_channel(
    "UC_x5XG1OV2P6uZZ5FSM9Ttw",
    query="tutorial",
    max_results=25
)

Parameters

Common Parameters

  • query: Search query string
  • max_results: Number of results (0-50, default: 25)
  • order: Sort order (relevance, date, rating, viewCount, title)
  • region_code: Geographic region (ISO 3166-1 alpha-2 country code)

Video-Specific Parameters

  • duration: Video length (any, short, medium, long)
  • definition: Video quality (any, high, standard)
  • published_after/before: Date filtering (RFC 3339 format)

Response Format

All search results include:

  • Search metadata (total results, pagination tokens)
  • Processed items with titles, descriptions, URLs
  • Channel information and publication dates
  • Thumbnail URLs in multiple sizes

Rate Limiting

  • Daily quota: 10,000 units (default)
  • Search cost: 100 units per request
  • Maximum searches: ~100 requests per day
  • Best practices: Implement caching and use specific filters

Error Handling

The server handles various error conditions:

  • Invalid API key
  • Quota exceeded
  • Invalid parameters
  • Network errors
  • Rate limiting

Best Practices

  1. Use specific filters to get relevant results
  2. Implement caching for frequently searched terms
  3. Monitor quota usage in Google Cloud Console
  4. Use pagination tokens for large result sets
  5. Handle errors gracefully with retry logic

Security

  • Store API keys in environment variables
  • Never expose API keys in client-side code
  • Implement proper rate limiting
  • Validate and sanitize search queries

License

This project is open source and available under the MIT License.

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright © 2025 - All rights reserved