/serpapi-pack:serpapi-deploy-integrationfrom serpapi-pack
Deploys SerpApi-powered search as a backend API endpoint on Vercel, Cloud Run, or Fly.io. Use when setting up serverless search proxies with health checks and credit monitoring.
Ships in serpapi-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Deploy SerpApi-powered search as a backend API endpoint. Always proxy through your server -- never expose the API key to browsers.
// api/search.ts
import { getJson } from 'serpapi';
export default async function handler(req: Request) {
const url = new URL(req.url);
const q = url.searchParams.get('q');
if (!q) return new Response('Missing q parameter', { status: 400 });
const engine = url.searchParams.get('engine') || 'google';
const num = parseInt(url.searchParams.get('num') || '5');
const result = await getJson({
engine, q, num,
api_key: process.env.SERPAPI_API_KEY,
});
return Response.json({
results: result.organic_results?.slice(0, num) || [],
answer_box: result.answer_box || null,
total_results: result.search_information?.total_results,
});
}
vercel env add SERPAPI_API_KEY production
vercel --prod
# main.py
from flask import Flask, request, jsonify
import serpapi, os
app = Flask(__name__)
client = serpapi.Client(api_key=os.environ["SERPAPI_API_KEY"])
@app.route("/search")
def search():
q = request.args.get("q")
if not q:
return jsonify({"error": "Missing q parameter"}), 400
result = client.search(engine="google", q=q, num=5)
return jsonify({
"results": result.get("organic_results", [])[:5],
"answer_box": result.get("answer_box"),
})
gcloud run deploy search-api \
--source . --region us-central1 \
--set-secrets=SERPAPI_API_KEY=serpapi-key:latest \
--allow-unauthenticated
app.get('/health', async (req, res) => {
const account = await fetch(
`https://serpapi.com/account.json?api_key=${process.env.SERPAPI_API_KEY}`
).then(r => r.json());
res.json({
status: account.plan_searches_left > 0 ? 'healthy' : 'credits_exhausted',
remaining: account.plan_searches_left,
});
});
| Issue | Cause | Solution |
|---|---|---|
| Cold start slow | First request initializes | Pre-warm with min instances |
| Credits run out | No budget monitoring | Add health check with credit count |
| Key exposed | Frontend calling SerpApi directly | Always proxy through backend |
For webhook-like patterns, see serpapi-webhooks-events.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
18 skills in this plugin
/serpapi-ci-integrationSet up CI/CD for SerpApi integrations with fixture-based testing.
Use when automating SerpApi tests without consuming credits,
or validating search result parsing in CI.
Trigger: "serpapi CI", "serpapi GitHub Actions", "serpapi automated tests".
/serpapi-common-errorsDiagnose and fix SerpApi errors: invalid keys, exhausted credits, blocked searches.
Use when SerpApi returns errors, empty results, or unexpected status codes.
Trigger: "serpapi error", "fix serpapi", "serpapi not working", "serpapi empty results".
/serpapi-core-workflow-aGoogle Search scraping with SerpApi -- organic results, knowledge graph, answer boxes.
Use when building search-powered features, SEO monitoring,
or extracting structured data from Google results.
Trigger: "serpapi google search", "scrape google", "serpapi organic results".
/serpapi-core-workflow-bSearch Bing, YouTube, Google Shopping, Google News, and Google Maps with SerpApi.
Use when scraping non-Google engines, building multi-engine search,
or extracting video/news/shopping/maps data.
Trigger: "serpapi youtube", "serpapi bing", "serpapi news", "serpapi shopping".
/serpapi-cost-tuningOptimize SerpApi costs by reducing credit consumption and choosing the right plan.
Use when analyzing search usage, reducing monthly costs,
or implementing credit-saving strategies.
Trigger: "serpapi cost", "serpapi pricing", "reduce serpapi costs", "serpapi credits".
/serpapi-debug-bundleCollect SerpApi debug diagnostics: account status, recent searches, and error logs.
Use when troubleshooting SerpApi issues, checking credit usage,
or preparing support tickets.
Trigger: "serpapi debug", "serpapi diagnostic", "serpapi support".
npx claudepluginhub flight505/skill-forge --plugin serpapi-packOther plugins' skills for the same job