serpapi-performance-tuning
Optimize SerpApi performance with caching, async searches, and result filtering. Use when reducing latency, minimizing credit consumption, or optimizing search throughput. slow". '
npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill serpapi-performance-tuning --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# SerpApi Performance Tuning ## Overview SerpApi typical latency: 2-5 seconds per search (real-time scraping). Main optimization: aggressive caching since search results change slowly. Secondary: use Google Light API for faster responses, reduce `num` parameter, and parallelize independent searches. ## Instructions ### Step 1: Multi-Layer Caching ```typescript import { LRUCache } from 'lru-cache'; import { Redis } from 'ioredis'; import { getJson } from 'serpapi'; // L1: In-memory (fastest, per-instance) const l1 = new LRUCache<string, any>({ max: 1000, ttl: 600_000 }); // 10 min // L2: Redis (shared across instances) const redis = new Redis(process.env.REDIS_URL!); async function cachedSearch(params: Record<string, any>): Promise<any> { const key = `serpapi:${JSON.stringify(params)}`; // L1 check const l1Hit = l1.get(key); if (l1Hit) return l1Hit; // L2 check const l2Hit = await redis.get(key); if (l2Hit) { const parsed = JSON.parse(l2Hit); l1.set(key, parsed); return parsed; } // Cache miss: real API call const result = await getJson({ ...params, api_key: process.env.SERPAPI_API_KEY }); l1.set(key, result); await redis.setex(key, 3600, JSON.stringify(result)); // 1 hour in Redis
- Overview
- Instructions
- Step 1: Multi-Layer Caching
- Step 2: Google Light API (Faster)
- Step 3: Reduce Response Size
- Step 4: Parallel Search
- Latency Benchmarks
- Error Handling
- Resources
- Next Steps
What does the serpapi-performance-tuning skill do?
Optimize SerpApi performance with caching, async searches, and result filtering. Use when reducing latency, minimizing credit consumption, or optimizing search throughput. slow". '
How do I install it?
Run `npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill serpapi-performance-tuning --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From jeremylongshore/claude-code-plugins-plus-skills, a repository with 2,630 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.