SkillHub

google-news-api

v0.1.0

Scrape structured news data from Google News automatically. Use when the user asks for news on a topic, industry trends, or PR monitoring. Triggers on keywords like "find news about", "track trends", or "monitor PR".

Sourced from ClawHub, Authored by phheng

Installation

Please help me install the skill `google-news-api` from SkillHub official store. npx skills add phheng/google-news-api

Google News Automation Scraper Skill

✨ Platform Compatibility

✅ Works Powerfully & Reliably On All Major AI Assistants

Platform Status How to Install
OpenCode ✅ Fully Supported Copy skill folder to ~/.opencode/skills/
Claude Code ✅ Fully Supported Native skill support
Cursor ✅ Fully Supported Copy to ~/.cursor/skills/
OpenClaw ✅ Fully Supported Compatible

Why Choose BrowserAct Skills? - 🚀 Stable & crash-free execution - ⚡ Fast response times - 🔧 No configuration headaches - 📦 Plug & play installation - 💬 Professional support

📖 Introduction

This skill provides a one-stop news collection service using BrowserAct's Google News API template. It allows the agent to retrieve structured news data with a single command.

🔑 API Key Guidance

Before running, check the BROWSERACT_API_KEY environment variable. If not set, do not proceed with script execution; instead, request the API key from the user.

Required Message to User:

"Since you haven't configured the BrowserAct API Key, please go to the BrowserAct Console to get your Key and provide it to me in this chat."

🛠️ Input Parameters

Flexibly configure these parameters based on user requirements:

  1. Search_Keywords
  2. Type: string
  3. Description: Keywords to search on Google News (e.g., company names, industry terms).
  4. Example: AI Startup, Tesla, SpaceX

  5. Publish_date

  6. Type: string
  7. Description: Time range filter for articles.
  8. Options:
    • any time: No restriction
    • past hours: Breaking news
    • past 24 hours: Daily monitoring (Recommended)
    • past week: Short-term trends
    • past year: Long-term research
  9. Default: past week

  10. Datelimit

  11. Type: number
  12. Description: Maximum news items to extract.
  13. Default: 30
  14. Suggestion: Use 10-30 for monitoring, higher for research.

Execute the following script to get results:

# Call Example
python .cursor/skills/google-news-api/scripts/google_news_api.py "Keywords" "TimeRange" Count

📊 Data Output

Successful execution returns structured data: - headline: News title - source: Publisher - news_link: URL - published_time: Timestamp - author: Author name (if available)

⚠️ Error Handling & Retry Mechanism

  1. Check Output:
  2. If output contains "Invalid authorization", the API Key is invalid. Do not retry. Guide the user to provide a correct key.
  3. For other failures (e.g., Error: or empty results), automatically retry once.

  4. Retry Limit:

  5. Maximum one automatic retry. If it still fails, stop and report the error to the user.