Skip to content

Update Kagi, You.com, and Tavily search providers to current APIs#1978

Merged
tpae merged 1 commit into
mainfrom
bugfix/search-providers-update
Jul 11, 2026
Merged

Update Kagi, You.com, and Tavily search providers to current APIs#1978
tpae merged 1 commit into
mainfrom
bugfix/search-providers-update

Conversation

@tpae

@tpae tpae commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

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:

  • Kagi (root cause of the reported 401): migrated from the legacy v0 API (GET /api/v0/search, Authorization: Bot) to v1 — POST https://kagi.com/api/v1/search with Authorization: Bearer, JSON body (query, workflow of search/news, limit, page), and response mapping switched from flat data[] + t == 0 filter to the v1 buckets data.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).
  • You.com: migrated the two legacy endpoints (api.ydc-index.io/search with hits[], /news with news.results[]) to the unified GET https://ydc-index.io/v1/search; params renamed to count/freshness; responses map results.web / results.news with the description|snippets fallback and page_age.
  • Tavily: API key moved from the legacy api_key body field to the Authorization: Bearer header 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

  • Targeted suites pass (67 tests): DeclarativeSearchBackendTests, SearchProviderConfigurationTests, SearchEngineCascadeTests, WebSearchToolTests — including new cases for Kagi v1 request building (Bearer/POST/workflow), bucketed response parsing, and the You.com unified endpoint
  • swift build --package-path Packages/OsaurusCore succeeds
  • scripts/i18n/check.sh passes
  • Live smoke test with invalid keys: Kagi v1 accepts the request shape (general.invalid_token error, no schema rejection), You.com returns 403, Tavily returns 401
  • End-to-end retest with a real (paid) Kagi v1 key — needs the reporter or a teammate with API credit

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.
@github-actions github-actions Bot added the bug Something isn't working label Jul 11, 2026
@tpae tpae merged commit 42de128 into main Jul 11, 2026
6 checks passed
@tpae tpae deleted the bugfix/search-providers-update branch July 11, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant