[Feature] Add Serply (Google web / news / scholar) as a web search provider
Summary
I would like to add Serply as a websearch_provider option, alongside Tavily, BoCha, Baidu AI Search, Brave, Firecrawl and Exa.
Disclosure: I work with Serply.
Why
- None of the current providers return Google results. Tavily, Exa and Brave use their own indexes, BoCha and Baidu are China-focused, Firecrawl is a crawler first. Users who want Google-quality ranking for the agent's searches currently have no option.
- Serply also exposes Google News and Google Scholar endpoints behind the same API key, so one tool can cover "latest news about X" and "papers about Y" with results from those Google surfaces (useful for research-style questions in group chats).
- The API is a plain
GET https://api.serply.io/v1/search/?q=...&num=...with anX-Api-Keyheader, so it fits the existingaiohttp+_KeyRotatorpattern with no new dependencies.
Proposed change (mirrors the Exa PR #8973)
astrbot/core/tools/web_search_tools.py:SerplyWebSearchTool(web_search_serply) withquery,num_results,search_type(web|news|scholar),gl,hl;_serply_search()shaped like_brave_search()including key failover on 401/403/429.astr_main_agent.py: dispatch arm + citation tool name.config/default.py:websearch_serply_key: [],"serply"option, secret list schema entry.- i18n (en-US, zh-CN, ru-RU) and
docs/{en,zh}/use/websearch.md. - Unit tests for the mapping, request shape, failover and legacy key migration.
Roughly 9 files, about +450 lines including tests and docs. I have the change working locally and live-tested against the Serply API; happy to open the PR if this is welcome, or to adjust the shape (for example, dropping the search_type verticals to keep it web-only) if you prefer.
中文摘要:希望新增 Serply 作为网页搜索提供商。Serply 返回实时的 Google 搜索结果,并提供 Google 新闻和 Google 学术两个垂直搜索,现有提供商均不返回 Google 结果。实现方式与 Exa (#8973) 完全一致,无新依赖,默认不启用。本地已实现并通过真实 API 测试,如果维护者认可,我将提交 PR。声明:我为 Serply 工作。
Checklist
- [x] I have searched the Issue list for related features and confirmed this feature idea has never been proposed.
- [x] The feature I am suggesting is related to AstrBot itself, not to a specific plugin.
- [x] I have read and agree to the project's Code of Conduct.
- [x] (Optional) I am willing to submit a PR to help implement this feature.
Implementation PR opened: #9838 (live-tested, unit suite green). Happy to adjust the shape based on feedback here or there.
您好,感谢您对 AstrBot 项目的关注。
经过审查,该 Issue 不符合我们的提交规范,将被关闭。
该 Issue 的内容属于第三方服务/项目推广,而非针对 AstrBot 本身的功能需求或缺陷报告。AstrBot 的 Issue Tracker 仅用于跟踪项目自身的 Bug 和功能改进,不接受第三方 API 服务、中转站或独立项目的推广请求。
如果您认为该服务/协议确实有集成价值,建议先在社区讨论区(Discussions)发起讨论,收集社区反馈后再由维护者评估是否纳入路线图。
Hello, thank you for your interest in the AstrBot project.
After review, this Issue does not comply with our submission guidelines and will be closed.
The content of this Issue is a promotion for a third-party service/project, not a feature request or bug report for AstrBot itself. The AstrBot Issue Tracker is reserved for tracking the project's own bugs and improvements — promotional requests for third-party API services, gateways, or independent projects are not accepted here.
If you believe this service/protocol has genuine integration value, we recommend starting a discussion in the community Discussions section first to gather community feedback before maintainers evaluate whether to include it in the roadmap.