feat: add SerpBase (Google) search engine via REST API - #5
Open
gefsikatsinelou wants to merge 1 commit into
Open
feat: add SerpBase (Google) search engine via REST API#5gefsikatsinelou wants to merge 1 commit into
gefsikatsinelou wants to merge 1 commit into
Conversation
- Add SerpbaseSearch researcher class following existing BaseSearchService pattern - Add SERPBASE_API_KEY env var config with validation - Add SerpbaseSearchError exception class - Register 'serpbase' as a new SEARCH_ENGINE option in the orchestrator - No new dependencies — reuses existing requests library - Graceful API error handling matching existing engine patterns
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
Add SerpBase as a Google search engine — returns structured Google search results via REST API with zero scraping maintenance.
Background
The project currently supports Google search via two methods: the
googlesearchlibrary (which scrapes Google and breaks when Google changes their markup) and SerpAPI (which requires a paid subscription). SerpBase offers a simpler, pay-as-you-go API that returns Google results in clean JSON without requiring proxy rotation or CAPTCHA handling.Changes
researchers/serpbase_search.py— REST API-based search engine implementationresearchers/search_engine.py— registered"serpbase"as a new engine option in_perform()and error handlingconfig/environment.py— addedSERPBASE_API_KEYenv var and"serpbase"to theSEARCH_ENGINELiteral typeexceptions.py— addedSerpbaseSearchErrorexception classDesign decisions
SERPBASE_API_KEYenv varSearchResultschema directlyrequestslibraryTesting
SERPBASE_API_KEYis set andSEARCH_ENGINE=serpbase: returns Google search results via the APISERPBASE_API_KEYis missing andSEARCH_ENGINE=serpbase: raises clear error at startup (same pattern as other engines)Usage
Free trial available at https://serpbase.dev — 100 searches, no credit card required.