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

2

5

can any one please tell me how I can use google custom search in my iphone application to search images only. I tried it but it asks for 'cse' or 'cx' parameter. Please help.

Witness answered 10/3, 2013 at 5:7 Comment(1)
Any one taking first step towards it this will be the right place to start https://mcmap.net/q/758244/-implementing-google-custom-search-api-in-iosLinin
P
9

The Google Custom Search API lets you develop websites and programs to retrieve and display search results from Google Custom Search programmatically.

With this API, you can use RESTful requests to get either web search or image search results in JSON or Atom format.

See the available documentation here

See this one too

Note:

cx: The identifier of the custom search engine.

Visit the Google Custom Search page to create a custom search engine for testing purposes. Select the sites that you would like to include in the search and configure the other options.

Click on "control panel" and note your Search engine unique ID. This is the cx parameter used by the API.

See the full documentation here

Example:

GET https://www.googleapis.com/customsearch/v1?key=INSERT-YOUR-KEY&cx=017576662512468239146:omuauf_lfve&q=lectures

<script src="https://www.googleapis.com/customsearch/v1?key=YOUR-KEY&cx=017576662512468239146:omuauf_lfve&q=cars&callback=hndlr">
Persuasive answered 10/3, 2013 at 6:8 Comment(5)
Thanx a lot for your response. I am using the method mentioned at second link that you mentioned here. But it gives me a limited number of hits only as it is deprecated one. I also read the custom search api but can't understand the 'cx' parameter that how to use it in the api. Can you please help me on this?Witness
@Ramshad hey for iPhone this api is now available? if yes then how to implement it?Electorate
@Ramshad it's nice but is is depricated one. any other option available for ios appKuchen
@Rushi: The only way is, use the Custom Search API, which now supports image search. developers.google.com/custom-searchPersuasive
but it need to be implemented on server thats problem.Kuchen
V
3

By the way You can use my poor library (YCustomSearchEngine)

Valdemar answered 11/3, 2013 at 13:10 Comment(1)
Thanks.. Although I didn't use you library but it is a good one.. :)Witness

© 2022 - 2024 — McMap. All rights reserved.