AgentSkillsCN

serpapi

通过SerpAPI(Google搜索、Google新闻、Google本地)搜索Google。当需要搜索网络、查找新闻文章或查询本地商家时使用。支持按国家/语言定位,获取特定区域的结果。

SKILL.md
--- frontmatter
name: serpapi
description: Search Google via SerpAPI (Google Search, Google News, Google Local). Use when you need to search the web, find news articles, or look up local businesses. Supports country/language targeting for region-specific results.
metadata: {"clawdbot":{"emoji":"🔍","requires":{"bins":["curl","python3"],"env":["SERPAPI_API_KEY"]},"primaryEnv":"SERPAPI_API_KEY"}}

SerpAPI Search

Search Google via SerpAPI with country/language targeting.

Quick start

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"

Engines

EngineUse caseKey results field
googleWeb search (default)organic_results
google_newsNews articlesnews_results
google_localLocal businesses/placeslocal_results

Options

FlagDescriptionDefault
--enginegoogle, google_news, google_localgoogle
--country2-letter country code (br, us, de, etc.)us
--langLanguage code (pt, en, es, etc.)en
--locationLocation string (e.g. "São Paulo, Brazil")
--numNumber of results10
--jsonRaw JSON outputoff

API key

Set SERPAPI_API_KEY env var, or store it:

bash
mkdir -p ~/.config/serpapi
echo "your_key_here" > ~/.config/serpapi/api_key
chmod 600 ~/.config/serpapi/api_key

Common country codes

br (Brazil), us (USA), pt (Portugal), de (Germany), fr (France), es (Spain), gb (UK), jp (Japan), in (India).