googlesearch-python
A Python library for scraping the Google search engine.
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-pythonuv
uv add googlesearch-pythonpoetry
poetry add googlesearch-pythonInstalling 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
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
google-search-resultsA Python client for querying search results…
permissive · top 5,000 on PyPI
BeautifulSoupBeautiful Soup parses HTML and XML documents…
permissive · top 15,000 on PyPI
brave-searchWrapper for the Brave Search API that provides…
unclear · top 15,000 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
scrapingbeePython SDK wrapper for ScrapingBee's web…
permissive · top 15,000 on PyPI
scrapegraph-pyClient SDK for the ScrapeGraphAI managed API,…
permissive · top 15,000 on PyPI
firecrawlA Python SDK for web scraping, crawling,…
permissive · top 5,000 on PyPI
spider-clientPython SDK for the Spider Cloud API that…
permissive · top 15,000 on PyPI
crawleeCrawlee is a web scraping and browser…
permissive · top 5,000 on PyPI
ScweetScrape tweets, profiles, followers, and user…
permissive · top 15,000 on PyPI