Google images: get large image URL from thumbnail URL

sdabet picture sdabet · Jan 13, 2015 · Viewed 10.7k times · Source

Is there any way to build the URL of a medium/large/original image corresponding to a thumbnail URL returned by the Google Custom Search API?

In other words, from this thumbnail URL:

https://t3.gstatic.com/images?q=tbn:ANd9GcRYiGRk0xt6OXpRa3j7ySJNeATepTe7zaWzm1G6KpGAwpHePcTmYPYp6WI

is it somehow possible to find the URL of a bigger image?

I tried to replace tbn (for 'thumbnail'?) in the q URL param by medium, large,... but without success.

Answer

Bangkokian picture Bangkokian · Feb 10, 2015

I'm pretty sure this is not possible with any permutation of the thumbnail URL. I don't think there is any relationship between the thumbnail name and the original's name. The thumbnail is called "Billy" and the full image is called "Peter". There's no relationship between the two to my knowledge.

Furthermore, if you have the thumbnails stored, it's not even a foregone conclusion that the original images still exist at their original location. Nor will the API be helpful doing a reverse image search.

The best you can do (to my knowledge) is attempt to scrape a reverse image search based on the thumbnail. This will in the majority of cases -- but certainly not all cases -- give you the large image URL. But only if the original image still exists. (Of course, scraping Google is a violation of TOS... so be aware of the downsides)

http://skyzerblogger.blogspot.jp/2013/01/google-reverse-image-search-scraping.html