Pythie
CategoriesTrending
An open index of Python tools.Pythie’s IndexLegal noticePrivacyData: PyPI (package metadata; download statistics under CC BY 4.0, via ClickHouse), deps.dev (CC BY 4.0), GitHub, OSV.

googlesearch-python

1.3.0MaintainedPythie’s Index: 30

A Python library for scraping the Google search engine.

Low maintenance activity. Last release 22 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.

Consider insteadserpapiPythie’s Index: 82492.2K downloads/moCompare →

Web Scraping & AutomationHTTP & Networking
$pip install googlesearch-python
nv7-github/googlesearchPyPI

googlesearch

googlesearch is a Python library for searching Google, easily. googlesearch uses requests and BeautifulSoup4 to scrape Google.

Installation

To install, run the following command:

python3 -m pip install googlesearch-python

Usage

To get results for a search term, simply use the search function in googlesearch. For example, to get results for "Google" in Google, just run the following program:

from googlesearch import search
search("Google")

Additional options

googlesearch supports a few additional options. By default, googlesearch returns 10 results. This can be changed. To get a 100 results on Google for example, run the following program.

from googlesearch import search
search("Google", num_results=100)

If you want to have unique links in your search result, you can use the unique option as in the following program.

from googlesearch import search
search("Google", num_results=100, unique=True)

In addition, you can change the language google searches in. For example, to get results in French run the following program:

from googlesearch import search
search("Google", lang="fr")

You can also specify the region (Country Codes) for your search results. For example, to get results specifically from the US run the following program:

from googlesearch import search
search("Google", region="us")

If you want to turn off the safe search function (this function is on by default), you can do this:

from googlesearch import search
search("Google", safe=None)

To extract more information, such as the description or the result URL, use an advanced search:

from googlesearch import search
search("Google", advanced=True)
# Returns a list of SearchResult
# Properties:
# - title
# - url
# - description

If requesting more than 100 results, googlesearch will send multiple requests to go through the pages. To increase the time between these requests, use sleep_interval:

from googlesearch import search
search("Google", sleep_interval=5, num_results=200)
If requesting more than 10 results, but want to manage the batching yourself? 
Use `start_num` to specify the start number of the results you want to get:
```python
from googlesearch import search
search("Google", sleep_interval=5, num_results=200, start_result=10)

If you are using a HTTP Rotating Proxy which requires you to install their CA Certificate, you can simply add ssl_verify=False in the search() method to avoid SSL Verification.

from googlesearch import search

proxy = 'http://API:@proxy.host.com:8080/'

j = search("proxy test", num_results=100, lang="en", proxy=proxy, ssl_verify=False)
for i in j:
    print(i)

Popularity

Downloads / month
853.3K
GitHub stars
787
Downloads, last 7 days
129.6K-23%
Stars, last 7 days
–
Direct dependents
114
All dependents
121

Pythie’s Index

How it works
30

Low activity

Maintenance, out of 100

  • Recent release

    last release 677 days ago

  • Commit activity

    0/26 weeks with commits

  • Release cadence

    0 releases in 12 months

  • Issues & PRs handled

    no data

  • Contributor spread

    17 authors in last 100 commits

  • OpenSSF Scorecard

    3.0/10

Commits, last 26 weeks0

Releases

Latest
1.3.0
Released
Jan 21, 2025
Releases, 12 months
0
First release
Jun 9, 2021

Compatibility

Requires Python
>=3.6
License
MIT (Permissive)

Keywords

python-librarypythonpython3

Alternatives

Use instead of googlesearch-python: tools that do the same job, closest first.

Compare with google →Compare with google-search-results →Compare with serpapi →Compare all 4 →

  • google3.0.0InactivePythie’s Index: 19

    Python bindings to the Google search engine.

    Web Scraping & AutomationHTTP & Networking–3.2M/moReleased Jul 11, 2020
  • google-search-results2.4.2ArchivedPythie’s Index: 6

    Scrape and search localized results from Google, Bing, Baidu, Yahoo, Yandex, Ebay, Homedepot, youtube at scale using SerpApi.com

    HTTP & NetworkingWeb Scraping & Automation7621.7M/moReleased Mar 10, 2023
  • serpapi1.3.0ActivePythie’s Index: 82

    The official Python client for SerpApi.com.

    HTTP & NetworkingWeb Scraping & Automation184492.2K/moReleased Nov 25, 2026
  • ddgs9.16.1ActivePythie’s Index: 62

    Dux Distributed Global Search. A metasearch library that aggregates results from diverse web search services.

    HTTP & NetworkingLLMs & Generative AI3.1K7.5M/moReleased Oct 23, 2026

Works well with

Use together with googlesearch-python: extensions, drivers, servers and companion tools.

  • requestsPythie’s Index: 79Python HTTP for Humans.1.5B downloads/mo