feat: add SerpBase web search integration - #3758
Draft
gefsikatsinelou wants to merge 1 commit into
Draft
Conversation
- Add integrations/serpbase with SerpBaseWebSearch component (sync run + async run_async, domain filtering, search_params passthrough) - Add unit tests with mocked HTTP layer and integration tests (skipped unless SERPBASE_API_KEY is set) - Add CI workflow, labeler rule, coverage workflow registration and root README inventory row (via create_new_integration.py scaffold)
gefsikatsinelou
requested review from
bogdankostic
and removed request for
a team
August 11, 2026 06:42
|
|
Contributor
|
Hi @gefsikatsinelou, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
HaystackBot
marked this pull request as draft
August 11, 2026 07:46
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
Adds a new SerpBase web search integration (
serpbase-haystack).SerpBaseWebSearchis a Haystack component that runs a Google web search through the SerpBase REST API and returnsDocumentobjects + links, matching the interface of the existingSerperDevWebSearch/TavilyWebSearch/SearchApiWebSearchcomponents.Background
Haystack already ships web search integrations for Serper, Tavily, SearchAPI, Brave and DDGS. SerpBase is a Google SERP API (Google Search, Images, News, Videos and Maps) aimed at a lower price point ($0.30/1k queries, no subscription). Adding it gives Haystack users another Google-results backend choice with the same component contract — drop-in replaceable via
component.set()or YAML.The integration follows the repo's established layout exactly: it was scaffolded with
scripts/create_new_integration.pyand mirrors theserperdevintegration structure (component, tests, workflow, labeler, coverage workflow, root README inventory row).Changes
integrations/serpbase/— full integration packagesrc/haystack_integrations/components/websearch/serpbase/websearch.py—SerpBaseWebSearchcomponent (syncrun+ asyncrun_async,to_dict/from_dict, domain filtering withallowed_domains/exclude_subdomains, optionalsearch_paramspassthrough)src/haystack_integrations/components/websearch/serpbase/__init__.py— exportsSerpBaseWebSearchandSerpBaseErrortests/test_websearch.py— unit tests (mocked HTTP) + integration tests (skipped unlessSERPBASE_API_KEYis set)pyproject.toml,README.md,LICENSE.txt,pydoc/config_docusaurus.yml,py.typed.github/workflows/serpbase.yml— CI workflow mirroring the serperdev workflow.github/labeler.yml—integration:serpbaselabel rule.github/workflows/CI_coverage_comment.yml— registerTest / serpbaseREADME.md— serpbase row in the integration inventory tableDesign decisions
SERPBASE_API_KEYenv var /SecretSERPERDEV_API_KEY,TAVILY_API_KEY, ...)X-API-Keyheaderhttps://api.serpbase.dev/google/search)organic,featured_snippet,people_also_askDocument.metakeepsrank/position/title/linkrun/run_asyncsignature + output typesallowed_domains,exclude_subdomains)SerperDevWebSearchhttpx, already used by the other web search integrationsTesting
TimeoutError, HTTP/request errors →SerpBaseError, domain filtering.SERPBASE_API_KEYis set (skipped otherwise, same as serperdev).ruffandmypypass on the integration (same config as the rest of the repo).Notes for maintainers
SERPBASE_API_KEYsecret to the repo — the workflow already references it (tests skip gracefully when it's absent).integrations/serpbase-v*convention at release time.