Overview
OfflineTube provides powerful search and discovery tools to help you find videos before downloading them for offline viewing. The YouTube Explorer feature lets you search YouTube, browse trending content, and preview video details without leaving the app.Key Features
YouTube Search
Search for videos directly from the Explorer tab using keywords or by pasting YouTube URLs. How to use:- Navigate to the Explorer tab from the main navigation
- Enter a search query or paste a YouTube URL in the search bar
- Press Enter or click the search button
- Browse results with thumbnails, duration, and view counts
- Standard:
https://youtube.com/watch?v=VIDEO_ID - Short:
https://youtu.be/VIDEO_ID - Shorts:
https://youtube.com/shorts/VIDEO_ID - Embedded:
https://youtube.com/embed/VIDEO_ID
Trending Videos
When you first open the Explorer, you’ll see trending videos automatically loaded from YouTube.The trending feed shows up to 20 popular videos and refreshes when you open the Explorer tab.
Video Preview
Click any video from search results or trending to see detailed information:- Full title and uploader name
- View count and duration
- High-resolution thumbnail
- Available quality options
- File size estimates
- Format details (codec, resolution)
Behind the Scenes
Search API Call
When you search, the frontend makes a request to the backend:Backend Implementation
The backend uses yt-dlp to search YouTube:Trending Endpoint
Configuration
Search Parameters
- Max Results: Default is 20 videos per search
- Extract Mode: Uses
extract_flat: Truefor faster searches (metadata only, no full video info)
Error Handling
The app includes smart error handling:Tips and Best Practices
Performance Optimization
- Trending videos are loaded once when you open the Explorer tab
- Search is only triggered when you press Enter or click the search button
- Failed API calls are throttled to avoid flooding the console (logs only 1st failure and every 10th)
Mobile Experience
The search interface is fully responsive:- Grid layout adapts from 1 to 5 columns based on screen size
- Touch-friendly cards with proper spacing
- Mobile-optimized search overlay (Header.tsx:68-105)
Related Features
- Download Management - Download videos after finding them
- Offline Playback - Watch downloaded videos
- Library Management - Organize your downloaded content