Skip to content

Add Serper.dev search provider#233

Open
manavshrivastavagit wants to merge 1 commit into
andrewyng:mainfrom
manavshrivastavagit:serper-provider
Open

Add Serper.dev search provider#233
manavshrivastavagit wants to merge 1 commit into
andrewyng:mainfrom
manavshrivastavagit:serper-provider

Conversation

@manavshrivastavagit

@manavshrivastavagit manavshrivastavagit commented Jul 27, 2026

Copy link
Copy Markdown

Summary

Adds Serper.dev as a third-party web search provider. Serper is a Google Search API that returns organic results, similar to Tavily and SERPdive.

Usage:

result = web_search("query", provider="serper")

Changes

  • coworker/web/providers.py: New SerperProvider class with a search() method that calls the Serper API (https://google.serper.dev/search), maps organic results to the standard SearchResult format, and passes API key via X-API-KEY header
  • coworker/web/init.py: Export SerperProvider and include it in __all__
  • coworker/config.py: Updated comment listing available providers to include "serper"
  • tests/test_web_search.py: Added test_serper_sends_correct_request_and_maps_organic_results using mock HTTP responses; updated test_build_provider_third_party_requires_key to include Serper

Testing

All 9 relevant tests pass (the only skipped test is test_web_search_rest which requires full server dependencies).

Closes #207

Implement SerperProvider - a web search provider using the Serper.dev
Google Search API. Follows the same patterns as existing third-party
providers (Tavily, SERPdive, Exa).

- New SerperProvider class with search() method
- Registered in _PROVIDERS dict and exported
- Comprehensive test with mock HTTP responses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: add Serper.dev as a search provider

1 participant