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 import GoogleScraper

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

For clean data

from gsearchpy 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 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 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.6.tar.gz (8.1 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.6-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gsearchpy-0.1.6.tar.gz
Algorithm Hash digest
SHA256 2fa4b61f40106f567e50f64961f008692c22a6f5a1644a1f68e4430717213309
MD5 ec32a61fb56988e7b3261ef204dbfba8
BLAKE2b-256 6578267aaaea2576f85d04d2f5048c9debbc81ee9cbfdd2c9623d1c1d9ee8aba

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gsearchpy-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 567a9bb9401bb6d79d042933061e7d315d8a02f1a33972109ff17eb3c9578bdb
MD5 bbba48af164f8438fb7a3835d94377bd
BLAKE2b-256 a133d9656bbd75b17e047858b13ce8fd0f61e5c2625913c67b3d65d6e6a3b866

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