SearXNG Tool
The SearXNG Tool is a wrapper around SearXNG, a free internet metasearch engine. This tool allows users to perform web searches and retrieve results programmatically within a language model or AI application.
Node Details
-
Name: searXNG
-
Type: SearXNG
-
Version: 2.0
-
Category: Tools
Input Parameters
Required
-
Base URL
-
Label: Base URL
-
Name: apiBase
-
Type: string
-
Default: “http://searxng:8080”
-
Description: The base URL of the SearXNG instance to use for searches.
-
Optional
-
Headers
-
Label: Headers
-
Name: headers
-
Type: json
-
Description: Custom headers for the request
-
Optional: true
-
Additional Params: true
-
-
Format
-
Label: Format
-
Name: format
-
Type: options
-
Options:
-
JSON
-
HTML
-
-
Default: “json”
-
Description: Format of the response. Requires enabling search formats in settings.yml.
-
-
Categories
-
Label: Categories
-
Name: categories
-
Type: string
-
Description: Comma-separated list of active search categories.
-
Optional: true
-
Additional Params: true
-
-
Engines
-
Label: Engines
-
Name: engines
-
Type: string
-
Description: Comma-separated list of active search engines.
-
Optional: true
-
Additional Params: true
-
-
Language
-
Label: Language
-
Name: language
-
Type: string
-
Description: Code of the language for search results.
-
Optional: true
-
Additional Params: true
-
-
Page No.
-
Label: Page No.
-
Name: pageno
-
Type: number
-
Description: Search page number.
-
Optional: true
-
Additional Params: true
-
-
Time Range
-
Label: Time Range
-
Name: time_range
-
Type: string
-
Description: Time range for search results (for supported engines).
-
Optional: true
-
Additional Params: true
-
-
Safe Search
-
Label: Safe Search
-
Name: safesearch
-
Type: number
-
Description: Filter for safe search results (for supported engines).
-
Optional: true
-
Additional Params: true
-
Functionality
The SearXNG Tool initializes a SearxngSearch instance with the provided configuration. When called, it performs a search query and returns the results in a structured format.
Output
The tool returns search results as a string, which can be:
-
A JSON array of search results (title, link, and snippet)
-
A direct answer if available
-
Content from an infobox if present
-
A list of suggestions if no direct results are found
-
“No good results found.” if no relevant information is retrieved
Use Cases
-
Answering questions about current events
-
Gathering information from multiple sources
-
Performing web searches within an AI application or chatbot
-
Retrieving structured data from search engine results
Notes
-
Ensure that the SearXNG instance is properly configured and accessible.
-
Some features may require additional configuration in the SearXNG settings.yml file.
-
The tool uses a 5-second timeout for search requests.