google-search-api

Getting more than 10 results by Google Custom Search API V1 in Java

﹥>﹥吖頭↗ 提交于 2019-12-20 11:56:21
问题 I am using Google Custom Search API in Java to get results of Google in response to a query. I have written this code with the help of other posts, code is as follows: url = new URL("https://www.googleapis.com/customsearch/v1?key="+key+ "&cx="+ cx +"&q="+ searchText+"&alt=json"+"&start="+0+"&num="+30); HttpURLConnection conn2 = (HttpURLConnection) url.openConnection(); System.out.println("Connection opened!"); conn2.setRequestMethod("GET"); conn2.setRequestProperty("Accept", "application/json

Scraping/Parsing Google search results in Ruby

主宰稳场 提交于 2019-12-18 13:37:41
问题 Assume I have the entire HTML of a Google search results page. Does anyone know of any existing code (Ruby?) to scrape/parse the first page of Google search results? Ideally it would handle the Shopping Results and Video Results sections that can spring up anywhere. If not, what's the best Ruby-based tool for screenscraping in general? To clarify: I'm aware that it's difficult/impossible to get Google search results programmatically/API-wise AND simply CURLing results pages has a lot of

Google's “define: ” through an API?

我与影子孤独终老i 提交于 2019-12-17 21:39:51
问题 I want to get the result of searches that use special features in Google, like "define: [phrase]" and I can't seem to find relevant information about this. Does anyone knows where I can get the data in JSON format (like the rest of Google's APIs) without scraping the results page manually? Thanks, Eli 回答1: I wish I had not set a bounty for this, because I stumbled upon the answer a few days later and it is really simple. Here is URL to call if you want a definition to love : http://www.google

Google Search from a Python App

不问归期 提交于 2019-12-17 03:22:58
问题 I'm trying to run a google search query from a python app. Is there any python interface out there that would let me do this? If there isn't does anyone know which Google API will enable me to do this. Thanks. 回答1: There's a simple example here (peculiarly missing some quotes;-). Most of what you'll see on the web is Python interfaces to the old, discontinued SOAP API -- the example I'm pointing to uses the newer and supported AJAX API, that's definitely the one you want!-) Edit : here's a

Java Web Crawler for retrieving google search results

廉价感情. 提交于 2019-12-14 03:13:55
问题 This question has been asked many times before. However some of the APIs have changed over time and I want to know a good way to implement this. The best way to this would be using google search api. However, https://developers.google.com/custom-search/json-api/v1/overview tells there are only 100 free search queries per day. I will require more and I dont want to spend money to do it. I tried it using simple REST apis, however its mostly JavaScript code and I don't seem to find what I need

How can I get the contents of the “feedback” box from Google searches?

自古美人都是妖i 提交于 2019-12-13 17:16:14
问题 When you ask a question or request the definition of a word in a Google search, Google gives you a summary of the answer in the "feedback" box. For example, when you search for define apple you get this result: Now, I would like to make it clear that I do not need the entire page or the other results, I just need this box: How can I use the Requests and Beautiful Soup modules to get the contents of this "feedback" box in Python 3? If that is not possible can I use the Google Search Api to get

Search all of Google with Google Python API

…衆ロ難τιáo~ 提交于 2019-12-12 09:27:30
问题 I will be using python. My plan is to make a program that searches a bunch of things, and sees how many search results google has for it. But I can only figure out how to get custom search engine to kind of work. In python, how do I use the Google API to do a simple search using Google's main search engine? As I understand, the answer to this has changed within in the last few years as google has made a push to the google app engine. 回答1: Recently I was also looking for Google Search API and

What is the correct way to get google search results?

旧城冷巷雨未停 提交于 2019-12-12 07:59:09
问题 I want to get all the search results for a particular keyword search on google. I've seen suggestions of scraping, but this seems like a bad idea. I've seen Gems (I plan on using ruby) that do scraping and use the API. I've also seen suggestions of using the API. Does anyone know the best way to do this right now? The API Is no longer supported and I've seen people report they get unusable data back. Do the Gems help solve this or no? Thanks in advance. 回答1: According to http://code.google

importxml in google docs and returning a google search result

两盒软妹~` 提交于 2019-12-12 05:39:27
问题 I am trying to upload a result of a google search into my google docs using importxml and the code that used to work doesn't anymore. I have =IMPORTXML("https://www.google.com/search?q=site: [query]&num=100&start=1","//cite") My error message is Could not fetch url: https://www.google.com/search?q=site:[query]&num=100&start=1 Can someone tell me why this doesn't work anymore? 回答1: Google has lately been blocking search requests made from both Apps Scripts and Google Sheets though the requests

Google calendar API - search event by name

懵懂的女人 提交于 2019-12-12 05:04:22
问题 I use a query parameter q=something to search From the documentation here it is evident that q= "Match entire phrase" will return all events that match Match AND entire AND phrase But I cannot search for an event something like this "abc 1.34 - 3.03 p.m." to be clear whenever there is a minus sign the search breaks understanding it as negation I tried escaping minus as - by "abc 1.34 \- 3.03 p.m." but I was not successful. How do I search for the event by exact which has numbers and special