> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Searxng

> Search a self-hosted Searxng instance for web, image, news, and other category results with SearxngTools.

**SearxngTools** enable an Agent to search the web using a self-hosted Searxng instance.

## Prerequisites

The following example requires the `openai` library.

```shell theme={null}
uv pip install -U openai
```

## Example

```python cookbook/91_tools/searxng_tools.py theme={null}
from agno.agent import Agent
from agno.tools.searxng import SearxngTools

# Initialize Searxng with your Searxng instance URL
searxng = SearxngTools(
    host="http://localhost:53153",
    engines=[],
    fixed_max_results=5,
)

# Create an agent with Searxng
agent = Agent(tools=[searxng])

# Example: Ask the agent to search using Searxng
agent.print_response("""
Please search for information about artificial intelligence
and summarize the key points from the top results
""")
```

## Toolkit Params

| Parameter | Type | Default | Description |
| - | - | - | - |
| `host` | `str` | - | The host for the connection. |
| `engines` | `Optional[List[str]]` | `None` | A list of search engines to use. |
| `fixed_max_results` | `Optional[int]` | `None` | Optional parameter to specify the fixed maximum number of results. |
| `timeout` | `int` | `30` | Timeout in seconds for HTTP requests. |

## Toolkit Functions

| Function | Description |
| - | - |
| `search_web` | Performs a general web search using the specified query. Parameters include `query` for the search term and `max_results` for the maximum number of results (default is 5). Returns the search results. |
| `image_search` | Performs an image search using the specified query. Parameters include `query` for the search term and `max_results` for the maximum number of results (default is 5). Returns the image search results. |
| `it_search` | Performs a search for IT-related information using the specified query. Parameters include `query` for the search term and `max_results` for the maximum number of results (default is 5). Returns the IT-related search results. |
| `map_search` | Performs a search for maps using the specified query. Parameters include `query` for the search term and `max_results` for the maximum number of results (default is 5). Returns the map search results. |
| `music_search` | Performs a search for music-related information using the specified query. Parameters include `query` for the search term and `max_results` for the maximum number of results (default is 5). Returns the music search results. |
| `news_search` | Performs a search for news using the specified query. Parameters include `query` for the search term and `max_results` for the maximum number of results (default is 5). Returns the news search results. |
| `science_search` | Performs a search for science-related information using the specified query. Parameters include `query` for the search term and `max_results` for the maximum number of results (default is 5). Returns the science search results. |
| `video_search` | Performs a search for videos using the specified query. Parameters include `query` for the search term and `max_results` for the maximum number of results (default is 5). Returns the video search results. |

You can use `include_tools` or `exclude_tools` to modify the list of tools the agent has access to. Learn more about [selecting tools](https://agno-v2.mintlify.site/tools/selecting-tools.md).

## Developer Resources

* [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/searxng.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.