agentsclimarketplace

Serpapi upgrade migration

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/serpapi-pack/skills/serpapi-upgrade-migration

'Migrate between SerpApi client versions and handle package changes.From its SKILL.md

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill serpapi-upgrade-migration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.9 KB, 627 tokens by cl100k_base, as published. Nobody here has run it

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

AspectLegacyCurrent
Python importfrom serpapi import GoogleSearchimport serpapi
Python initGoogleSearch(params_dict)serpapi.Client(api_key=key)
Python searchsearch.get_dict()client.search(engine="google", q=...)
Node importgoogle-search-results-nodejsserpapi
Node patternCallback-basedPromise/async-await
Engine paramVia class name (GoogleSearch, BingSearch)Via engine parameter

Migration Checklist

  • Replace package: pip install serpapi / npm install serpapi
  • Update all imports
  • Replace class-per-engine with engine parameter
  • Replace callbacks with async/await (Node.js)
  • Remove .get_dict() calls (Python -- result is already dict)
  • Test all search queries return expected structure
  • Update CI dependencies

Resources

Next Steps

For CI integration, see serpapi-ci-integration.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.