agentsclimarketplace

Serpapi common errors

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/serpapi-pack/skills/serpapi-common-errors

'Diagnose and fix SerpApi errors: invalid keys, exhausted credits, blocked searches.From its SKILL.md

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill serpapi-common-errors

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

3.3 KB, 758 tokens by cl100k_base, as published. Nobody here has run it

SerpApi Common Errors

Overview

Quick reference for SerpApi errors. Check search_metadata.status first -- it will be Success or Error. Error details are in search_metadata.error or error at the top level.

Error Reference

Invalid API Key

{ "error": "Invalid API key. Your API key should be here: https://serpapi.com/manage-api-key" }

Fix: Verify key at serpapi.com/manage-api-key. Check env var is loaded.

Account Disabled / Searches Exhausted

{ "error": "Your searches for the month have run out. You can upgrade your plan at https://serpapi.com/pricing" }

Fix: Check usage: curl "https://serpapi.com/account.json?api_key=$SERPAPI_API_KEY". Upgrade plan or wait for monthly reset.

Missing Required Parameter

{ "error": "Missing parameter: q. Please provide a search query." }

Fix: Each engine has different query params. Google/Bing use q, YouTube uses search_query.

Google CAPTCHA / Blocked

{ "search_metadata": { "status": "Error" }, "error": "Google hasn't returned any results for this query." }

Fix: SerpApi handles CAPTCHAs automatically, but unusual queries or very high volume may trigger blocks. Try different location or wait.

Empty Organic Results (Not an Error)

result = client.search(engine="google", q="xyzzy123nonexistent")
if not result.get("organic_results"):
    # Not an error -- query just has no results
    # Check for answer_box, knowledge_graph, etc.
    print("No organic results, checking other components...")
    print(f"Answer box: {result.get('answer_box')}")
    print(f"Related searches: {result.get('related_searches')}")

Quick Diagnostic

# 1. Check API key and account status
curl -s "https://serpapi.com/account.json?api_key=$SERPAPI_API_KEY" | jq '{
  plan: .plan_name, used: .this_month_usage, remaining: .plan_searches_left
}'

# 2. Test basic search
curl -s "https://serpapi.com/search.json?q=test&engine=google&api_key=$SERPAPI_API_KEY" \
  | jq '.search_metadata.status'

# 3. Check search archive (last 10 searches)
curl -s "https://serpapi.com/searches.json?api_key=$SERPAPI_API_KEY" \
  | jq '.[0:3] | .[] | {id: .id, status: .status, query: .search_parameters.q}'

Error Handling

ErrorRetryableAction
Invalid API keyNoFix key
Searches exhaustedNoUpgrade plan
CAPTCHA/blockedSometimesChange location, wait
TimeoutYesRetry with backoff
Missing parameterNoFix request params
500 server errorYesRetry 2-3 times

Resources

Next Steps

For comprehensive debugging, see serpapi-debug-bundle.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.