{"record":{"id":"ea35de36d255c756","repo":"n8n-io/n8n","slug":"searxng-search-failed-response-status-respon","errorCode":null,"errorMessage":"SearXNG search failed: ${response.status} ${response.statusText}","messagePattern":"SearXNG search failed: (.+?) (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-utilities/src/web-search/searxng-search.ts","lineNumber":55,"sourceCode":"\t}\n\n\tconst normalizedUrl = baseUrl.replace(/\\/+$/, '');\n\n\tconst params = new URLSearchParams({\n\t\tq: searchQuery,\n\t\tformat: 'json',\n\t\tpageno: '1',\n\t});\n\n\tconst response = await fetchImpl(`${normalizedUrl}/search?${params}`, {\n\t\theaders: {\n\t\t\tAccept: 'application/json',\n\t\t},\n\t\t...(options.abortSignal ? { signal: options.abortSignal } : {}),\n\t});\n\n\tif (!response.ok) {\n\t\tthrow new Error(`SearXNG search failed: ${response.status} ${response.statusText}`);\n\t}\n\n\tconst data = (await response.json()) as SearxngApiResponse;\n\tconst maxResults = options.maxResults ?? 5;\n\n\treturn {\n\t\tquery,\n\t\tresults: (data.results ?? []).slice(0, maxResults).map((r) => ({\n\t\t\ttitle: r.title,\n\t\t\turl: r.url,\n\t\t\tsnippet: r.content,\n\t\t\t...(r.publishedDate ? { publishedDate: r.publishedDate } : {}),\n\t\t})),\n\t};\n}\n","sourceCodeStart":37,"sourceCodeEnd":71,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-utilities/src/web-search/searxng-search.ts#L37-L71","documentation":"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.","triggerScenarios":"Thrown at packages/@n8n/ai-utilities/src/web-search/searxng-search.ts:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the SearXNG base URL is correct and the instance is reachable.","Enable the JSON format on the SearXNG instance (settings: search.formats must include 'json') — otherwise the endpoint returns an error status.","Check the instance's response in a browser or curl to see the underlying error body."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","contentChangedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}