serpapi-security-basics

Featured

Secure SerpApi API keys and prevent credit abuse. Use when storing API keys, implementing backend proxies, or auditing SerpApi access patterns. Trigger: "serpapi security", "serpapi API key security", "secure serpapi".

AI & Automation 2,274 stars 319 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# SerpApi Security Basics ## Overview 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. ## Instructions ### Step 1: Never Expose API Key in Frontend ```typescript // 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); } ``` ### Step 2: Secure Storage ```bash # .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 ``` ### Step 3: Rate Limit Your Proxy ```typescript // 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('/...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

serpapi-rate-limits

Handle SerpApi rate limits and credit-based usage quotas. Use when managing API credit consumption, implementing request throttling, or optimizing search volume for your plan tier. Trigger: "serpapi rate limit", "serpapi credits", "serpapi quota", "serpapi throttle".

2,274 Updated today
jeremylongshore
AI & Automation Featured

serpapi-install-auth

Install SerpApi client and configure API key authentication. Use when setting up SerpApi for search result scraping, configuring API keys, or initializing the serpapi Python/Node package. Trigger: "install serpapi", "setup serpapi", "serpapi auth", "serpapi API key".

2,274 Updated today
jeremylongshore
AI & Automation Featured

serpapi-prod-checklist

Production readiness checklist for SerpApi integrations. Use when deploying search features, validating credit budgets, or preparing SerpApi-powered apps for launch. Trigger: "serpapi production", "deploy serpapi", "serpapi go-live".

2,274 Updated today
jeremylongshore
AI & Automation Featured

serpapi-common-errors

Diagnose 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".

2,274 Updated today
jeremylongshore
AI & Automation Featured

serpapi-reference-architecture

Production architecture for SerpApi search services with caching, monitoring, and multi-engine support. Use when designing search features, building SERP tracking systems, or architecting search-powered applications. Trigger: "serpapi architecture", "serpapi project structure", "serpapi design".

2,274 Updated today
jeremylongshore