skillfed

googlesearch-python

A Python library for scraping the Google search engine.

googlesearch-python v1.3.0 823.3K downloads/30d#4,968 on PyPI783
Permissive license DORMANT released

What it is and what it does

googlesearch-python is a web scraper that queries Google and extracts search results by making HTTP requests and parsing the returned HTML with BeautifulSoup4. It wraps the requests and BeautifulSoup4 libraries to provide a simple search() function that returns either plain URLs or detailed SearchResult objects with title, URL, and description fields.

The package is designed for straightforward use cases where you need to programmatically retrieve Google search results. It supports common options like result count, language, region, safe search toggle, and proxy configuration. For larger result sets, it handles pagination automatically but requires you to set sleep intervals between requests to avoid rate-limiting. The library is lightweight and has low install friction, but maintenance is dormant and Google's anti-scraping measures may affect reliability.

Use it for:

  • Bulk-extract search results for a list of keywords to feed into a data pipeline or analysis tool.
  • Prototype a search aggregator or comparison tool that needs to fetch and display Google results programmatically.
  • Automate SEO research by scraping top results for competitor analysis or keyword ranking checks.
  • Build a research bot that gathers URLs and descriptions from Google for a specific domain or topic.
  • Test web scraping workflows before moving to a more robust or commercial search API.

Worth the install?

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

Scrapes Google search results by sending HTTP requests and parsing the HTML response with BeautifulSoup4, returning a list of links or detailed result objects.

Yes, if you need quick Google search scraping for a one-off script or prototype and accept that maintenance is dormant. No, if you need production reliability, active bug fixes, or assurance that Google's anti-scraping measures won't break the parser. Consider a commercial search API (Google Custom Search, SerpAPI) for production use. Permissive MIT license and low install friction are pluses, but verify that scraping complies with Google's terms and that the HTML parser still works with current Google pages.

Install

googlesearch-python on PyPI

pip

pip install googlesearch-python

uv

uv add googlesearch-python

poetry

poetry add googlesearch-python

Installing googlesearch-python

Before you install

Low install friction with only two runtime dependencies (beautifulsoup4 and requests). Maintenance is dormant—last commit was 2025-02-03 but no releases since 2025-01-21, and the repository has not been updated in over 570 days relative to the fact sheet date. Use with awareness that bug fixes or compatibility updates may be slow.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.

Quickstart

pip install googlesearch-python

from googlesearch import search
results = search("Python", num_results=10)
for result in results:
    print(result)

Requires Python 3.6 or later. Google may block or rate-limit requests if too many queries are sent in rapid succession; use sleep_interval to add delays between requests.

Verify before relying

  • Whether Google's terms of service permit scraping via this method, or if blocking/detection is common in practice.
  • Current reliability and whether Google HTML structure changes have broken the parser since the last commit.
  • Whether the package handles modern Google anti-bot measures (CAPTCHAs, JavaScript rendering).

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 2 — beautifulsoup4, requests
Maintenance dormant — 570 days since the last release
Last repo commit
First released
Downloads 823,345/month — #4,968 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: googlesearch_python-1.3.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

google search scrapingscrape google resultsgoogle search api pythonweb scraping googlesearch result extractiongoogle query resultsautomated google search
web-scrapinggoogle-search

More WWW/HTTP packages