Agent Skill · SerpApi

serpapi-web-search

Search the web using SerpApi's 100+ search engines. Use this skill whenever the user needs current or web-sourced information: researching a topic, checking recent news, comparing products or prices, finding local businesses, searching images or videos, or looking up academic papers, flights, hotels, or stocks — even if they don't explicitly ask to "search the web." Default to google_light for speed. Supports Google, Bing, DuckDuckGo, YouTube, Amazon, Maps, Scholar, and more.

Provider: SerpApi Path in repo: .opencode/skills/serpapi-web-search/SKILL.md

Skill body

Invocation

Use the first available method:

1. MCP tool — use serpapi_search if available (source):

serpapi_search(params={"engine": "google_light", "q": "query"}, mode="compact")

2. serpapi-cli — preferred shell fallback; optimized for AI agents (source):

serpapi search engine=google_light q="your query"

# --fields: server-side filtering — reduces response size at the API level
serpapi search --fields "organic_results[0:3]" engine=google_light q="your query"

# --jq: client-side filtering (like gh --jq)
serpapi search --jq ".organic_results[0:3]|[.[]|{title,link}]" engine=google_light q="your query"

Install: brew tap serpapi/homebrew-tap && brew install serpapi-cli
Auth: SERPAPI_KEY env var, --api-key flag, or serpapi login.
Exit codes: 0 success · 1 API error · 2 usage error. Errors are JSON on stderr.

3. SDK — when writing code: see rules/sdks.md — Python, JS, Go, Ruby, PHP, Java, .NET.

4. curl — universal fallback:

curl -G "https://serpapi.com/search.json" \
  --data-urlencode "q=your query" \
  --data-urlencode "engine=google_light" \
  --data-urlencode "api_key=${SERPAPI_KEY}"

Engine Selection

Pick the engine that matches the user’s intent:

Use Case Engine
General web (default) google_light
Comprehensive (knowledge graph, local pack) google
News google_news_light
Images google_images_light
Shopping / prices google_shopping_light
Alternative web bing
Privacy-first duckduckgo
Academic / research google_scholar
Local / maps google_maps
Video youtube
SerpApi’s own index (alpha, no Google/Bing) search_index

Prefer _light variants — they’re faster and cheaper. Use the full engine only when you need knowledge graph, local pack, or featured snippets.

For engines not listed above (flights, hotels, jobs, finance, patents, etc.), read rules/ENGINES.md.

Error Reference

Docs

Official reference (link these when agents need deeper detail):

Topic URL
Main API reference serpapi.com/search-api
All engines (online) serpapi.com/search-engine-apis
Locations lookup serpapi.com/locations-api
Account & quota API serpapi.com/account-api
Search Index API (alpha) serpapi.com/search-index-api
Pricing serpapi.com/pricing

Rules

Read these files when you need more detail:

Skill frontmatter

compatibility: Requires one of: a native serpapi_search tool; or the serpapi CLI (brew tap serpapi/homebrew-tap && brew install serpapi-cli); or an SDK; or outbound network access with curl. All paths require a SERPAPI_KEY. license: MIT

Work with this as data

Every skill here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for agent skills

4 MCP tools reach this
  • find_skillsBrowse and filter every skill in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This skill
curl "https://apis.io/api/v1/skills/serpapi-web-search"
All agent skills
curl "https://apis.io/api/v1/skills?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.