[Feature] Optional Serply search provider as a keyed Google option before Custom Search shuts down
Disclosure first: I work with Serply. Per CONTRIBUTING I'm asking for a scoped issue before writing anything.
Problem or motivation
Two of the keyed providers in backend_api_python/app/services/search.py sit on APIs that are going away:
GoogleSearchProvideruses the Custom Search JSON API (SEARCH_GOOGLE_API_KEY+SEARCH_GOOGLE_CX). Google has closed it to new customers, and existing customers lose access on January 1, 2027.BingSearchProvideruses the Bing Web Search API, which Microsoft retired in August 2025, soSEARCH_BING_API_KEYcan no longer be obtained.
After that, the only way to get Google results through the research agent is SerpAPI.
Proposed solution
Add an optional SerplySearchProvider beside SerpAPISearchProvider, following the same BaseSearchProvider pattern:
GET https://api.serply.io/v1/search?q=...&num=...with the key in anX-Api-Keyheader (never in the URL), results fromresults[].{title, link, description}daysmapped to Google'stbs=qdr:d|w|m|yexactly as the SerpAPI provider already does (I checked thattbspasses through)numcapped at 10 (Serply's page size) and the result list trimmed tomax_resultsSERPLY_API_KEYSread likeSERPAPI_KEYS, so key rotation works unchanged- one entry in the settings schema in
routes/settings.py, the twoenv.examplefiles,provider_status(), and the fallback order (afterserpapi) - unit tests with a mocked HTTP response
No new runtime dependency; it uses requests like the REST fallbacks. Nothing changes unless the key is set, and Tavily stays the default.
Alternatives considered
Leave Google results to SerpAPI only. That works, but it leaves one keyed Google option once CSE stops. I have not touched the Bing provider; whether to remove it is your call, and I'd keep that out of this change.
Acceptance criteria
- [ ] With
SERPLY_API_KEYSset,SEARCH_PROVIDER=serplymakes Serply the first provider and research-agent searches return its results - [ ] With the key unset, provider order and behavior are unchanged
- [ ] An invalid key fails over to the next provider, as the other keyed providers do
- [ ]
provider_status()reports Serply as configured/registered/available
If this fits the roadmap, could you assign it to me? If you'd rather not add another keyed provider, that's fine too.