google-custom-search

Google Custom Search API - Search Results

最后都变了- 提交于 2020-01-06 20:00:56
问题 I have somewhat lost touch with custom search engines ever since Google switched from its more legacy search engine api in favor of the google custom search api. I'm hoping someone might be able to tell me whether a (pretty simple) goal can be accomplished with the new framework, and potentially any starting help would be great. Specifically, I am looking to write a program which will read in text from a text file, then use five words from said document in a google search - the point being to

Google CSE multiple redefinements

前提是你 提交于 2020-01-06 13:29:30
问题 I'm using Google CSE and would like to use multiple redefinements in a query, e.g. q=search+term+more:redefinement1+more:redefinement2, however I can't seem to find this in the documentation. I know this works for one more:... but how can I specify multiple labels? Thx 回答1: Probably you can't. I've noticed that you can also specify a site to force the search, such as: "keyword1 keyword2 site:includesite.com", but you can't specify more than one. Moreover, you can specify more than one

Using the Custom Search API (REST JSON) to search for square images

↘锁芯ラ 提交于 2020-01-05 03:51:08
问题 I'm using Google's JSON Custom Search API for a project that involves creating profiles for professional football/soccer players. If I search any player with Google Images regularly and search in a "Player name, Current team" format with the Search Tools set to Type->Face and Advanced Search set to aspect ratio->Square , then I typically get a perfect "profile" headshot as the first result. This would be ideal for the project, as every image has to be square. Using the aforementioned API, I

Google Custom Search “Popular Queries” BAD REQUEST ERROR

会有一股神秘感。 提交于 2020-01-04 05:24:15
问题 In Google CSE, when I attempt to get Popular Queries , I'm getting this error in the FireBug Console : NetworkError: 400 Bad Request - http://www.google.com/cse/api/xxxxxxxxx:xxxxxxx/cse/xxxxxxx/queries/js?callback=(new+PopularQueryRenderer(document.getElementById(%27queries%27))).render .... .. .. Why is it happening? I just simply copy/paste the code from Google: <html> <head> </head> <body> <!-- CODE COPIED FROM GOOGLE : START --> <div id="queries"></div> <script src="http://www.google.com

Steps for using Google custom search API in .NET

限于喜欢 提交于 2019-12-30 04:45:09
问题 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

Google Reverse Image Search via API?

徘徊边缘 提交于 2019-12-25 08:26:11
问题 Is it possible to perform a reverse image search via the Google Custom Search API using https://www.google.com/searchbyimage?&image_url=<URL> or https://www.google.com/searchbyimage?site=search&sa=X&image_url={YOUR_IMAGE_URL} , as I think sending direct requests to the servers and scraping the results is against the TOS. This method was suggested here, but I am unsure if this can be done through the API or not, to avoid violating the TOS if possible. This example GET https://www.googleapis

Default Value in the Search Box of the Google Custom Search

微笑、不失礼 提交于 2019-12-24 08:05:10
问题 I am using the standard copy and paste code for the Google Custom Search (free with ads). I want to have some text in the search field when the page is loaded is that possible? If so, how? Here's the code: <div id="cse" style="width: 100%;">Loading</div> <script src="//www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript"> google.load('search', '1', {language : 'en'}); google.setOnLoadCallback(function() { var customSearchControl = new google.search

Need to access Google Custom search api through R

久未见 提交于 2019-12-23 10:33:07
问题 How do I use R to do a Google Custom search? I have the custom search engine id and the api key. I currently try to do this: getURL("https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=ENGINE_ID&q=searchterm") and I get the following error: Error in function (type, msg, asError = TRUE) : SSL certificate problem: unable to get local issuer certificate Though I am able to get the results in json when I do a get request in the browser. Any clue on whats happening? 回答1: httr package worked!

Using Typeahead with Google Custom Search Engine

冷暖自知 提交于 2019-12-23 10:15:08
问题 I'm trying to get Twitter Typeahead+Bloodhound to work with Google's CSE. So far, I've managed to get the results returning, but I'm not able to work out the datumTokenizer. var results = new Bloodhound({ datumTokenizer: function(data) { return Bloodhound.tokenizers.whitespace(d.value) }, queryTokenizer: Bloodhound.tokenizers.obj.whitespace, remote: { url: "http://clients1.google.com/complete/search?client=partner&hl=en&sugexp=gsnos%2Cn%3D13&gs_rn=25&gs_ri=partner&partnerid

Pass variable to Google Custom Search Engine

倖福魔咒の 提交于 2019-12-22 05:32:22
问题 Is it possible to pass a search variable into the Google Custom Search Engine that I have embedded on my website? I can get the search engine to work, but I can't pass it a term via POST (it's coming from a search button on other pages of the website) I tried to hack the code I found here: http://code.google.com/apis/ajax/playground/?exp=search#hello_world And this is what I have so far... ($q is the term I am passing to it) <script type="text/javascript"> google.load('search', '1', {language