serpapi-upgrade-migration
SerpAPI Client Upgrade and Migration
Overview
Inventory actual legacy behavior, introduce the current official client behind a seam, and prove response and failure compatibility before removing the old path.
Prerequisites
- Current dependency locks, imports, call sites, engine parameters, fixtures, and runtime support matrix
- Target official client release notes and migration documentation
- Search budget, canary environment, rollback owner, and immutable baseline
Tool Discipline
Use Read, Glob, and Grep to inventory dependencies and behavior, WebFetch to verify current official packages, Write or Edit for the adapter and tests, and Bash(python3:*) or Bash(npm:*) only for approved installs and test execution.
Current Contract
The recommended Python distribution is serpapi, distinct from the legacy google-search-results distribution. Its Client.search returns a SerpResults mapping with helpers such as as_dict() and pagination methods. The current JavaScript serpapi package supports promises and callbacks; migration from google-search-results-nodejs must preserve engine parameters and error behavior explicitly.