Google News Api Skill — Google News API 技能
v0.1.3This 技能 helps users automatically 提取 structured news data from Google News via BrowserAct API. 代理 should proactively 应用ly this 技能 when users express needs like 搜索ing for news about a specific topic, 追踪ing industry trends, 监控ing public relations or sentiment, collecting competitor 更新s, 获取ting latest 报告s on specific keywords, 监控ing brand exposure in media, re搜索ing market hot topics, summarizing dAIly industry news, 追踪ing media activities of specific individuals, retrieving hot 事件 from the past 24 hours, 提取ing structured data for market re搜索, 监控ing global breaking news.
运行时依赖
安装命令
点击复制技能文档
Google News 自动化 技能 📖 Introduction
This 技能 provides a one-停止 news collection 服务 using BrowserAct's Google News API template. It directly 提取s structured news 结果s from Google News, including headlines, sources, publication times, and article links. Simply 输入 搜索 keywords and time 过滤器s to 获取 清理, usable news data.
✨ Features No Hallucinations: Pre-设置 工作流s avoid AI generative hallucinations, ensuring stable and precise data 提取ion. No Captcha Issues: No need to handle reCAPTCHA or other verification challenges. No IP Restrictions: No need to handle regional IP restrictions or geofencing. Faster Execution: Tasks 执行 faster compared to pure AI-driven browser 自动化 solutions. Cost-Effective: 签名ificantly lowers data acquisition costs compared to high-令牌-consuming AI solutions. 🔑 API Key 设置up
Before 运行ning, 检查 the BROWSERACT_API_KEY 环境 variable. If not 设置, do not take other measures; ask and wAIt for the user to provide it. 代理 must 信息rm the user:
"Since you haven't 配置d the BrowserAct API Key, please visit the BrowserAct Console to 获取 your Key."
🛠️ 输入 Parameters
代理 should flexibly 配置 the following parameters based on user needs:
搜索_Keywords (搜索 Keywords)
Type: string Description: The content to 搜索 on Google News. Can be company names, industry terms, competitor names, etc. Example: AI 启动up, Tesla, SpaceX
Publish_date (Time Range)
Type: string Description: 过滤器 news by publication time. Options: any time: No restriction past hours: Past few hours (breaking news) past 24 hours: Past 24 hours (dAIly 监控ing) past week: Past week (short-term trends) past year: Past year (long-term re搜索) Default: past week
Datelimit (Max Items)
Type: number Description: Maximum number of news items to 提取 per task. Default: 30 Suggestion: Use 10-30 for real-time 监控ing; use larger values for deep re搜索. 🚀 Usage
代理 should use the following independent script to achieve "one-line command 结果":
# Example python -u ./scripts/google_news_API.py "搜索 Keywords" "Publish Date" Quantity
⏳ Execution 监控ing
Since this task involves automated browser operations, it may take some time (several minutes). The script will continuously 输出 状态 记录s with timestamps (e.g., [14:30:05] Task 状态: 运行ning). 代理 Instructions:
While wAIting for the script 结果, keep 监控ing the terminal 输出. As long as the terminal is 输出ting new 状态 记录s, the task is 运行ning normally; do not mistake it for a deadlock or unresponsiveness. Only if the 状态 remAIns unchanged for a long time or the script 停止s 输出ting without returning a 结果 should you consider triggering the retry mechanism. 📊 Data 输出
After 成功ful execution, the script 解析s and prints 结果s directly from the API 响应. 结果s include:
headline: News title source: Publisher/Source news_link: Article URL published_time: Publication time author: Author (if avAIlable) ⚠️ Error Handling & Retry
If an error occurs during script execution (e.g., network fluctuations or task 失败), the 代理 should follow this 记录ic:
检查 输出 Content:
If the 输出 contAIns "Invalid authorization", it means the API Key is invalid or expired. Do not retry; 图形界面de the user to re-检查 and provide the correct API Key. If the 输出 does not contAIn "Invalid authorization" but the task fAIled (e.g., 输出 启动s with Error: or returns empty 结果s), the 代理 should automatically try to re-执行 the script once.
Retry Limit:
Automatic retry is limited to one time. If the second attempt fAIls, 停止 retrying and 报告 the specific error in格式化ion to the user. 🌟 Typical Use Cases Industry Trend 追踪ing: Find the latest developments in fields like "Low-altitude economy" or "Generative AI". PR 监控ing: 监控 media exposure of a specific brand or company over the past 24 hours. Competitor Intelligence: Collect in格式化ion on new products or marketing activities from competitors over the past week. Market Re搜索: 获取 popular 报告s on specific keywords across different time dimensions. Figure 追踪ing: Retrieve the latest news 报告s on industry leaders or public figures. DAIly News Summary: Automatically 提取 and summarize dAIly news in specific domAIns. Global Breaking News: 获取 real-time 更新s on major global 事件. Structured Data 提取ion: 提取 structured in格式化ion like headlines, sources, and links for analysis. Media Exposure Analysis: Evaluate the propagation heat of a project or event in mAIn流 news media. Long-term Re搜索: Retrieve all in-depth 报告s on a specific technical topic from the past year.