google-search-api

resolve JSONException duplicate keys

家住魔仙堡 提交于 2019-12-01 19:24:04
i am using google custom search engine and getting the results in JSON format.for certain queries,the JSON result has duplicate keys and hence it produces a JSONException: Duplicate key "nickname" etc.. i am using JAVA. String str=//contains the query result in json format JSONObject ob=new JSONObject(str) produces the exception may know how to resolve this exception? here is the JSON reply: { "kind": "customsearch#result", "title": "The World Factbook: India - CIA - The World Factbook", "htmlTitle": "The World Factbook: \u003cb\u003eIndia\u003c/b\u003e -", "link": "https://www.cia.gov/library

Google Search API - Only returning 4 results

不想你离开。 提交于 2019-11-30 16:03:56
After much experimenting and googling, the following Python code successfully calls Google's Search APi - but only returns 4 results: after reading the Google Search API docs, I thought the 'start=' would return additional results: but this not happen. Can anyone give pointers? Thanks. Python code: /usr/bin/python import urllib import simplejson query = urllib.urlencode({'q' : 'site:example.com'}) url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&%s&start=50' \ % (query) search_results = urllib.urlopen(url) json = simplejson.loads(search_results.read()) results = json[

Alternative to the deprecated google REST web search API

谁都会走 提交于 2019-11-30 10:58:28
问题 I have been using the Google Websearch API for over 1 year now. The service was deprecated in Nov 2010 but continues to provide results to date. More recently, google has started to enforce the 1,000 queries (?) per day limit on this deprecated service. I swear, last month I made over 10,000 API calls in one day without any errors from the service (same IP, same API key). So I guess my question is has anyone found an alternative yet? I know yahoo boss is pretty good but I am working

Scraping/Parsing Google search results in Ruby

点点圈 提交于 2019-11-30 10:17:10
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 issues. There's concensus on both of these points here on stackoverflow. My question is different. This

Google Search api for Android systems

喜你入骨 提交于 2019-11-30 07:27:32
I'm trying to build an android app that would do a local search on google. I know there is a Google Search API for Java , and I am able to use it for a desktop application. However, when I use the same jar file (gsearch.jar) in my android project, Some problems arise. When I call the .localSearch() method of my gsearch.Client object, a runtime error is occurring. The error message is: "java.lang.VerifyError: gsearch.Client". This message is occurring in the Dalvik Debug Monitor log. So what is the problem here? Can I not use the search API on the android? More importantly, how do I do a local

Appengine Search API vs Datastore

你离开我真会死。 提交于 2019-11-30 03:04:34
I am trying to decide whether I should use App-engine Search API or Datastore for an App-engine Connected Android Project. The only distinction that the google documentation makes is ... an index search can find no more than 10,000 matching documents. The App Engine Datastore may be more appropriate for applications that need to retrieve very large result sets. Given that I am already very familiar with the Datastore: Will someone please help me, assuming I don't need 10,000 results? Are there any advantages to using the Search API versus using Datastore for my queries (per the quote above, it

Google Search API - Only returning 4 results

≡放荡痞女 提交于 2019-11-29 23:44:37
问题 After much experimenting and googling, the following Python code successfully calls Google's Search APi - but only returns 4 results: after reading the Google Search API docs, I thought the 'start=' would return additional results: but this not happen. Can anyone give pointers? Thanks. Python code: /usr/bin/python import urllib import simplejson query = urllib.urlencode({'q' : 'site:example.com'}) url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&%s&start=50' \ % (query) search

Alternative to the deprecated google REST web search API

瘦欲@ 提交于 2019-11-29 22:20:58
I have been using the Google Websearch API for over 1 year now. The service was deprecated in Nov 2010 but continues to provide results to date. More recently, google has started to enforce the 1,000 queries (?) per day limit on this deprecated service. I swear, last month I made over 10,000 API calls in one day without any errors from the service (same IP, same API key). So I guess my question is has anyone found an alternative yet? I know yahoo boss is pretty good but I am working exclusively on Google for my projects. I do not mind spending money for for this service either as long as i can

Google Search api for Android systems

不打扰是莪最后的温柔 提交于 2019-11-29 10:29:12
问题 I'm trying to build an android app that would do a local search on google. I know there is a Google Search API for Java, and I am able to use it for a desktop application. However, when I use the same jar file (gsearch.jar) in my android project, Some problems arise. When I call the .localSearch() method of my gsearch.Client object, a runtime error is occurring. The error message is: "java.lang.VerifyError: gsearch.Client". This message is occurring in the Dalvik Debug Monitor log. So what is

Appengine Search API vs Datastore

荒凉一梦 提交于 2019-11-29 00:45:33
问题 I am trying to decide whether I should use App-engine Search API or Datastore for an App-engine Connected Android Project. The only distinction that the google documentation makes is ... an index search can find no more than 10,000 matching documents. The App Engine Datastore may be more appropriate for applications that need to retrieve very large result sets. Given that I am already very familiar with the Datastore: Will someone please help me, assuming I don't need 10,000 results? Are