google-search-results
library and an API key from SerpApi.
Parameter | Type | Default | Description |
---|---|---|---|
api_key | Optional[str] | None | SerpApi API key. If not provided, will use SERP_API_KEY environment variable. |
enable_search_google | bool | True | Enable Google search functionality. |
enable_search_youtube | bool | False | Enable YouTube search functionality. |
all | bool | False | Enable all available functions in the toolkit. |
Function | Description |
---|---|
search_google | Search Google using the Serpapi API. Parameters include query (str) for the search query and num_results (int, default=10) for the number of results. Returns JSON formatted search results with organic results, recipes, shopping results, knowledge graph, and related questions. |
search_youtube | Search YouTube using the Serpapi API. Parameters include query (str) for the search query. Returns JSON formatted search results with video results, movie results, and channel results. |