Skip to main content

Google Search Tool

The Google Search Tool is a custom tool that allows the Newsletter AI Agent to search the web for relevant information using the Apify Google Search Scraper actor.

Overview

The Google Search Tool is primarily used by the Researcher Agent to gather general information about the specified topic. It provides a flexible interface for searching Google and extracting structured data from search results.

Implementation

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

Parameters

The Google Search Tool accepts the following parameters:

Usage

The Google Search Tool is used by the Researcher Agent to gather information about the specified topic:

Return Value

The tool returns a list of search results, where each result is a dictionary containing information about a search result, including:
  • title: The title of the search result
  • url: The URL of the search result
  • description: A snippet of text from the search result
  • position: The position of the result in the search results
  • Additional metadata about the search result

Apify Integration

The tool uses the Apify Google Search Scraper actor, which provides several advantages:
  1. Scalability: The actor can handle large numbers of search queries efficiently
  2. Reliability: The actor is designed to handle rate limiting and other issues that can arise when scraping search results
  3. Structured Data: The actor returns search results in a structured format that is easy to process

Configuration

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

Next Steps