Skip to content

A simple python wrapper designed for leveraging Google's search by image capabilities to perform reverse image searches programatically.

License

Notifications You must be signed in to change notification settings

RMNCLDYO/Google-Reverse-Image-Search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Made with Python

maintained - yes contributions - welcome

dependency - requests dependency - beautifulsoup4

Version

Overview

Google Reverse Image Search is an open-source Python library designed for leveraging Google's search by image capabilities to perform reverse image searches programatically. This tool is particularly useful for applications like verifying the source of an image, finding higher resolution versions, or identifying the content and context of an image. It's designed for developers, researchers, and hobbyists who require an automated, programmatic way to perform reverse image searches.

Key Features

  • Automated reverse image searches using Google's search by image feature.
  • Customizable search queries, delays and result limits.
  • Parses and formats search results, including titles and links.
  • Built-in error handling and logging.

Prerequisites

  • Python 3.x

Dependencies

The following Python packages are required:

  • requests: For making HTTP requests to Google.
  • beautifulsoup4 library for parsing the results.

Installation

Clone the repository and install the required dependencies:

git clone https://github.com/RMNCLDYO/Google-Reverse-Image-Search.git
cd Google-Reverse-Image-Search
pip install -r requirements.txt

Usage

from reverse_image_search import GoogleReverseImageSearch

request = GoogleReverseImageSearch()

response = request.response(
    query="Example Query",
    image_url="https://example.com/image.jpg",
    max_results=5
)

print(response)

Delay Parameter

The response method includes an optional delay parameter, designed to manage the rate of search requests. This feature is particularly useful to prevent overwhelming the server with rapid successive requests, which could potentially trigger rate limiting or temporary blocking by Google's servers.

The delay parameter specifies the number of seconds to wait before making each new page request. This delay is applied only when fetching subsequent pages, not on the first request. It's an optional parameter, and if not set, defaults to 1 second.

To use the delay feature, set the delay parameter in the response method:

response = request.response(
    query="Example Query",
    image_url="https://example.com/image.jpg",
    max_results=10,
    delay=5 # Wait for 5 seconds before each request
)

Contributing

Contributions are welcome!

Please refer to CONTRIBUTING.md for detailed guidelines on how to contribute to this project.

Reporting Issues

Encountered a bug? We'd love to hear about it. Please follow these steps to report any issues:

  1. Check if the issue has already been reported.
  2. Use the Bug Report template to create a detailed report.
  3. Submit the report here.

Your report will help us make the project better for everyone.

Feature Requests

Got an idea for a new feature? Feel free to suggest it. Here's how:

  1. Check if the feature has already been suggested or implemented.
  2. Use the Feature Request template to create a detailed request.
  3. Submit the request here.

Your suggestions for improvements are always welcome.

Versioning and Changelog

Stay up-to-date with the latest changes and improvements in each version:

  • CHANGELOG.md provides detailed descriptions of each release.

Security

Your security is important to us. If you discover a security vulnerability, please follow our responsible disclosure guidelines found in SECURITY.md. Please refrain from disclosing any vulnerabilities publicly until said vulnerability has been reported and addressed.

License

Licensed under the MIT License. See LICENSE for details.