This skill helps users automatically extract structured data from YouTube search results using the BrowserAct API. The Agent should proactively apply this skill when users express needs like searching for YouTube videos by keywords, finding the latest YouTube Shorts for a specific topic, gathering YouTube channel data for competitor analysis, monitoring trending YouTube playlists, extracting YouTube search results for market research, tracking view counts for specific YouTube keywords, compiling a list of YouTube videos on a subject, discovering new YouTube content creators in a niche, searching YouTube for tutorial videos automatically, and retrieving structured YouTube search data without opening video pages.
This skill provides users with a one-stop YouTube search data extraction service through BrowserAct's YouTube Search API template. It can extract structured fields directly from the YouTube search results list. Simply provide the search keywords and limit conditions to get clean, usable video, shorts, channel, or playlist data.
Before running, you must first check the BROWSERACT_API_KEY environment variable. If it is not set, do not take any other actions; you should request and wait for the user's collaboration to provide it.
The Agent must inform the user at this time:
"Since you have not configured the BrowserAct API Key, please go to the BrowserAct Console first to get your Key."
When calling the script, the Agent should flexibly configure the following parameters based on the user's needs:
KeyWords
stringAI, automation, n8n, web scrapingVideo_type
stringVideos, Shorts, Channels, PlaylistsVideosDate_limit
number20, 50, 100100The Agent should achieve "one-command results" by executing the following independent script:
# Call example
python -u ./scripts/youtube_search_api.py "KeyWords" "Video_type" Date_limit
Because this task involves automated browser operations, it may take a long time (several minutes). The script will continuously output status logs with timestamps (e.g., [14:30:05] Task Status: running) while running.
Notice to Agent:
After successful execution, the script will parse and print the result directly from the API response. The extracted data includes:
title: Title shown in search resultsdescription: Short description snippet (when available)view_count: View count displayed in resultspublished_at: Publish time displayed in resultsurl: Result item URLDuring the execution of the script, if an error occurs (such as network fluctuation or task failure), the Agent should follow this logic:
Check the output content:
"Invalid authorization", it means the API Key is invalid or expired. At this time, do not retry, and you should guide the user to recheck and provide the correct API Key."Invalid authorization" but the task execution fails (for example, the output starts with Error: or the returned result is empty), the Agent should automatically try to execute the script again.Retry limit: