Google搜索工具

Google搜索工具

基于Playwright的Node.js工具,绕过搜索引擎反爬机制执行Google搜索,提供本地SERP API替代方案。

快速入门

安装

  1. 克隆仓库:git clone https://github.com/web-agent-master/google-search.git
  2. 进入目录:cd google-search
  3. 安装依赖:npm installyarnpnpm install
  4. 编译代码:npm run build

使用

  • 命令行搜索:google-search "关键词"
  • 获取HTML:google-search "关键词" --get-html --save-html
  • 调试模式:pnpm debug "关键词"

配置MCP服务器

  1. 构建项目:pnpm build
  2. 修改Claude配置文件,添加MCP服务器配置。

更多命令和选项参考README文档。