From 136e607e6ec7382bf1e02d8b4277ea5ac7c5b269 Mon Sep 17 00:00:00 2001 From: fedegonc Date: Fri, 26 Jun 2026 21:54:01 -0300 Subject: [PATCH 1/2] docs: add SearchAPI toolkit documentation --- docs.json | 1 + tools/toolkits/search/searchapi.mdx | 51 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 tools/toolkits/search/searchapi.mdx diff --git a/docs.json b/docs.json index 8a2a14236..46af8f890 100644 --- a/docs.json +++ b/docs.json @@ -2187,6 +2187,7 @@ "tools/toolkits/search/seltz", "tools/toolkits/search/serpapi", "tools/toolkits/search/serper", + "tools/toolkits/search/searchapi", "tools/toolkits/search/tavily", "tools/toolkits/search/valyu", "tools/toolkits/search/wikipedia", diff --git a/tools/toolkits/search/searchapi.mdx b/tools/toolkits/search/searchapi.mdx new file mode 100644 index 000000000..f7d186bab --- /dev/null +++ b/tools/toolkits/search/searchapi.mdx @@ -0,0 +1,51 @@ +--- +title: SearchAPI +--- + +**SearchApiTools** provides an integration with [SearchAPI.io](https://www.searchapi.io/), allowing Agno agents to search Google, Google News, Google Images, and YouTube through a single toolkit. + +## Prerequisites + +An API key from [SearchAPI.io](https://www.searchapi.io/). + +```shell +export SEARCHAPI_API_KEY=*** +``` + +## Example + +The following agent will search Google for the latest AI developments. + +```python cookbook/14_tools/searchapi_tools.py +from agno.agent import Agent +from agno.tools.searchapi import SearchApiTools + +agent = Agent(tools=[SearchApiTools()]) +agent.print_response("What are the latest developments in AI agents?", markdown=True) +``` + +## Toolkit Params + +| Parameter | Type | Default | Description | +| --- | --- | --- | --- | +| `api_key` | `Optional[str]` | `None` | SearchAPI key. If not provided, uses `SEARCHAPI_API_KEY` environment variable. | +| `num_results` | `int` | `5` | Default number of results to return per search. | +| `timeout` | `int` | `30` | Request timeout in seconds. | +| `enable_search_google` | `bool` | `True` | Enable Google web search. | +| `enable_search_news` | `bool` | `False` | Enable Google News search. | +| `enable_search_images` | `bool` | `False` | Enable Google Images search. | +| `enable_search_youtube` | `bool` | `False` | Enable YouTube search. | +| `all` | `bool` | `False` | Enable all available search functions. | + +## Toolkit Functions + +| Function | Description | +| --- | --- | +| `search_google` | Search Google. Parameters: `query` (str), `num_results` (int), `location` (str, optional), `language` (str, optional). Returns organic results, knowledge graph, and related questions. | +| `search_news` | Search Google News. Parameters: `query` (str), `num_results` (int), `country` (str, optional), `language` (str, optional). Returns news articles with title, source, date, and snippet. | +| `search_images` | Search Google Images. Parameters: `query` (str), `num_results` (int), `safe_search` (str, optional). Returns image results with title, link, and thumbnail. | +| `search_youtube` | Search YouTube. Parameters: `query` (str), `num_results` (int). Returns video results with title, link, channel, duration, and views. | + +## Developer Resources + +- View [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/searchapi.py) From d45c622af3f579ba2982d4885f130af691e761fe Mon Sep 17 00:00:00 2001 From: Harsh Sinha Date: Tue, 14 Jul 2026 17:41:30 +0530 Subject: [PATCH 2/2] update --- docs.json | 4 ++-- examples/tools/overview.mdx | 1 + tools/toolkits/overview.mdx | 8 ++++++++ tools/toolkits/search/searchapi.mdx | 14 +++++++++----- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/docs.json b/docs.json index 57b45883b..d820ddcba 100644 --- a/docs.json +++ b/docs.json @@ -2181,11 +2181,11 @@ "tools/toolkits/search/perplexity", "tools/toolkits/search/pubmed", "tools/toolkits/search/scavio", + "tools/toolkits/search/searchapi", "tools/toolkits/search/searxng", "tools/toolkits/search/seltz", "tools/toolkits/search/serpapi", "tools/toolkits/search/serper", - "tools/toolkits/search/searchapi", "tools/toolkits/search/tavily", "tools/toolkits/search/valyu", "tools/toolkits/search/wikipedia", @@ -7171,6 +7171,7 @@ "examples/tools/newspaper4k-tools", "examples/tools/reddit-tools", "examples/tools/scrapegraph-tools", + "examples/tools/searchapi-tools", "examples/tools/searxng-tools", "examples/tools/serpapi-tools", "examples/tools/serper-tools", @@ -7303,7 +7304,6 @@ "examples/tools/perplexity-tools", "examples/tools/scavio-tools", "examples/tools/scheduler-tools", - "examples/tools/searchapi-tools", "examples/tools/sofya-tools", "examples/tools/tool-calls-accesing-agent", "examples/tools/twelvelabs-tools", diff --git a/examples/tools/overview.mdx b/examples/tools/overview.mdx index 569e3c1ac..f18ac9c53 100644 --- a/examples/tools/overview.mdx +++ b/examples/tools/overview.mdx @@ -88,6 +88,7 @@ description: "Examples for using and creating tools in Agno." | [Replicate Tools](/examples/tools/replicate-tools) | Demonstrates replicate tools. | | [Resend Tools](/examples/tools/resend-tools) | Demonstrates resend tools. | | [ScrapeGraphTools](/examples/tools/scrapegraph-tools) | This script demonstrates the various capabilities of ScrapeGraphTools toolkit:. | +| [SearchAPI Tools](/examples/tools/searchapi-tools) | Demonstrates SearchAPI tools for real-time SERP data across Google web, Google News, Google Images, and YouTube. | | [Searxng Tools](/examples/tools/searxng-tools) | Demonstrates searxng tools. | | [Seltz Tools Example](/examples/tools/seltz-tools) | Generate and manage documents with Seltz. | | [Serpapi Tools](/examples/tools/serpapi-tools) | Demonstrates serpapi tools. | diff --git a/tools/toolkits/overview.mdx b/tools/toolkits/overview.mdx index ef45eca45..1efd07ea4 100644 --- a/tools/toolkits/overview.mdx +++ b/tools/toolkits/overview.mdx @@ -76,6 +76,14 @@ The following **Toolkits** are available to use > Tools to search Pubmed. + + Tools to search Google, Google News, Google Images, and YouTube using SearchAPI. +