Search by Image API?

130 views
Skip to first unread message

Kuldeep Chowhan

unread,
Aug 7, 2013, 1:38:25 AM8/7/13
to google-ajax...@googlegroups.com
Is there a way to query for a image using an Url meaning is there a api which is similar to "Search by Image" functionality so that i can multiple sizes of the same image.

Jeremy Geerdes

unread,
Aug 7, 2013, 10:34:48 AM8/7/13
to google-ajax...@googlegroups.com
You can use the inurl: operator in a query with the Image Search API. I haven't tried it with the Custom Search API's image search functionality. But here's the thing: if you already know the url of the image you want; you just want it scaled, why not build a simple image scaler in PHP or Perl using ImageMagick. You could then pass the url and the desired dimensions to this scaler on your server, it would fetch and scale the image, and you wouldn't have to wait for a round trip to Google for the search results, run through them to make sure the image you really wanted was in there, and then go get the thumbnail for that image. It would also give you the flexibility to cache the image somewhere on your own server and/or return it in any arbitrary size you like, rather than the single thumbnail option Google offers.

jg




On Wed, Aug 7, 2013 at 12:38 AM, Kuldeep Chowhan <kuldeep...@gmail.com> wrote:
Is there a way to query for a image using an Url meaning is there a api which is similar to "Search by Image" functionality so that i can multiple sizes of the same image.

--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/516abe7f-4803-4c86-80e2-2dd5f4a28e30%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

Kuldeep Chowhan

unread,
Aug 7, 2013, 2:21:23 PM8/7/13
to google-ajax...@googlegroups.com
thanks jeremy. i will give it a try with the image search api.

the need here is to find if there are multiple sizes of the same image available on google so that i can use the highest resolution of the image in my app. i dont want to just scale the image and loose the quality of it.


On Wednesday, 7 August 2013 07:34:48 UTC-7, jgeerdes [AJAX APIs "Guru"] wrote:
You can use the inurl: operator in a query with the Image Search API. I haven't tried it with the Custom Search API's image search functionality. But here's the thing: if you already know the url of the image you want; you just want it scaled, why not build a simple image scaler in PHP or Perl using ImageMagick. You could then pass the url and the desired dimensions to this scaler on your server, it would fetch and scale the image, and you wouldn't have to wait for a round trip to Google for the search results, run through them to make sure the image you really wanted was in there, and then go get the thumbnail for that image. It would also give you the flexibility to cache the image somewhere on your own server and/or return it in any arbitrary size you like, rather than the single thumbnail option Google offers.

jg


On Wed, Aug 7, 2013 at 12:38 AM, Kuldeep Chowhan <kuldeep...@gmail.com> wrote:
Is there a way to query for a image using an Url meaning is there a api which is similar to "Search by Image" functionality so that i can multiple sizes of the same image.

--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to

To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/516abe7f-4803-4c86-80e2-2dd5f4a28e30%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-search-api+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jeremy Geerdes

unread,
Aug 7, 2013, 2:42:01 PM8/7/13
to google-ajax...@googlegroups.com
Well, I'm not sure the Image Search API will work for you. It will return information about a single image, including an image for a thumbnail Google created, but it won't tell you if the same image is available at other resolutions. Further, the Image Search API will be discontinued no later than May of this coming year. So it's probably not a good idea to use it in an app which you intend to be used past that date.

jg





To view this message on the web, visit

For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages