Skip to main content

A simple Python package for performing Google searches

Project description

📦 gsearchpy

gsearchpy is a lightweight Python package that allows you to perform Google Search queries programmatically and retrieve raw search result pages with ease.

It is built for developers, researchers, and automation enthusiasts who need a flexible interface to Google Search.


Table of Contents

🚀 Features

  • 🔍 Perform Google searches using customizable parameters
  • 📄 Retrieve raw HTML content and filtered data of Google search results
  • 🔁 Built-in pagination support

📦 Installation

pip install gsearchpy

Using Github

pip install git+https://@github.com/itsguptaaman/gsearchpy.git

After Installation run this command to setup the drivers and dependency

gsearchpy

📦 Example Usage

For raw data response

from gsearchpy.google import GoogleScraper

scraper = GoogleScraper()
html = scraper.google_search(query)

For clean data

from gsearchpy.google import GoogleScraper

query = "best VSCode extensions for productivity"
scraper = GoogleScraper()
html = scraper.google_search(query)
print(scraper.google_search_clean_data(html))

To get google maps data or any other data use tbm paramter

from gsearchpy.google import GoogleScraper

google = GoogleScraper()
query = "coffee shop in dubai"
html = google.google_search(query, tbm="lcl")
print(google.local_search_clean_data(html))

Also you can use v2 except for google search you can use this for lcl, images, news, and etc.

from gsearchpy.google import GoogleScraper

google = GoogleScraper()
query = "coffee shop in dubai"
html = google.google_search_v2("plumbers", page_number=2, gl="ahemdabad")
print(google.local_search_clean_data(html))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gsearchpy-0.1.3.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gsearchpy-0.1.3-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file gsearchpy-0.1.3.tar.gz.

File metadata

  • Download URL: gsearchpy-0.1.3.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for gsearchpy-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ea52060d6271236d257e999fb058e1358ee4bcb91b85d6b9749b9b420d184a4c
MD5 73cddf11c1ffb346dcd5b3a37cbb99c1
BLAKE2b-256 87a484ac5949eec7fe4f74a5fea7ded7a6590d49da01389df5678df83f55f038

See more details on using hashes here.

File details

Details for the file gsearchpy-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gsearchpy-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for gsearchpy-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 75cfc5245e35e417d4fb10435af514cd19c900a11fe80cb47fc5bf52f4dfdc3f
MD5 e9efb485e540093c5ce07f3286cfcfaf
BLAKE2b-256 3e8c98e6eb4e5dbd92f775f6b637e68e126d2dcfed6ffaa3ea93263d53ede773

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page