Search Videos
Content Discovery
Search Videos
GET
Search Videos
Search for YouTube videos by query or fetch information from a direct URL.
Query Parameters
Search query or YouTube URL. Can be:
- Search keywords (e.g., “python tutorial”)
- Direct YouTube video URL
- YouTube playlist URL
Maximum number of results to return (1-50)
Response
Array of video objects matching the search criteria
Example Request
Search by Keywords
Search by URL
Example Response
Error Responses
400 Bad Request
Returned when theq parameter is missing or empty.
500 Internal Server Error
Returned when the search operation fails.Implementation Notes
- When
qstarts withhttp, the endpoint treats it as a direct URL and extracts video info - For search queries, uses YouTube’s search functionality via yt-dlp
- Results are limited by
max_resultsparameter (default: 20) - Thumbnail URLs use YouTube’s
hqdefaultquality for consistent sizing