Claude-code-plugins serpapi-upgrade-migration
install
source · Clone the upstream repo
git clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/jeremylongshore/claude-code-plugins-plus-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/saas-packs/serpapi-pack/skills/serpapi-upgrade-migration" ~/.claude/skills/jeremylongshore-claude-code-plugins-serpapi-upgrade-migration && rm -rf "$T"
manifest:
plugins/saas-packs/serpapi-pack/skills/serpapi-upgrade-migration/SKILL.mdsource content
SerpApi Upgrade & Migration
Overview
The main migration path:
google-search-results (legacy) to serpapi (current official package). The API itself is stable -- changes are in client library interfaces, not the REST API.
Instructions
Python: google-search-results to serpapi
# BEFORE: Legacy package from serpapi import GoogleSearch search = GoogleSearch({"q": "test", "api_key": key}) result = search.get_dict() # AFTER: New official package import serpapi client = serpapi.Client(api_key=key) result = client.search(engine="google", q="test") # Result is already a dict -- no get_dict() needed
# Migration steps pip uninstall google-search-results pip install serpapi # Update imports across codebase # OLD: from serpapi import GoogleSearch # NEW: import serpapi
Node.js: google-search-results-nodejs to serpapi
// BEFORE: Legacy import { GoogleSearch } from 'google-search-results-nodejs'; const search = new GoogleSearch('api_key'); search.json({ q: 'test', engine: 'google' }, (result) => { ... }); // AFTER: Current (Promise-based) import { getJson } from 'serpapi'; const result = await getJson({ engine: 'google', q: 'test', api_key: key }); // No callbacks -- uses Promises natively
Key Changes
| Aspect | Legacy | Current |
|---|---|---|
| Python import | | |
| Python init | | |
| Python search | | |
| Node import | | |
| Node pattern | Callback-based | Promise/async-await |
| Engine param | Via class name (GoogleSearch, BingSearch) | Via parameter |
Migration Checklist
- Replace package:
/pip install serpapinpm install serpapi - Update all imports
- Replace class-per-engine with
parameterengine - Replace callbacks with async/await (Node.js)
- Remove
calls (Python -- result is already dict).get_dict() - Test all search queries return expected structure
- Update CI dependencies
Resources
Next Steps
For CI integration, see
serpapi-ci-integration.