SerpApiGoogleSearchTool
描述
使用SerpApiGoogleSearchTool 通过 SerpApi 运行 Google 搜索并获取结构化结果。需要一个 SerpApi API 密钥。
安装
环境变量
SERPAPI_API_KEY(必需):SerpApi 的 API 密钥。在 https://serpapi.com/ 创建(有免费套餐)。
示例
代码
注意
- 在环境中设置
SERPAPI_API_KEY。在 https://serpapi.com/ 创建密钥 - 另请参阅通过 SerpApi 进行的 Google 购物:
/en/tools/search-research/serpapi-googleshoppingtool
参数
运行参数
search_query(str, 必需):Google 查询。location(str, 可选):地理位置参数。
注意
- 此工具封装了 SerpApi 并返回结构化的搜索结果。
