谷歌新闻提取_google-news-api-skill
以下为本文档的中文说明google-news-api-skill 是一个通过 BrowserAct API 自动从 Google News 提取结构化新闻数据的技能。它利用预设的工作流直接从 Google News 获取新闻结果包括标题、来源、发布时间和文章链接等结构化信息只需输入搜索关键词和时间过滤条件即可获得清晰可用的新闻数据。使用场景包括当需要搜索特定主题的最新新闻时当需要跟踪行业趋势和动态时当需要监控品牌在媒体中的曝光和舆情时当需要收集竞争对手的最新动态时当需要获取特定关键词的最新报道时当需要进行市场热点话题研究时当需要汇总每日行业新闻简报时当需要追踪特定人物的媒体活动时当需要检索过去 24 小时的热点事件时当需要提取结构化数据用于市场研究和分析时当需要进行舆情预警和风险监控时。核心特点包括一是无幻觉No Hallucinations预设的工作流直接从 Google News 提取数据避免了 AI 生成式幻觉问题确保数据提取的稳定性和精确性每一条信息都可追溯到真实源头二是无需处理验证码不需要应对 reCAPTCHA 等验证挑战大幅减少运维成本和人工干预三是无 IP 限制不需要处理区域 IP 限制或地理封锁问题全球新闻一网打尽适合跨国信息采集需求四是执行速度快相比纯 AI 驱动的浏览器自动化方案任务执行效率更高响应时间更短适合实时性要求高的场景五是成本效益好同样工作量的运营成本远低于其他新闻采集方案六是高度可定制支持灵活的关键词选择和时间范围设置并能将数据导出为 CSV、JSON 等结构化格式便于后续分析和处理。这个技能为新闻监测和舆情分析提供了高效、可靠的数据采集方案。Google News Automation Skill IntroductionThis 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.✨ FeaturesNo Hallucinations: Pre-set workflows avoid AI generative hallucinations, ensuring stable and precise data extraction.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 execute faster compared to pure AI-driven browser automation solutions.Cost-Effective: Significantly lowers data acquisition costs compared to high-token-consuming AI solutions. API Key SetupBefore running, check theBROWSERACT_API_KEYenvironment 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.”️ Input ParametersAgent should flexibly configure the following parameters based on user needs:Search_Keywords (Search Keywords)Type:stringDescription: The content to search on Google News. Can be company names, industry terms, competitor names, etc.Example:AI Startup,Tesla,SpaceXPublish_date (Time Range)Type:stringDescription: Filter news by publication time.Options:any 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)Default:past weekDatelimit (Max Items)Type:numberDescription: Maximum number of news items to extract per task.Default:30Suggestion: Use 10-30 for real-time monitoring; use larger values for deep research. UsageAgent should use the following independent script to achieve “one-line command result”:# Examplepython-u./scripts/google_news_api.pySearch KeywordsPublish DateQuantity⏳ Execution MonitoringSince this task involves automated browser operations, it may take some time (several minutes). The script willcontinuously output status logs with timestamps(e.g.,[14:30:05] Task Status: running).Agent Instructions:While waiting for the script result, keep monitoring the terminal output.As long as the terminal is outputting new status logs, the task is running normally; do not mistake it for a deadlock or unresponsiveness.Only if the status remains unchanged for a long time or the script stops outputting without returning a result should you consider triggering the retry mechanism. Data OutputAfter 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)⚠️ Error Handling RetryIf an error occurs during script execution (e.g., network fluctuations or task failure), the Agent should follow this logic:Check Output Content:If the outputcontainsInvalid 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.If the outputdoes not containInvalid authorizationbut the task failed (e.g., output starts withError:or returns empty results), the Agent shouldautomatically try to re-execute the script once.Retry Limit:Automatic retry is limited toone time. If the second attempt fails, stop retrying and report the specific error information to the user. Typical Use CasesIndustry Trend Tracking: Find the latest developments in fields like “Low-altitude economy” or “Generative AI”.PR Monitoring: Monitor media exposure of a specific brand or company over the past 24 hours.Competitor Intelligence: Collect information on new products or marketing activities from competitors over the past week.Market Research: Get popular reports on specific keywords across different time dimensions.Figure Tracking: Retrieve the latest news reports on industry leaders or public figures.Daily News Summary: Automatically extract and summarize daily news in specific domains.Global Breaking News: Get real-time updates on major global events.Structured Data Extraction: Extract structured information like headlines, sources, and links for analysis.Media Exposure Analysis: Evaluate the propagation heat of a project or event in mainstream news media.Long-term Research: Retrieve all in-depth reports on a specific technical topic from the past year.