'c# : get nr of google hits for a search term

I'm writing a C# forms app, and I have list of strings (descriptions of some thing or another). I'd like to sort that list based on the amount of hits Google returns for each string.

So how do I actually get the amount of google-hits for a specified search-term ? Do I need to go screen-scraping, or is there an easy solution ?

Cheers :)

Edit: To clarify and show my simplest case of use : Suppose I have a text input box, and a button "Get amount of hits"... When the button is pressed, I want a label to show the amount of hits Google returns for the specified text. So - in a desktop application, how do I get the amount of Google-hits for a specific string ?



Solution 1:[1]

Ugly way that comes to mind :

Launch request to http://www.google.com/search?q=your+request Extract number from <div id=resultStats>.

Yuk.

Solution 2:[2]

You can probably use the Google Custom Search API for this

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user703016
Solution 2 jeroenh