Update Kagi, You.com, and Tavily search providers to current APIs#1978
Merged
Conversation
Kagi moves from the retired v0 API (Bot auth, flat data[] with t-type filter) to v1 (POST, Bearer auth, bucketed data.search/data.news) — keys from the new API portal fail v0 with 401. You.com moves to the unified /v1/search endpoint, and Tavily's key moves from the request body to the Authorization header per current docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documentation review of all 8 bundled search providers (prompted by a user report of a 401 when pasting a Kagi API key into Osaurus 0.22.0). Exa, Parallel, Brave Search API, Serper, and Google CSE are current; three providers needed updates:
GET /api/v0/search,Authorization: Bot) to v1 —POST https://kagi.com/api/v1/searchwithAuthorization: Bearer, JSON body (query,workflowofsearch/news,limit,page), and response mapping switched from flatdata[]+t == 0filter to the v1 bucketsdata.search/data.news. Keys generated in Kagi's new API portal are v1 keys and fail v0 with 401. Setup instructions, signup URL, and pricing note now point at the new portal (kagi.com/api, pay-per-use).api.ydc-index.io/searchwithhits[],/newswithnews.results[]) to the unifiedGET https://ydc-index.io/v1/search; params renamed tocount/freshness; responses mapresults.web/results.newswith thedescription|snippetsfallback andpage_age.api_keybody field to theAuthorization: Bearerheader per current docs.Also adds the four new Kagi UI strings to
Localizable.xcstrings(zh-Hans/zh-Hant translated, de/ko/ru marked needs-review).Test plan
DeclarativeSearchBackendTests,SearchProviderConfigurationTests,SearchEngineCascadeTests,WebSearchToolTests— including new cases for Kagi v1 request building (Bearer/POST/workflow), bucketed response parsing, and the You.com unified endpointswift build --package-path Packages/OsaurusCoresucceedsscripts/i18n/check.shpassesgeneral.invalid_tokenerror, no schema rejection), You.com returns 403, Tavily returns 401