Overview
The Searxng node for n8n enables you to perform web searches using a Searxng metasearch engine instance. It is designed to query multiple categories (such as general, images, news, etc.) and supports advanced options like language selection, time range, safe search, pagination, and output format. This node is useful in workflows where automated information retrieval from the web is required, such as content aggregation, research automation, or AI agent enrichment.
Practical examples:
- Automatically gather recent news articles about a topic.
- Retrieve image results for a given keyword.
- Integrate web search into chatbots or AI assistants.
- Collect scientific articles or social media mentions for monitoring.
Properties
| Name | Type | Meaning |
|---|---|---|
| Query | String | The search query to perform. Can be provided directly or via AI agent input. |
| Categories | MultiOptions | Categories to search in (e.g., General, Images, News, Videos, etc.). |
| Return Single Response | Boolean | If enabled, returns only the content from the first search result as a string. |
| Additional Fields | Collection | Optional advanced settings: |
| — Language | Options | Language of the search results (English, German, French, etc., or all languages). |
| — Time Range | Options | Time range for the search results (Any Time, Day, Week, Month, Year). |
| — Safe Search | Options | Safe search level (Off, Moderate, Strict). |
| — Page Number | Number | Page number of results (minimum 1). |
| — Format | Options | Output format of the search results (HTML, JSON, RSS). |
Output
- If Return Single Response is enabled and results are found:
{ "success": true, "query": "<your query>", "answer": "<content of the first search result>" } - Otherwise, for each search:
{ "success": true, "query": "<your query>", "results": [ { "title": "<result title>", "url": "<result URL>", "content": "<main content>", "snippet": "<short snippet or content>" }, ... ], "metadata": { "total": <number of results>, "time": <search time>, "engine": "<engine name>" }, "raw": { ...full API response... } } - On error (if "Continue On Fail" is enabled):
{ "success": false, "error": "<error message>", "query": "<your query>" }
Dependencies
- External Service: Requires access to a running Searxng instance with API support.
- API Credentials: Needs an API URL and API Key configured in n8n credentials under
searxngApi. - n8n Configuration: No special environment variables beyond the credential setup.
Troubleshooting
Missing Credentials:
Error:"No credentials got returned!"
Resolution: Ensure that the Searxng API credentials are correctly set up in n8n.Invalid API URL or Key:
Error messages from the Searxng API may appear if the URL or key is incorrect.
Resolution: Double-check the API endpoint and key in your credentials.Empty Results:
If no results are returned, check your query, selected categories, and filters (like language or time range).Format Issues:
If you select a non-JSON format but expect structured data, the output may not match expectations.Network/Connection Errors:
These may occur if the Searxng instance is unreachable.
Resolution: Verify network connectivity and the availability of the Searxng service.