Install any skill in seconds. Free to start, no credit card required.
Get Started Free →SerpApi search engine results API via curl. Use this skill to scrape Google, Bing, YouTube, and other search engines.
.claude/skills/nicepkg-serpapi/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 445% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 390% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 53% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 64% | 0% |
Use SerpApi via direct curl calls to scrape search engine results from Google, Bing, YouTube, and more.
> Official docs: https://serpapi.com/search-api
Use this skill when you need to:
SERPAPI_API_KEYbashexport SERPAPI_API_KEY="your-api-key"
api_key> Important: When using $VAR in a command that pipes to another command, wrap the command containing $VAR in bash -c '...'. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly. > bash > bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"' >
All examples below assume you have SERPAPI_API_KEY set.
Base URL: https://serpapi.com/search
Search Google and get structured JSON results:
bashbash -c 'curl -s "https://serpapi.com/search?engine=google&q=artificial+intelligence&api_key=${SERPAPI_API_KEY}"' | jq '.organic_results[:3] | .[] | {title, link, snippet}
Search from a specific location:
bashbash -c 'curl -s "https://serpapi.com/search?engine=google&q=best+coffee+shops&location=San+Francisco,+California&gl=us&hl=en&api_key=${SERPAPI_API_KEY}"' | jq '.organic_results[:3]'
Parameters:
location: City, state, or addressgl: Country code (us, uk, de, etc.)hl: Language code (en, de, fr, etc.)Search for images:
bashbash -c 'curl -s "https://serpapi.com/search?engine=google_images&q=sunset+beach&api_key=${SERPAPI_API_KEY}"' | jq '.images_results[:3] | .[] | {title, original, thumbnail}
Search news articles:
bashbash -c 'curl -s "https://serpapi.com/search?engine=google_news&q=technology&api_key=${SERPAPI_API_KEY}"' | jq '.news_results[:3] | .[] | {title, link, source, date}
Search products:
bashbash -c 'curl -s "https://serpapi.com/search?engine=google_shopping&q=wireless+headphones&api_key=${SERPAPI_API_KEY}"' | jq '.shopping_results[:3] | .[] | {title, price, source}
Search YouTube videos:
bashbash -c 'curl -s "https://serpapi.com/search?engine=youtube&search_query=python+tutorial&api_key=${SERPAPI_API_KEY}"' | jq '.video_results[:3] | .[] | {title, link, channel, views}
Search local businesses:
bashbash -c 'curl -s "https://serpapi.com/search?engine=google_maps&q=restaurants&ll=@40.7128,-74.0060,15z&api_key=${SERPAPI_API_KEY}"' | jq '.local_results[:3] | .[] | {title, rating, address}
Parameters:
ll: Latitude, longitude, and zoom level (e.g., @40.7128,-74.0060,15z)Get more results using the start parameter:
bash# First page (results 1-10) bash -c 'curl -s "https://serpapi.com/search?engine=google&q=machine+learning&start=0&api_key=${SERPAPI_API_KEY}"' | jq '.organic_results | length' # Second page (results 11-20) bash -c 'curl -s "https://serpapi.com/search?engine=google&q=machine+learning&start=10&api_key=${SERPAPI_API_KEY}"' | jq '.organic_results | length'
Check your API usage and credits:
bashbash -c 'curl -s "https://serpapi.com/account?api_key=${SERPAPI_API_KEY}"' | jq '{plan_name, searches_per_month, this_month_usage}
| Engine | Parameter | Description | |--------|-----------|-------------| | Google Search | engine=google | Web search results | | Google Images | engine=google_images | Image search | | Google News | engine=google_news | News articles | | Google Shopping | engine=google_shopping | Product search | | Google Maps | engine=google_maps | Local businesses | | YouTube | engine=youtube | Video search | | Bing | engine=bing | Bing web search | | DuckDuckGo | engine=duckduckgo | Privacy-focused search |
| Parameter | Description | |-----------|-------------| | q | Search query (required) | | engine | Search engine to use | | location | Geographic location for search | | gl | Country code (e.g., us, uk) | | hl | Language code (e.g., en, de) | | start | Pagination offset (0, 10, 20...) | | num | Number of results (max 100) | | safe | Safe search (active or off) | | device | Device type (desktop, mobile, tablet) |
google_images, google_news etc. instead of tbm parameter for cleaner resultslocation and gl for geo-targeted resultsno_cache=true for fresh data/account endpoint to track API credits| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-20 | pass→fail | 13,620 | 13,564 | -0% | 1 | 1 | 0% | 2,580 | 4,522 | +75% | 0 | 0 | — |
case-21 | pass→pass | 12,417 | 10,842 | -13% | 1 | 1 | 0% | 2,376 | 4,019 | +69% | 0 | 0 | — |
case-01 | fail→pass | 8,055 | 29,352 | +264% | 1 | 1 | 0% | 1,453 | 7,915 | +445% | 0 | 0 | — |
case-02 | fail→pass | 21,896 | 2,274 | -90% | 1 | 1 | 0% | 420 | 2,060 | +390% | 0 | 0 | — |
case-03 | pass→fail | 9,287 | 7,458 | -20% | 1 | 1 | 0% | 1,808 | 2,225 | +23% | 0 | 0 | — |
case-04 | fail→pass | 9,293 | 4,894 | -47% | 1 | 1 | 0% | 1,651 | 2,529 | +53% | 0 | 0 | — |
case-05 | fail→pass | 9,541 | 3,692 | -61% | 1 | 1 | 0% | 1,763 | 2,364 | +34% | 0 | 0 | — |
case-06 | fail→pass | 7,193 | 2,354 | -67% | 1 | 1 | 0% | 1,280 | 2,095 | +64% | 0 | 0 | — |
case-07 | pass→pass | 6,977 | 2,372 | -66% | 1 | 1 | 0% | 1,226 | 2,075 | +69% | 0 | 0 | — |
case-08 | pass→pass | 6,542 | 2,592 | -60% | 1 | 1 | 0% | 1,061 | 2,184 | +106% | 0 | 0 | — |
case-13 | fail→pass | 3,389 | 1,485 | -56% | 1 | 1 | 0% | 536 | 1,918 | +258% | 0 | 0 | — |
case-09 | pass→pass | 8,231 | 2,691 | -67% | 1 | 1 | 0% | 1,598 | 2,235 | +40% | 0 | 0 | — |
case-10 | fail→pass | 15,258 | 3,904 | -74% | 1 | 1 | 0% | 903 | 2,407 | +167% | 0 | 0 | — |
case-11 | fail→pass | 9,055 | 3,904 | -57% | 1 | 1 | 0% | 1,707 | 2,399 | +41% | 0 | 0 | — |
case-12 | fail→pass | 6,056 | 2,472 | -59% | 1 | 1 | 0% | 1,155 | 2,193 | +90% | 0 | 0 | — |
case-19 | pass→pass | 3,472 | 1,025 | -70% | 1 | 1 | 0% | 620 | 1,842 | +197% | 0 | 0 | — |
case-14 | pass→pass | 5,683 | 2,372 | -58% | 1 | 1 | 0% | 924 | 2,106 | +128% | 0 | 0 | — |
case-15 | pass→pass | 7,886 | 2,813 | -64% | 1 | 1 | 0% | 1,389 | 2,219 | +60% | 0 | 0 | — |
case-16 | pass→pass | 9,272 | 2,777 | -70% | 1 | 1 | 0% | 1,646 | 2,133 | +30% | 0 | 0 | — |
case-17 | pass→pass | 7,217 | 2,968 | -59% | 1 | 1 | 0% | 1,344 | 2,211 | +65% | 0 | 0 | — |
case-18 | pass→pass | 4,374 | 2,591 | -41% | 1 | 1 | 0% | 782 | 2,251 | +188% | 0 | 0 | — |
case-22 | pass→pass | 7,709 | 14,551 | +89% | 1 | 1 | 0% | 1,481 | 3,229 | +118% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +32 percentage points is the difference between those two pass rates over the 20 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.