-1

I want to search image from Google and add this images in collection view cell. I am new to iOS development. I search through net and Google is saying me about its custom API search. Can anyone help me giving a helpful sample code for Google image search.

  • what have you tried? you can just use google rest api and conduct the search. Your question is very ambiguous. – J2theC May 18 '14 at 07:41
  • I have a UICollectionView and a search bar.In UIcollectionview cell I just want to show the images from google that user searches for in search bar @J2theC – user3475211 May 18 '14 at 07:57

1 Answers1

0

The google custom search API is depreciated, Google has not published any documentation on its usage limits, although speculated that it is 5,000 calls, this is not an official figure, and it makes sense that Google reduces the limit as the API nears its shelve life.

From the google API page

Note: The Google Web Search API has been officially deprecated as of November 1, 2010. It will continue to work as per our deprecation policy, but the number of requests you may make per day will be limited. Therefore, we encourage you to move to Custom Search, which provides an alternative solution.

I suggest you look into the Bing search API which has several examples online to get you started.

You can also look into https://developers.google.com/custom-search/ instead

Pawan Rai
  • 3,434
  • 4
  • 32
  • 42
  • I went through this link.But as I said I am novice.So many stuffs are unclear to me. I will now try to do the job by Bing Search API. – user3475211 May 18 '14 at 11:22
  • @user3475211 have you tried Bing Search API , how it is working ? – Pawan Rai May 21 '14 at 08:28
  • I tried but could not make a solution.can you give me some sample code of Bing Search API in objective c @pawan – user3475211 May 21 '14 at 11:58
  • @user3475211 check this [reference link](http://stackoverflow.com/questions/6392543/image-search-api) or you can try for flickr image search api also. – Pawan Rai May 21 '14 at 12:09
  • I am using flicker image search but i need another search option so Bing is needed @pawan – user3475211 May 26 '14 at 06:52
  • I have been able to use Google Api and search images.But the problem is it only gives me 8 images.I went through [this](http://stackoverflow.com/questions/4868815/google-ajax-api-how-do-i-get-more-than-4-results) and it is saying me multiple calls to the webservice specifying the 'start' parameter.How can i do this?? @pawan – user3475211 Jun 03 '14 at 09:38
  • look at the rsz (number of results to return per page) & start( start index of the first search result) parameter in reference. – Pawan Rai Jun 03 '14 at 09:46
  • okK thanks a lot.Solved it @pawan – user3475211 Jun 04 '14 at 05:18