Google Image search integration in Iphone app

Mahesh_P picture Mahesh_P · Mar 12, 2014 · Viewed 9.7k times · Source

I am working on google image search. I found so many url's for this. But problem is in all url's, they are passing the value as string to parameter.

How to use Google Custom Search for image search in objective c

this is one of the questions. In developer sites also they provided string parameter only like https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=apple

Here "apple" is value for parameter 'q and getting results for apple.

But i want to send image as a value to the parameter and getting results of that particular image.

Plz help me. I googled a lot. i found above like url's only. I didn't find my requirement.

Thanks in advance. Mahesh

Answer

Logan picture Logan · Mar 12, 2014

There's another question that seems fairly similar, here.

If I understood one of the answers here. Google has deprecated their imageSearch api. The answer also provides a link to a new api, Google Custom Search, but that seems to only have the option to send text and receive images as search results. There doesn't appear to be a reverse image search available. I did however come across a third-party api by Tineye that seems to have a mobile api and things ready to go. Check it out HERE!

Note: I have not tried, nor do I have any affiliations with Tineye, I just came across it and thought I'd offer a suggestion.

Update

After some serious searching, I have solution no. 1 based on the answer: here.

If you upload your image to a server or backend of some sort, and generate a URL, you can submit it this way:

NSString * yourImageURL = //...//;
NSString * searchURL = @"https://www.google.com/searchbyimage?&image_url="

NSString * completeURL = [NSString stringWithFormat:@"%@%@", searchURL, yourImageURL];

Good luck!