/serpapi-pack:serpapi-security-basicsfrom serpapi-pack
Secures SerpApi API keys by enforcing backend-only proxying, environment variable storage, rate limiting, and usage 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.
SerpApi uses a single API key for authentication. The key grants full account access -- there are no scoped keys or OAuth. Protect it like a credit card: never expose in frontend code, always proxy through your backend.
// BAD: API key in browser-side code
const result = await fetch(`https://serpapi.com/search.json?q=${query}&api_key=YOUR_KEY`);
// GOOD: Proxy through your backend
// Frontend
const result = await fetch(`/api/search?q=${encodeURIComponent(query)}`);
// Backend (api/search.ts)
export async function GET(req: Request) {
const url = new URL(req.url);
const q = url.searchParams.get('q');
const result = await getJson({
engine: 'google', q,
api_key: process.env.SERPAPI_API_KEY, // Server-side only
});
return Response.json(result.organic_results);
}
# .gitignore
.env
.env.local
# Use platform secret managers in production
gh secret set SERPAPI_API_KEY # GitHub Actions
vercel env add SERPAPI_API_KEY # Vercel
fly secrets set SERPAPI_API_KEY=x # Fly.io
// Prevent abuse of your search proxy endpoint
import rateLimit from 'express-rate-limit';
const searchLimiter = rateLimit({
windowMs: 60_000, // 1 minute
max: 10, // 10 searches per minute per IP
message: 'Too many searches, try again later',
});
app.get('/api/search', searchLimiter, searchHandler);
# Set up daily usage check
curl -s "https://serpapi.com/account.json?api_key=$SERPAPI_API_KEY" \
| jq '{used: .this_month_usage, remaining: .plan_searches_left}'
# Alert if usage is unexpectedly high
.env in .gitignoreFor production deployment, see serpapi-prod-checklist.
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