From 23bfc11b193bb9723504fd63c3f6cb8d971d0543 Mon Sep 17 00:00:00 2001 From: zlatkoc Date: Mon, 16 Mar 2026 00:18:46 +0100 Subject: [PATCH] Add Startpage as a browser search engine option (#1368) Add Startpage (startpage.com) to the BrowserSearchEngine enum alongside Google, DuckDuckGo, Bing, and Kagi. Startpage provides an OpenSearch- compatible suggestions endpoint at /osuggestions, so autosuggestions work out of the box using the existing OSJSON parser. Co-authored-by: Zlatko Cajic Co-authored-by: Claude Opus 4.6 --- Sources/Panels/BrowserPanel.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Sources/Panels/BrowserPanel.swift b/Sources/Panels/BrowserPanel.swift index b38a7f5d..2ea023ea 100644 --- a/Sources/Panels/BrowserPanel.swift +++ b/Sources/Panels/BrowserPanel.swift @@ -56,6 +56,7 @@ enum BrowserSearchEngine: String, CaseIterable, Identifiable { case duckduckgo case bing case kagi + case startpage var id: String { rawValue } @@ -65,6 +66,7 @@ enum BrowserSearchEngine: String, CaseIterable, Identifiable { case .duckduckgo: return "DuckDuckGo" case .bing: return "Bing" case .kagi: return "Kagi" + case .startpage: return "Startpage" } } @@ -82,6 +84,8 @@ enum BrowserSearchEngine: String, CaseIterable, Identifiable { components = URLComponents(string: "https://www.bing.com/search") case .kagi: components = URLComponents(string: "https://kagi.com/search") + case .startpage: + components = URLComponents(string: "https://www.startpage.com/do/dsearch") } components?.queryItems = [ @@ -1158,6 +1162,12 @@ actor BrowserSearchSuggestionService { URLQueryItem(name: "q", value: query), ] url = c?.url + case .startpage: + var c = URLComponents(string: "https://www.startpage.com/osuggestions") + c?.queryItems = [ + URLQueryItem(name: "q", value: query), + ] + url = c?.url } guard let url else { return [] } @@ -1182,7 +1192,7 @@ actor BrowserSearchSuggestionService { } switch engine { - case .google, .bing, .kagi: + case .google, .bing, .kagi, .startpage: return parseOSJSON(data: data) case .duckduckgo: return parseDuckDuckGo(data: data)