Googlesearch¶
flowtask.components.GoogleSearch
¶
GoogleSearch
¶
Bases: GoogleBase
Google Custom Search Component
Overview:
This component performs Google Custom Search queries using the Google Custom Search API. It can search for specific queries and return results including URLs, titles, and snippets. The component can receive search terms either from a previous component or a list of terms specified in the configuration.
.. table:: Properties :widths: auto
+-----------------------+----------+------------------------------------------------------------------------------------------------------+ | Name | Required | Description | +-----------------------+----------+------------------------------------------------------------------------------------------------------+ | terms (list) | No | List of search terms to use. Required if no previous component provided | +-----------------------+----------+------------------------------------------------------------------------------------------------------+ | column (str) | No | Name of the column in the DataFrame when using a previous component | +-----------------------+----------+------------------------------------------------------------------------------------------------------+ | site (str) | No | Optional site restriction for the search (e.g., 'site:example.com') | +-----------------------+----------+------------------------------------------------------------------------------------------------------+ | max_results (int) | No | Maximum number of results to return per search (default: 1) | +-----------------------+----------+------------------------------------------------------------------------------------------------------+
Return:
The component returns a DataFrame with columns: 'search_term', 'search_url', 'search_title', 'search_snippet' containing the search results.