Add serpingapi as a web search provider - #497
Merged
aandrew-me merged 1 commit intoSep 14, 2026
Merged
Conversation
Adds "serpingapi" as an opt-in choice for --search-provider / SEARCH_PROVIDER next to exa and google. It calls POST https://api.serpingapi.com/v1/search with the SERPINGAPI_API_KEY header and maps organic results into the existing SearchResult flow, reusing the is-fast content extraction and formatting used by the google provider. Adds unit tests for the response mapping and documents configuration in SEARCH_SETUP.md.
Code Review ✅ ApprovedAdds OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Owner
|
Great! |
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.
Following up on our email thread.
Adds
serpingapias an optional third choice for--search-provider, next toexaandgoogle. Opt-in only:exastays the default and nothing changes for existing users.What it adds
src/search/search.go:serpingapiSearch/parseSerpingapiResponsealongsidegoogleSearch(POSThttps://api.serpingapi.com/v1/search,X-API-Keyheader,organic[]title/link/snippet mapped into the existingSearchResult), plusPerformSerpingapiSearchWithParams, which goes through the same is-fast content extraction andformatResultsForAIpath as the Google provider. The extraction loop is factored intoextractContentForResultsso both providers share it.site:operator in the query, since the API has no separate parameter.main.go,src/helper/helper.go,src/structs/structs.go,md/usage.md: flag help text and provider validation.SEARCH_SETUP.md: a short configuration section.How to configure
A free plan exists (1,000 searches/month, no card). API reference: https://serpingapi.com/docs
How it was tested
go build ./...andgo vet ./...clean;gofmtclean on the touched Go files.go test ./...: everything passes exceptsrc/helperTestDetectPackageManager(Windows-path subtests), which fails identically on unmodifiedmainwhen run on macOS.src/search/search_test.gocover the response mapping (invalid links skipped, empty and malformed JSON) and the site-filter query.401 invalid_api_keythrough the existing error path. Happy to paste a fulltgpt -frun with a real key if useful.