google-custom-search

Steps for using Google custom search API in .NET

南笙酒味 提交于 2019-11-30 14:03:17
I am trying to use Google custom search API in my .NET project. I have an API Key provided by my company. I have created a custom search engine using my Google account and copied the 'cx' value. I am using the following code: string apiKey = "My company Key"; string cx = "Cx"; string query = tbSearch.Text; WebClient webClient = new WebClient(); webClient.Headers.Add("user-agent", "Only a test!"); string result = webClient.DownloadString(String.Format("https://www.googleapis.com/customsearch/v1?key={0}&cx={1}&q={2}&alt=json", apiKey, cx, query)); I am getting the following error: "The remote

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

时光毁灭记忆、已成空白 提交于 2019-11-30 10:02:46
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. 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

Google Custom Search with custom search box and button?

泄露秘密 提交于 2019-11-29 21:54:54
I am trying to make a Google custom search (I just need some sort of search engine on my site), and I need to make it so that I can use my own search box (input field). I need it to be of exact size. I also need to be able to make my own button to search. I am going to need to be able to change the size and background of the search button. I am not completely sure yet, but I might actually need it to be a regular img. Does anyone know how to do this? If you cannot do this with Google, do you know of another way to do it? If there is no other way besides using your own search engine, can I

How to load Google's Custom-search-engine(CSE) JS APIs after page loads?

丶灬走出姿态 提交于 2019-11-29 08:05:29
I am using Google Custom Search Engine with their new auto-completion feature. I want this whole javascript to be loaded AFTER the page itself is loaded. The original Google code is this: <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('search', '1'); google.setOnLoadCallback(function() { google.search.CustomSearchControl.attachAutoCompletion( 'some-long-unique-id', document.getElementById('q'), 'cse-search-box'); }); </script> <script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=cs">

How do I get Google search results from urlfetch in google apps script

社会主义新天地 提交于 2019-11-28 22:06:38
I have been trying the following code var response = UrlFetchApp.fetch("https://www.google.com/#q=this+is+a+test"); var contentText = response.getContentText(); Logger.log(contentText); var thisdoc=DocumentApp.getActiveDocument().getBody() ; thisdoc.setText(contentText); Logger.log(contentText.indexOf("About")); But it only seems to return the header, and empty body, and none of the search results. At minimum I should be able to see the "About xxx results" at the top of the browser but this doesn't appear in the text nor does the indexOf return a positive screen. I'm wondering if the search

How to have multiple Google Custom Search field on the same page

北慕城南 提交于 2019-11-28 11:34:25
I'm trying to have multiple search field on the same page with Google Custom Search (GCS) like this : <script> (function() { var cx = 'user_id:field_id1'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); </script> <gcse:search></gcse:search> <script> (function() { var cx = 'user_id:field_id2'; var gcse = document.createElement('script'); gcse

How can I add an integrated Google search to my website?

大兔子大兔子 提交于 2019-11-28 08:34:05
Basically I have a website. I have a properly setup sitemap so I assume Google knows about all of my pages. And I've seen on some sites, the search form leads to a page with the shell of the original site but the results are clearly provided by Google. Similar to codinghorror.com's search, however his results aren't shown within his website's layout. Any idea what I'm talking about or how to achieve this? Karan https://cse.google.com/cse/ ^ Perhaps you're looking for Google Custom Search Engine VonC Like this <form method="get" action="http://www.google.com/search"> <div style="border:1px

Java code for using google custom search API

烂漫一生 提交于 2019-11-28 06:34:27
Can anyone please share some java codes for getting started with google search api's.I searched on Internet but not found any proper documentation or good sample codes.The codes which I found doesn't seem to be working.I'll be thankful if anyone can help me.(I have obtained API key and custom search engine id). Thanks. I have changed the while loop in the code provided by @Zakaria above. It might not be a proper way of working it out but it gives you the result links of google search. You just need to parse the output. See here, public static void main(String[] args) throws Exception { String

Google Custom Search: 403 error in iOS

一曲冷凌霜 提交于 2019-11-28 03:54:42
问题 Google Custom Search is returning this 403 error from my iPhone 7.1 app. This is the response when run in the simulator: { "error": { "errors": [ { "domain": "usageLimits", "reason": "accessNotConfigured", "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project." } ], "code": 403, "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project." } } Is there a flaw in the steps below? I’d like to

How to load Google's Custom-search-engine(CSE) JS APIs after page loads?

纵饮孤独 提交于 2019-11-28 01:50:22
问题 I am using Google Custom Search Engine with their new auto-completion feature. I want this whole javascript to be loaded AFTER the page itself is loaded. The original Google code is this: <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('search', '1'); google.setOnLoadCallback(function() { google.search.CustomSearchControl.attachAutoCompletion( 'some-long-unique-id', document.getElementById('q'), 'cse-search-box'); }); <