The YouTube Trending Video Analyzer is a ready-to-use n8n template that connects directly to the YouTube Data API. It bypasses the manual effort of searching for trends by automatically fetching, filtering, and ranking videos based on real-time performance metrics like view counts and engagement rates.
Key Features
- Automated Trend Discovery: Automatically searches for videos based on your specific keywords (e.g., "pets", "tech", "gaming") published within the last week.
- Deep Performance Metrics: Goes beyond the surface to pull comprehensive statistics, including view counts, like counts, and comment counts.
- Smart Engagement Scoring: Built-in logic calculates an Engagement Rate Percentage, allowing you to identify videos that aren't just getting views, but are actually resonating with their audience.
- Advanced Duration Filtering: Includes a custom JavaScript processor that converts YouTube's ISO 8601 duration format into readable hours, minutes, and seconds, with a pre-configured filter for specific video lengths (currently set to focus on short-form content under 60 seconds).
- Organized Data Output: Automatically sorts the final list from highest to lowest view count, ensuring the most viral content is always at the top of your list.
How It Works
- Configuration: Set your API key and target keyword in the initial node.
- Search: The workflow queries the YouTube API for the top 25 videos matching your criteria from the past 7 days.
- Enrichment: It iterates through each video to pull specific metadata and engagement stats.
- Transformation: A code node reformats technical duration strings into a human-readable format.
- Refinement: Data is filtered by length and sorted by popularity for a clean, actionable report.
Technical Requirements
- Platform: n8n (Desktop or Cloud)
- Credentials: A valid YouTube Data API v3 Key.