skillfed

serpapi

The official Python client for SerpApi.com.

serpapi v1.1.0 576.0K downloads/30d#5,932 on PyPI166
Permissive license MIT Active released

What it is and what it does

serpapi is the official Python wrapper for SerpApi.com, a search engine aggregation service. It lets you query results from Google, Bing, Baidu, Yahoo, eBay, YouTube, Walmart, DuckDuckGo, Naver, and other engines through a unified client interface, returning structured JSON-like results. The package handles authentication via API key, timeouts, and error cases (HTTPError for bad requests or auth failures, TimeoutError for slow responses).

You instantiate a Client with your API key, call search() with an engine name and query parameters, and get back a SerpResults object that behaves like a dictionary. The package is designed for integration into AI workflows, RAG pipelines, fine-tuning datasets, and data mining at scale. It depends only on requests for HTTP transport.

Use it for:

  • Fetch Google search results programmatically for web scraping or data collection pipelines.
  • Query e-commerce platforms (eBay, Walmart) for product listings and pricing data at scale.
  • Integrate search results into machine learning training datasets or RAG (retrieval-augmented generation) systems.
  • Build multi-engine search aggregators that query Bing, Baidu, or Yahoo in a single codebase.
  • Retrieve structured data like news headlines, stock market data, or flight schedules via SerpApi's supported engines.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Official Python client for SerpApi that queries multiple search engines and data sources (Google, Bing, Baidu, Yahoo, eBay, YouTube, and others) and returns structured results as dictionary-like objects.

Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and provides a clean, documented interface to a large set of search engines. Install it if you need programmatic access to search results or structured data from multiple sources. The main gotcha is that it requires a SerpApi account and API key, so verify pricing and rate limits for your use case before committing.

Install

serpapi on PyPI

pip

pip install serpapi

uv

uv add serpapi

poetry

poetry add serpapi

Installing serpapi

Before you install

Low install friction with a single dependency (requests) and a pure-wheel distribution. The package is actively maintained with a recent release and 166 repository stars, supporting Python 3.6 through 3.14.

License in practice

MIT license is permissive and places no restrictions on use, modification, or redistribution in commercial or private projects.

Quickstart

import os
import serpapi

client = serpapi.Client(api_key=os.getenv("SERPAPI_KEY"))
results = client.search({
  "engine": "google",
  "q": "coffee"
})
print(results)

Requires a valid SerpApi API key (obtainable from serpapi.com/users/sign_up) and network access to SerpApi's backend service.

Verify before relying

  • Whether the SerpApi service itself requires a paid subscription or if free tier access is available for all supported engines
  • Rate limiting or throughput constraints imposed by the SerpApi backend service

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — requests
Maintenance actively maintained — 0 days since the last release
Last repo commit
First released
Downloads 576,023/month — #5,932 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: serpapi-1.1.0-py3-none-any.whl

Keywords: scrape, serp, api, serpapi, scraping, json, search, localized, rank, google, bing, baidu, yandex, yahoo, ebay, scale, datamining, training, machine, ml, youtube, naver, walmart, apple, store, app

Natural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Indexing/SearchTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

search engine api wrappergoogle search results pythonmulti-engine search scrapingserp results clientweb search data integrationsearch api aggregatorstructured search results
search-apiweb-scrapingdata-aggregation

More Python Modules packages