← Back to PRs

#20552: feat: Add SerpApi support for web search

by vmandrilly2 open 2026-02-19 02:44 View on GitHub →
agents size: S
## Summary Describe the problem and fix in 2–5 bullets: - Problem: Google free web search plan SerpApi web search was not availlable to select for web searches - Why it matters: Google is a major search player (no kidding) and one of the few that doesn't necessitate to give credit card information. Adding this option allows a larger part of the community to access a web search. - What changed: didn't remove existing code for other search engines, but added code to support SerpApi, tested successfully. Note: I may have deleted a few // notes by mistake though, if those were important they may need to be kept. Also added the option availability in config. - What did NOT change (scope boundary): kept all the current search engines options but didn't/couldn't test if those were still working after the code changes. ## Change Type (select all) - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Docs - [ ] Security hardening - [ ] Chore/infra ## Scope (select all touched areas) - [ ] Gateway / orchestration - [ ] Skills / tool execution - [ ] Auth / tokens - [ ] Memory / storage - [ ] Integrations - [ ] API / contracts - [ ] UI / DX - [ ] CI/CD / infra Unsure ## Linked Issue/PR - Closes # - Related # Didn't check. I can just say that the most up to date version I was working on didn't have this capability. Possible someone else proposed the same exact support but leader didn't validate yet, I don't know. ## User-visible / Behavior Changes List user-visible changes (including defaults/config). If none, write `None`. For sure, the documentation might also need updating to reflect the new added feature. ## Security Impact (required) - New permissions/capabilities? (`Yes/No`) Yes - Secrets/tokens handling changed? (`Yes/No`) - New/changed network calls? (`Yes/No`) - Command/tool execution surface changed? (`Yes/No`) - Data access scope changed? (`Yes/No`) - If any `Yes`, explain risk + mitigation: Risk: that the other searches could not work anymore because we need someone using the other search providers to also test and validate all good. ## Repro + Verification ### Environment - OS: Windows 10 - Runtime/container: - Model/provider: Kimi K2.5 thinking (which did the coding changes) - Integration/channel (if any): SerpApi - Relevant config (redacted): openclaw.json (can now add one more search provider). Working config example after code update: "tools": { "web": { "search": { "provider": "serpapi", "apiKey": "[your key]" } }, ### Steps 1. Add config option (see above) 2. Go on Google serpapi website, confirm e-mail and phone number, get API key (worked for me, and without Bank card) 3. Ask AI to make a search 4. Enjoy ### Expected - Openclaw AI now able to make google searches ### Actual - Success !!! ## Evidence Attach at least one: - [ ] Failing test/log before + passing after - [ ] Trace/log snippets - [ ] Screenshot/recording - [ ] Perf numbers (if relevant) Quoted from AI answer: "🎉 ÇA MARCHE ! Résultat du test : • ✅ Provider : serpapi • ✅ 2 résultats trouvés en 2.5 secondes • ✅ Résultats : 1. OpenClaw — Personal AI Assistant (openclaw.ai (http://openclaw.ai/)) 2. I Loved My OpenClaw AI Agent—Until It Turned on Me (wired.com (http://wired.com/)) L'intégration SerpApi est fonctionnelle ! 🚀 Le code que tu as modifié fonctionne parfaitement. On peut maintenant faire des recherches web via SerpApi (Google Search) avec 250 recherches gratuites par mois." ## Human Verification (required) What you personally verified (not just CI), and how: - Verified scenarios: asked AI to test, then make a specific search. Worked well - Edge cases checked: - What you did **not** verify: ## Compatibility / Migration - Backward compatible? (`Yes/No`) - Config/env changes? (`Yes/No`) - Migration needed? (`Yes/No`) - If yes, exact upgrade steps: No idea. Only things to add would be add to documentation the newly added capability ## Failure Recovery (if this breaks) - How to disable/revert this change quickly: - Files/config to restore: - Known bad symptoms reviewers should watch for: ## Risks and Mitigations List only real risks for this PR. Add/remove entries as needed. If none, write `None`. - Risk: hypothetical coding error could prevent other search engines to work: needs testing by people using the other search engines. - Mitigation: testing Also, add to documentation the newly added capability upon successful testing. Thanks!

Most Similar PRs