n8n-io/n8n · error · Error

SearXNG search failed

Error message

SearXNG search failed: ${response.status} ${response.statusText}

What it means

API failure from searxngSearch. It fires when the SearXNG instance's /search endpoint (called with format=json) returns a non-ok HTTP status; no retries are attempted, unlike the Brave client. Usually means the instance is down, misconfigured, or has JSON output disabled.

Solutions

  1. Verify the SearXNG base URL is correct and the instance is reachable.
  2. Enable the JSON format on the SearXNG instance (settings: search.formats must include 'json') — otherwise the endpoint returns an error status.
  3. Check the instance's response in a browser or curl to see the underlying error body.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/@n8n/ai-utilities/src/web-search/searxng-search.ts:55 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/ea35de36d255c756. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/ai-utilities/src/web-search/searxng-search.ts:55

	}

	const normalizedUrl = baseUrl.replace(/\/+$/, '');

	const params = new URLSearchParams({
		q: searchQuery,
		format: 'json',
		pageno: '1',
	});

	const response = await fetchImpl(`${normalizedUrl}/search?${params}`, {
		headers: {
			Accept: 'application/json',
		},
		...(options.abortSignal ? { signal: options.abortSignal } : {}),
	});

	if (!response.ok) {
		throw new Error(`SearXNG search failed: ${response.status} ${response.statusText}`);
	}

	const data = (await response.json()) as SearxngApiResponse;
	const maxResults = options.maxResults ?? 5;

	return {
		query,
		results: (data.results ?? []).slice(0, maxResults).map((r) => ({
			title: r.title,
			url: r.url,
			snippet: r.content,
			...(r.publishedDate ? { publishedDate: r.publishedDate } : {}),
		})),
	};
}

View on GitHub (pinned to 5ac6606e81)