Install
openclaw skills install serpapi-mcpRun SerpAPI searches via SerpAPI's MCP server using mcporter. Use when the user asks to search the web with SerpAPI/SerpAPI MCP, wants SerpAPI inside Clawdbot, or to use the /serp command.
openclaw skills install serpapi-mcpA wrapper skill that calls SerpAPI’s MCP server (Model Context Protocol) via the mcporter CLI.
Treat this skill as providing the /serp command.
Syntax:
/serp <query>/serp <query> [engine] [num] [mode]Defaults:
engine=google_lightnum=5mode=compactNotes:
engine=googlemode=completeExamples:
/serp site:cnmv.es "educación financiera"/serp "AAPL stock" google 3 compact/serp "mortgage pay off vs invest" google 10 completeMain script (prints JSON to stdout):
skills/serpapi-mcp/scripts/serp.sh "<query>" [engine] [num] [mode]It calls this MCP tool endpoint:
https://mcp.serpapi.com/$SERPAPI_API_KEY/mcp.searchOptional Airtable logger:
skills/serpapi-mcp/scripts/airtable_log.mjsmcporter)This skill requires mcporter installed on the host.
Install:
npm install -g mcporterVerify:
mcporter --helpYou can configure either a single key or a failover pool:
SERPAPI_API_KEYSERPAPI_API_KEYSRecommended placement (any of these is supported):
skills.entries.serpapi-mcp.env.SERPAPI_API_KEYskills.entries.serpapi-mcp.env.SERPAPI_API_KEYSenv.vars.SERPAPI_API_KEYenv.vars.SERPAPI_API_KEYSFailover behavior:
Enable logging:
SERP_LOG_AIRTABLE=1 (or true)You can set this globally in the Gateway env (always on) or per-run when executing the script.
Set these environment variables (do not store secrets in the repo/workspace):
AIRTABLE_TOKEN (Airtable Personal Access Token)AIRTABLE_BASE_IDAIRTABLE_TABLE (table name or table id)Field names must match exactly.
Core:
Query → Single line textEngine → Single line textNum → Number (integer)Mode → Single line textCreatedAt → Date/TimeProvenance:
SerpApiSearchId → Single line textSerpApiJsonEndpoint → URLGoogleUrl → URLRaw payload:
ResultJson → Long textResultJsonTruncatedFlag → Checkbox
ResultJsonTruncated if you prefer that name.)Structured summary:
SummaryJson → Long textSummaryJsonTruncated → CheckboxOrganicTop10Json → Long textRelatedQuestionsTop10Json → Long textShortVideosTop10Json → Long textVideosTop10Json → Long textImagesTop10Json → Long textFlags + counts:
HasAiOverview → CheckboxHasAnswerBox → CheckboxHasKnowledgeGraph → CheckboxOrganicCount → Number (integer)RelatedQuestionsCount → Number (integer)ShortVideosCount → Number (integer)VideosCount → Number (integer)ImagesCount → Number (integer)Airtable has per-cell size limits. The logger truncates JSON strings if needed:
AIRTABLE_MAX_JSON_CHARS (default: 90000)AIRTABLE_MAX_SUMMARY_CHARS (default: 90000)Returns SerpAPI JSON. Depending on engine and what Google shows, the payload may include keys like:
organic_resultsshort_videos / videos_resultsimages_resultsrelated_questionsknowledge_graphanswer_box / ai_overviewtop_ads, bottom_ads, etc.)