Skip to main content

Google News Scraper Tool

The Google News Scraper Tool is a custom tool that allows the Newsletter AI Agent to gather the latest news articles related to a specified topic using the Apify Super Fast Google News Scraper actor.

Overview

The Google News Scraper Tool is primarily used by the Researcher Agent to gather the latest news and developments about the specified topic. It provides a flexible interface for searching Google News and extracting structured data from news articles.

Implementation

The Google News Scraper Tool is implemented as a CrewAI BaseTool that interacts with the Apify Super Fast Google News Scraper actor. Here’s the implementation:

Parameters

The Google News Scraper Tool accepts the following parameters:

Usage

The Google News Scraper Tool is used by the Researcher Agent to gather the latest news about the specified topic:

Return Value

The tool returns a list of news articles, where each article is a dictionary containing information about the article, including:
  • title: The title of the news article
  • link: The URL of the news article
  • source: The source of the news article (e.g., “CNN”, “BBC”)
  • publishedAt: The date the article was published
  • snippet: A brief snippet or summary of the article
  • Additional metadata about the article

Apify Integration

The tool uses the Apify Super Fast Google News Scraper actor, which provides several advantages:
  1. Scalability: The actor can handle large numbers of news searches efficiently
  2. Reliability: The actor is designed to handle rate limiting and other issues that can arise when scraping Google News
  3. Structured Data: The actor returns news articles in a structured format that is easy to process
  4. Freshness: The actor focuses on retrieving the latest news articles, ensuring that the information is up-to-date

Configuration

To use the Google News Scraper Tool, you need to set up the following environment variables:

Next Steps