ClawSkills logoClawSkills

SerpAPI Search

通过 SerpAPI 搜索 Google(Google 搜索、Google 新闻、Google 本地)。当需要搜索网络、查找新闻文章或查找本地商家时使用。支持...

介绍

# SerpAPI Search

通过 SerpAPI 进行 Google 搜索,支持国家/语言定位。

## 快速开始

```bash # Google Search {baseDir}/scripts/search.sh "artificial intelligence B2B" --country br --lang pt

# Google News {baseDir}/scripts/search.sh "inteligência artificial" --engine google_news --country br --lang pt

# Google Local {baseDir}/scripts/search.sh "AI companies" --engine google_local --country us --location "San Francisco, California" ```

## 搜索引擎

| 引擎 | 用例 | 主要结果字段 | |--------|----------|-------------------| | `google` | 网络搜索(默认) | `organic_results` | | `google_news` | 新闻文章 | `news_results` | | `google_local` | 本地商家/地点 | `local_results` |

## 选项

| 标志 | 描述 | 默认值 | |------|-------------|---------| | `--engine` | `google`, `google_news`, `google_local` | `google` | | `--country` | 2字母国家代码 (`br`, `us`, `de` 等) | `us` | | `--lang` | 语言代码 (`pt`, `en`, `es` 等) | `en` | | `--location` | 地点字符串 (例如 `"São Paulo, Brazil"`) | — | | `--num` | 结果数量 | `10` | | `--json` | 原始 JSON 输出 | 关 |

## API 密钥

设置 `SERPAPI_API_KEY` 环境变量,或将其存储为: ```bash mkdir -p ~/.config/serpapi echo "your_key_here" > ~/.config/serpapi/api_key chmod 600 ~/.config/serpapi/api_key ```

## 常见国家代码

`br` (巴西), `us` (美国), `pt` (葡萄牙), `de` (德国), `fr` (法国), `es` (西班牙), `gb` (英国), `jp` (日本), `in` (印度)。

更多产品