Skip to main content

Google Search Resource (GSR)

A tool for researching and analyzing Google search page behavior and structure.

Purpose

GSR is designed for legitimate research purposes:

  • Understanding how Google search pages are structured
  • Analyzing search result formatting
  • Studying how search interfaces change over time
  • Educational purposes and web development learning

Installation

From PyPI

# Install the package
pip install google-search-resource

# Install playwright browsers
playwright install chromium firefox

From Source

# Clone the repository
git clone https://github.com/yaacov/gsr.git
cd gsr

# Complete setup (create venv, install dependencies and browsers)
make setup

# Activate virtual environment
source venv/bin/activate

Usage

Command Line Interface

After installation, use the gsr command:

# Basic usage with default query
gsr

# Custom search query
gsr --query "machine learning"

# Headless mode (no browser window)
gsr --headless --query "python web scraping"

# Get help
gsr --help

Available CLI Options

gsr [OPTIONS]

Options:
  --query, -q TEXT          Search query
  --headless                Run browser in headless mode
  --new-session             Force create new session
  --session-id TEXT         Use specific session ID
  --typing [fast|normal|slow]  Typing speed style
  --max-results INT         Maximum results to display
  --verbose, -v             Increase verbosity (-v: INFO, -vv: DEBUG)
  --quiet                   Suppress all output except results
  --timeout INT             Timeout in seconds
  --browser [chromium|firefox]  Browser to use
  --output-format [text|json|csv]  Output format
  --no-images               Disable image loading
  --config PATH             Load configuration from YAML/JSON file

Usage Examples

Library Usage

from gsr.searcher import HumanLikeGoogleSearcher
from gsr.enums import SearchStatus

# Simple search with defaults
searcher = HumanLikeGoogleSearcher()

try:
    result = searcher.search("python programming")
    
    if result.status == SearchStatus.SUCCESS:
        for r in result.results:
            print(f"{r['title']}: {r['url']}")
    
    elif result.status == SearchStatus.CAPTCHA_DETECTED:
        print("Rate limit reached - stopping research")
        
finally:
    searcher.close()

Development

Setup for Contributors

# Clone and setup
git clone https://github.com/yaacov/gsr.git
cd gsr

# Install with dev dependencies
make install-dev
make install-browsers

# Code quality tools
make format        # Auto-format code
make lint          # Check code style
make format-check  # Check formatting without changes

Building and Publishing

# Build package
make build

# Test on TestPyPI
make publish-test

# Publish to PyPI (production)
make publish

License

MIT License - Copyright (c) 2025 Yaacov Zamir

For educational and research purposes.

Metadata

Release files for google-search-resource 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-search-resource 0.0.2
File Size Uploaded Provenance
google_search_resource-0.0.2.tar.gz 17.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for google-search-resource 0.0.2
File Interpreter ABI Platform
google_search_resource-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 35.7 kB

Release files / google_search_resource-0.0.2.tar.gz

Download URL google_search_resource-0.0.2.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0864f0dc1c8517e39982180553f3b07ae8dfeff36b43d440025600bc2c4dc692
BLAKE2b-256 checksum
How to use checksums
32287c0ca702edd7a6c742d880940fcb953e41182a15a178f64233813dddc579
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / google_search_resource-0.0.2-py3-none-any.whl

Download URL google_search_resource-0.0.2-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bee976d5a6bb1fca261b0711890128cb692d26221b7f0851038344641f61b1cf
BLAKE2b-256 checksum
How to use checksums
cd0e0b09a0991c066269f7d411831d8dc6e9525a072745ae8b533d952c5cd131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for google-search-resource 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page