YouTube Search and Video Data Extractor

This template automates searching for videos on YouTube and extracting detailed metadata from each search result, compiling it into a structured data format.
This automation performs a comprehensive data extraction from YouTube based on a user-provided search query. Here's how it works:
  1. Search YouTube: It begins by taking your search term, along with optional settings for the maximum number of results and sort order (e.g., by relevance, view count, or upload date), and navigates to the corresponding YouTube search results page.
  2. Load Results: The automation intelligently scrolls down the page to load the desired number of video results.
  3. Extract Video Details: For each video found, it navigates to the video's page and extracts a rich set of metadata, including:
    • Video Title, URL, and Description
    • View Count, Like Count, and Comment Count
    • Publish Date and Duration
    • Channel Name, URL, and Subscriber Count
  4. Compile Data: Finally, it gathers all the extracted information into a single, structured JSON output, providing a comprehensive dataset for your analysis.
Usage Ideas
  • Market Research: Analyze the top-performing videos for a specific keyword to understand what content resonates with your audience.
  • Content Strategy: Identify trending topics, popular video formats, and successful content creators in your niche to inform your own video production.
  • Competitive Analysis: Automatically track the performance of your competitors' videos, monitoring their views, likes, and engagement over time.
  • Influencer Discovery: Find and gather data on influential creators in a specific domain for potential marketing partnerships.
  • Brand Monitoring: Regularly search for your brand or product name to collect and analyze user-generated video content and reviews.
Customization Ideas
This template is a powerful starting point for your own YouTube data-gathering needs. You can easily customize it to:
  • Refine Your Search: Change the search query, the number of videos you want to analyze, and how the results are sorted.
  • Customize Your Data: Modify the specific data points you want to extract from each video. You can add or remove fields like video category, hashtags, or other metadata to perfectly match your requirements.
  • Integrate Your Data: Add steps to automatically send the results to other applications. For example, you could save the data to a Google Sheet for analysis, send a summary to a Slack channel, or add it to a research database.
  • Schedule Your Runs: Configure the automation to run on a recurring schedule (e.g., daily or weekly) to monitor new videos on a topic, track competitor content, or keep an eye on brand mentions.
Agent Inputs
Required Parameters
Name
Type
Default
searchQuery
string
None
The search term to use on YouTube (e.g. 'machine learning tutorial')
Optional Parameters
Name
Type
Default
maxResults
number
20
Maximum number of videos to extract per run. Use -1 to extract all available results.
sortBy
string
relevance
Sort option for search results: 'relevance' (default), 'upload_date', 'view_count', or 'rating'