Reputation: 4445
does any one has idea how to get google page index in Java? I was googleing since last 2-3 days but helpless, can any one refer me API for that or give some suggestion for how to do that
Lots of thanks in advance
For example if we search for facebook in google, we get around 22,980,000,000 results. So I want to fetch this number using JAVA
Upvotes: 0
Views: 593
Reputation: 2534
make a corresponding HTTP request from Java to Google, then parse the replied HTML code. There is a div with the ID resultStats
. This div contains the number of results.
Upvotes: 1
Reputation: 14373
Not sure what your real requirement is, what kind of index do you want? Google export fairly a bit amount of APIs via RESTful service, some of them are packaged with JavaScript lib like Google MAP API. There are also Java client library for OAUTH authentication
The custom search API information could be found at http://code.google.com/apis/customsearch/v1/overview.html. A comprehensive list of google APIs could be accessed at https://code.google.com/apis/console
Upvotes: 0