serpapi-sdk-patterns
Production-ready SerpApi client patterns with caching, typing, and multi-engine support. Use when building search services, implementing result caching, or wrapping SerpApi with typed responses. '
npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill serpapi-sdk-patterns --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 SDK Patterns ## Overview Production patterns for SerpApi: typed result interfaces, response caching (critical since each search costs credits), multi-engine abstraction, and async search with the Searches Archive API. ## Instructions ### Step 1: Typed Result Interfaces ```typescript interface SerpApiOrganicResult { position: number; title: string; link: string; snippet: string; displayed_link: string; source?: string; } interface SerpApiSearchResult { search_metadata: { id: string; status: string; created_at: string }; search_parameters: Record<string, string>; organic_results: SerpApiOrganicResult[]; answer_box?: { answer?: string; snippet?: string; title?: string }; knowledge_graph?: { title: string; description?: string; type?: string }; related_questions?: Array<{ question: string; snippet: string }>; pagination?: { next: string }; } ``` ### Step 2: Cached Search Client ```typescript import { getJson } from 'serpapi'; import { LRUCache } from 'lru-cache'; const cache = new LRUCache<string, SerpApiSearchResult>({ max: 500, ttl: 3600_000, // 1 hour -- search results are relatively stable }); async function cachedSearch(params: Record<string, any>): Promise<SerpApiSearch
- Overview
- Instructions
- Step 1: Typed Result Interfaces
- Step 2: Cached Search Client
- Step 3: Multi-Engine Search Abstraction
- Step 4: Async Search (Background Processing)
- Error Handling
- Resources
- Next Steps
What does the serpapi-sdk-patterns skill do?
Production-ready SerpApi client patterns with caching, typing, and multi-engine support. Use when building search services, implementing result caching, or wrapping SerpApi with typed responses. '
How do I install it?
Run `npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill serpapi-sdk-patterns --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.