Skip to content

ramonclaudio/google-reverse-image-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Reverse Image Search

I wanted reverse image search I could call from code: to verify where an image originated, find higher-res versions, cross-check provenance. Google's search-by-image only works through the UI, there's no official API. So I scraped the endpoint and wrapped it behind a single response() call.

Python wrapper for Google's reverse image search.

Install

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

Usage

from reverse_image_search import GoogleReverseImageSearch

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

Rate limiting

response() accepts an optional delay parameter (seconds) to space out subsequent page requests. Applies only after the first request. Defaults to 1 second.

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

License

MIT

About

Python wrapper for Google's reverse image search.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages