web_search
Search the web using SearXNG to find information, research topics, look up documentation, debug errors, and locate GitHub issues or Stack Overflow threads.
Instructions
Search the web using SearXNG and return results.
This is the primary web search tool. Use it when you need to:
Find information on the web
Research a topic
Look up documentation
Debug errors (search for exact error messages)
Find GitHub issues or Stack Overflow threads
Args: query: Search query. Use specific keywords and quotes for exact phrases. num_results: Number of results to return (default: 5, max: 50). categories: Search category (general, news, images, videos, it, science, files, music). language: Language code (en, fr, es, de, etc.). time_range: Time filter (day, week, month, year) or None for no filter. include_content: If True, fetch and extract full page content for each result. This is slower but provides complete content without follow-up calls.
Returns: Dictionary with "results" list, where each result has: - title: Result title - url: Result URL - snippet: Search snippet from SearXNG - content: Full page content (if include_content=True, otherwise empty string) - engine: List of search engines that returned this result
Example: >>> await web_search("python async await", num_results=3) { "results": [ { "title": "Python Asyncio - Real Python", "url": "https://realpython.com/async-io-python/", "snippet": "Learn how to use Python's asyncio...", "content": "# Python Asyncio...", "engine": ["google", "bing"] } ] }
Notes: - Requires SEARXNG_BASE_URL environment variable to be set. - Content extraction is best-effort and may fail for paywalled or protected content. - For large num_results with include_content=True, this can be slow due to parallel fetching.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| language | No | en | |
| categories | No | general | |
| time_range | No | ||
| num_results | No | ||
| include_content | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||