Install
openclaw skills install google-news-api-skillThis skill helps users automatically extract structured news data from Google News via BrowserAct API. Agent should proactively apply this skill when users express needs like searching for news about a specific topic, tracking industry trends, monitoring public relations or sentiment, collecting competitor updates, getting latest reports on specific keywords, monitoring brand exposure in media, researching market hot topics, summarizing daily industry news, tracking media activities of specific individuals, retrieving hot events from the past 24 hours, extracting structured data for market research, monitoring global breaking news.
openclaw skills install google-news-api-skillThis skill provides a one-stop news collection service using BrowserAct's Google News API template. It directly extracts structured news results from Google News, including headlines, sources, publication times, and article links. Simply input search keywords and time filters to get clean, usable news data.
Before running, check the BROWSERACT_API_KEY environment variable. If not set, do not take other measures; ask and wait for the user to provide it.
Agent must inform the user:
"Since you haven't configured the BrowserAct API Key, please visit the BrowserAct Console to get your Key."
Agent should flexibly configure the following parameters based on user needs:
Search_Keywords (Search Keywords)
stringAI Startup, Tesla, SpaceXPublish_date (Time Range)
stringany time: No restrictionpast hours: Past few hours (breaking news)past 24 hours: Past 24 hours (daily monitoring)past week: Past week (short-term trends)past year: Past year (long-term research)past weekDatelimit (Max Items)
number30Agent should use the following independent script to achieve "one-line command result":
# Example
python -u ./scripts/google_news_api.py "Search Keywords" "Publish Date" Quantity
Since this task involves automated browser operations, it may take some time (several minutes). The script will continuously output status logs with timestamps (e.g., [14:30:05] Task Status: running).
Agent Instructions:
After successful execution, the script parses and prints results directly from the API response. Results include:
headline: News titlesource: Publisher/Sourcenews_link: Article URLpublished_time: Publication timeauthor: Author (if available)If an error occurs during script execution (e.g., network fluctuations or task failure), the Agent should follow this logic:
Check Output Content:
"Invalid authorization", it means the API Key is invalid or expired. Do not retry; guide the user to re-check and provide the correct API Key."Invalid authorization" but the task failed (e.g., output starts with Error: or returns empty results), the Agent should automatically try to re-execute the script once.Retry Limit: