360 Secure SkillHub
360 安全技能中心

SerpAPI Search

该 Skill 封装 SerpAPI 的 Google 搜索接口,提供 search.sh 命令行脚本,可按 google、google_news、google_local 三种引擎检索网页、新闻或本地商家,并支持国家代码、语言、地点和结果数量参数,可选输出原始 JSON。需要 curl、python3 和 SERPAPI_API_KEY。

ericsantos
ericsantos
热度 95.78
最近更新 2026-05-11 15:51:03
分类:搜索依赖:代码执行 / 第三方 API / 读写文件应用场景:研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add serpapi-search
Metadata
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

# 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

Engine Use case Key results field
google Web search (default) organic_results
google_news News articles news_results
google_local Local businesses/places local_results

Options

Flag Description Default
--engine google, google_news, google_local google
--country 2-letter country code (br, us, de, etc.) us
--lang Language code (pt, en, es, etc.) en
--location Location string (e.g. "São Paulo, Brazil") —
--num Number of results 10
--json Raw JSON output off

API key

Set SERPAPI_API_KEY env var, or store it:

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).