1

According to the answer in here, using Gson we can programmatically achieve to retrieve the result that Google will return to a query. Nonetheless, yet there are 2 questions are remaining in my mind:

  1. How can we do similar thing for Bing?
  2. How can we get more than 4 results based on the referred answer? Because the results.getResponseData().getResults().get(n).getUrl() for n>4 returns exception.
Community
  • 1
  • 1
seventeen
  • 219
  • 4
  • 12
  • if you read the second part of the answer in the question you linked, you'd know that the search API is now deprecated and thereby not to be used anymore. – Niklas Dec 08 '15 at 10:38
  • @Niklas But this is still in work. I can use it but only for the first 4 results. – seventeen Dec 08 '15 at 10:41
  • even if it might work partially, you should never use a deprecated API when setting up a new project. Period. – Niklas Dec 08 '15 at 10:43
  • @Niklas I know, but even before deprecated, it was still only working for the firs 4 answers. Even at the same link, the person gave another way for achieving it which I do not know how. So again, how to do such? – seventeen Dec 08 '15 at 10:46

1 Answers1

0

As @Niklas noted, google search api is deprecated, thus you should not use it for your project. Currently the only solution would be to get search result by http request to get a html search results and than parse it yourself.

In case of Bing, there is a search API, but it has a limited number of calls for free users. If you need to make a lot of requests, than you will have to pay for it. https://datamarket.azure.com/dataset/5BA839F1-12CE-4CCE-BF57-A49D98D29A44

Buyuk
  • 1,094
  • 1
  • 8
  • 23
  • Well, that means that they dont provide bing api for people from your country I guess. In that case you can try to find a workaround or like in the case of google - get an http results and parse it yourself. – Buyuk Dec 08 '15 at 13:27