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

左心房为你撑大大i 提交于 2019-11-30 14:14:11

问题


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.


回答1:


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">



回答2:


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



来源:https://stackoverflow.com/questions/15319115/how-to-use-google-custom-search-for-image-search-in-objective-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!