| name | google-news-api |
| description | 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". |
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:
-
Search_Keywords
- Type:
string
- Description: Keywords to search on Google News (e.g., company names, industry terms).
- Example:
AI Startup, Tesla, SpaceX
-
Publish_date
- Type:
string
- Description: Time range filter for articles.
- 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
- Default:
past week
-
Datelimit
- Type:
number
- Description: Maximum news items to extract.
- Default:
30
- Suggestion: Use 10-30 for monitoring, higher for research.
๐ Execution (Recommended)
Execute the following script to get results:
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
-
Check Output:
- If output contains
"Invalid authorization", the API Key is invalid. Do not retry. Guide the user to provide a correct key.
- For other failures (e.g.,
Error: or empty results), automatically retry once.
-
Retry Limit:
- Maximum one automatic retry. If it still fails, stop and report the error to the user.