serpapi-sdk-patterns
Skill by jeremylongshore
Wraps the official SerpAPI Python or JavaScript client in an application-owned search gateway. It is for developers who need a stable, typed, testable search adapter in production code.
Install serpapi-sdk-patterns
Built from the published package, never by AI.
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/serpapi-sdk-patterns ~/.claude/skills/serpapi-sdk-patternsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/serpapi-sdk-patterns ~/.gemini/antigravity-cli/skills/serpapi-sdk-patternsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install serpapi-sdk-patterns in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides the design of a narrow gateway around the official SerpAPI Python or JavaScript client. The gateway keeps vendor parameters, credentials, and variable result schemas out of business code. It defines a request type that accepts only supported engines and application-controlled options, and a normalized response type with explicit optional sections.
The skill covers the surrounding production concerns. The SERPAPI_KEY is injected at the server-side composition root and kept out of domain types, logs, and errors. Timeouts, bounded retries, 429 handling, and search-ID logging are centralized. Pagination uses Python's yield_pages() with a budget, or manual pagination in JavaScript. It also covers output selection among JSON, Markdown, and HTML, and json_restrictor. It is intended for developers building Claude Code workflows that need a stable search adapter.
Written from the project's SKILL.md and checked against it.
What it can do
- Request type designDefines a request type that admits only supported engines and application-controlled options.
- Response normalizationDefines a normalized response type with explicit optional sections and vendor metadata kept separate.
- Injectable client interfacePlaces the official client behind a small interface so fixtures can replace it without network interception.
- Retry and timeout policyCentralizes timeouts, bounded retry for transient failures, and 429 classification.
- Pagination budgetsUses yield_pages() in Python with a page or search budget, and manual pagination in JavaScript.
- Output selectionChooses JSON, Markdown, or HTML output and applies json_restrictor when supported fields are known.
- Contract testsAdds tests for empty success, optional sections, error states, pagination termination, timeouts, and redaction.
What you need
- SerpAPI key
- Official SerpAPI Python or JavaScript client
- Sanitized fixtures for each supported response shape
- Claude Code
Try asking
- Design a SerpAPI client wrapper for Google organic results in Python
- Create a typed SerpAPI gateway with fixture-based contract tests
- Add a pagination budget and retry policy to my SerpAPI adapter
Good to know
- The JavaScript client does not provide built-in pagination.
- Live client verification requires a separately approved key and allowance.
- Python yield_pages() should only be used with a page or search budget.
Security check
B- Allowed to use Write, Edit without limitsIn
SKILL.md
Checked automatically: skills/.curated/serpapi-sdk-patterns/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: ReadGlobGrepWebFetchWriteEdit
-
SKILL.md4 KB
Alternatives to serpapi-sdk-patterns
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
serpapi-sdk-patterns: common questions
What does serpapi-sdk-patterns do?
It guides the design of a typed, testable gateway around the official SerpAPI Python or JavaScript client. The gateway adds safe errors, pagination, and output selection.
Where should the SerpAPI key be stored?
The source says SERPAPI_KEY should be injected at the outer server-side composition root. It should not appear in domain types, cache keys, error objects, telemetry, or serialized request parameters.
Does the JavaScript client support pagination?
No. The source says the JavaScript client does not provide built-in pagination, so engine-specific manual pagination is needed using documented tokens or offsets.
How do I install serpapi-sdk-patterns?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is serpapi-sdk-patterns free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is serpapi-sdk-patterns safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.
What are alternatives to serpapi-sdk-patterns?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
