
Google News Api Skill
- 43 installs
- 5.2k repo stars
- Updated July 21, 2026
- browser-act/skills
google-news-api-skill is a Claude skill that extracts structured Google News results (headline, source, link, published time, author) via the BrowserAct API.
About
This skill extracts news data from Google News using the BrowserAct Google News API. A developer provides search keywords, a publish-date time filter, and an item limit and gets back structured results including headline, source, article link, published time, and author. It is used for industry trend tracking, competitor intelligence, and PR monitoring. It requires a BROWSERACT_API_KEY.
- Extracts structured Google News results via the BrowserAct API
- Returns headline, source, article link, published time, and author
- Filters by keyword and publication time range for trend and PR monitoring
Google News Api Skill by the numbers
- 43 all-time installs (skills.sh)
- Ranked #1,127 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
google-news-api-skill capabilities & compatibility
Requires a paid BrowserAct API key (BROWSERACT_API_KEY).
- Capabilities
- web scraping · trend tracking · competitor monitoring · market research
- Use cases
- web scraping · web search · research · data analysis
- Runs
- Runs locally
- Pricing
- Bring your own API key
What google-news-api-skill says it does
This skill helps users automatically extract structured news data from Google News via BrowserAct API.
It directly extracts structured news results from Google News, including headlines, sources, publication times, and article links.
npx skills add https://github.com/browser-act/skills --skill google-news-api-skillAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 43 |
|---|---|
| repo stars | ★ 5.2k |
| Last updated | July 21, 2026 |
| Repository | browser-act/skills ↗ |
What it does
Collect structured Google News articles (headline, source, link, time) for a keyword and time window.
Who is it for?
Tracking industry news, competitor updates, and brand media exposure over time windows.
Skip if: Reading full article bodies; it returns headline-level metadata and links only.
When should I use this skill?
You need structured Google News results for a keyword within a specific time range.
What you get
A structured list of news items (headline, source, link, published time) for a keyword.
- Structured news items (headline, source, link, published time)
By the numbers
- 5 output news fields
- 5 publish-date time filters
- default 30-item limit
Files
Google News Automation Skill
📖 Introduction
This 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.
✨ Features
1. No Hallucinations: Pre-set workflows avoid AI generative hallucinations, ensuring stable and precise data extraction. 2. No Captcha Issues: No need to handle reCAPTCHA or other verification challenges. 3. No IP Restrictions: No need to handle regional IP restrictions or geofencing. 4. Faster Execution: Tasks execute faster compared to pure AI-driven browser automation solutions. 5. Cost-Effective: Significantly lowers data acquisition costs compared to high-token-consuming AI solutions.
🔑 API Key Setup
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."
🛠️ Input Parameters
Agent should flexibly configure the following parameters based on user needs:
1. Search_Keywords (Search Keywords)
- Type:
string - Description: The content to search on Google News. Can be company names, industry terms, competitor names, etc.
- Example:
AI Startup,Tesla,SpaceX
2. Publish_date (Time Range)
- Type:
string - Description: 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 week
3. Datelimit (Max Items)
- Type:
number - Description: Maximum number of news items to extract per task.
- Default:
30 - Suggestion: Use 10-30 for real-time monitoring; use larger values for deep research.
🚀 Usage
Agent 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⏳ Execution Monitoring
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:
- 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 Output
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)
⚠️ Error Handling & Retry
If an error occurs during script execution (e.g., network fluctuations or task failure), the Agent should follow this logic:
1. Check Output Content:
- If the output contains
"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. - If the output does not contain
"Invalid authorization"but the task failed (e.g., output starts withError:or returns empty results), the Agent should automatically try to re-execute the script once.
2. Retry Limit:
- Automatic retry is limited to one time. If the second attempt fails, stop retrying and report the specific error information to the user.
🌟 Typical Use Cases
1. Industry Trend Tracking: Find the latest developments in fields like "Low-altitude economy" or "Generative AI". 2. PR Monitoring: Monitor media exposure of a specific brand or company over the past 24 hours. 3. Competitor Intelligence: Collect information on new products or marketing activities from competitors over the past week. 4. Market Research: Get popular reports on specific keywords across different time dimensions. 5. Figure Tracking: Retrieve the latest news reports on industry leaders or public figures. 6. Daily News Summary: Automatically extract and summarize daily news in specific domains. 7. Global Breaking News: Get real-time updates on major global events. 8. Structured Data Extraction: Extract structured information like headlines, sources, and links for analysis. 9. Media Exposure Analysis: Evaluate the propagation heat of a project or event in mainstream news media. 10. Long-term Research: Retrieve all in-depth reports on a specific technical topic from the past year.
import os
import time
import requests
import json
import sys
import datetime
import io
# Force UTF-8 encoding for standard output and error streams to ensure compatibility with Windows PowerShell
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
# API Configuration
# TEMPLATE_ID extracted from official BrowserAct Google News API documentation
TEMPLATE_ID = "77638424152140851"
API_BASE_URL = "https://api.browseract.com/v2/workflow"
def run_google_news_task(api_key, keywords, date_range="past week", limit=30):
"""
Executes a Google News scraping task via BrowserAct API.
Args:
api_key (str): BrowserAct API Key
keywords (str): Search keywords
date_range (str): Time range filter (any time, past hours, past 24 hours, past week, past year)
limit (int): Maximum number of items to extract
"""
headers = {"Authorization": f"Bearer {api_key}"}
payload = {
"workflow_template_id": TEMPLATE_ID,
"input_parameters": [
{"name": "Search_Keywords", "value": keywords},
{"name": "Publish_date", "value": date_range},
{"name": "Datelimit", "value": str(limit)}
]
}
# 1. Start Task
print(f"Starting task via BrowserAct API...", flush=True)
try:
response = requests.post(f"{API_BASE_URL}/run-task-by-template", json=payload, headers=headers, timeout=30)
res = response.json()
except Exception as e:
print(f"Error: Connection to API failed - {e}", flush=True)
return None
if response.status_code == 401 or (isinstance(res, dict) and "Invalid authorization" in str(res)):
print(f"Error: Invalid authorization. Please check your BrowserAct API Key.", flush=True)
return None
if "id" not in res:
print(f"Error: Could not start task. Response: {res}", flush=True)
return None
task_id = res["id"]
print(f"Task started successfully. Task ID: {task_id}", flush=True)
# 2. Poll for Completion
print(f"Waiting for task completion...", flush=True)
max_poll_time = 300
poll_start = time.time()
while time.time() - poll_start < max_poll_time:
try:
status_response = requests.get(f"{API_BASE_URL}/get-task-status?task_id={task_id}", headers=headers, timeout=30)
status_res = status_response.json()
status = status_res.get("status")
timestamp = datetime.datetime.now().strftime("%H:%M:%S")
print(f"[{timestamp}] Task Status: {status}", flush=True)
if status == "finished":
print(f"[{timestamp}] Task finished successfully.", flush=True)
break
elif status in ["failed", "canceled"]:
print(f"Error: Task {status}. Please check your BrowserAct dashboard.", flush=True)
return None
except Exception as e:
timestamp = datetime.datetime.now().strftime("%H:%M:%S")
print(f"[{timestamp}] Polling error: {e}. Retrying in 10s...", flush=True)
time.sleep(10)
print(f"Error: Task polling timed out after {max_poll_time} seconds.", flush=True)
return None
# 3. Get Results
print(f"Retrieving results...", flush=True)
try:
task_info_response = requests.get(f"{API_BASE_URL}/get-task?task_id={task_id}", headers=headers, timeout=30)
task_info = task_info_response.json()
# Extract structured data from API response
output = task_info.get("output", {})
result_string = output.get("string")
if result_string:
return result_string
else:
return json.dumps(task_info, ensure_ascii=False)
except Exception as e:
print(f"Error: Failed to retrieve results - {e}", flush=True)
return None
if __name__ == "__main__":
# Get API Key from environment variable
api_key = os.getenv("BROWSERACT_API_KEY")
if len(sys.argv) < 2:
print("Usage: python google_news_api.py <keywords> [date_range] [limit]", flush=True)
print("Example: python google_news_api.py \"AI technology\" \"past 24 hours\" 10", flush=True)
sys.exit(1)
if not api_key:
print("\n[!] ERROR: BrowserAct API Key is missing.", flush=True)
print("Please follow these steps:", flush=True)
print("1. Go to: https://www.browseract.com/reception/integrations", flush=True)
print("2. Copy your API Key.", flush=True)
print("3. Set it as an environment variable (BROWSERACT_API_KEY) or provide it in the chat.", flush=True)
sys.exit(1)
keywords = sys.argv[1]
date_range = sys.argv[2] if len(sys.argv) > 2 else "past week"
limit = sys.argv[3] if len(sys.argv) > 3 else 30
result = run_google_news_task(api_key, keywords, date_range, limit)
if result:
# Final output for the Agent to process
print(result, flush=True)
Related skills
FAQ
What news fields are returned?
headline, source, news_link, published_time, and author when available.
Can I filter by time?
Yes, Publish_date supports any time, past hours, past 24 hours, past week, and past year.