Google Search API for C #

Now that Google has stopped using its SOAP API, what can I use to search from C # code?

I know that they have a Javascript AJAX API - I implemented it and it works, but I just need to do the same, but from the backend code.

+6
c # api google-search-api asp.net-mvc
source share
2 answers

The AJAX API has a RESTful interface. Have a look here in the "Flash and Other Non-Javascript" section

For Flash developers and those who need access to the web search APIs from environments other than Javascript, the API provides a simple RESTful interface. In all cases, the supported method is GET, and the response format is a JSON-encoded dataset with built-in status codes.

+3
source share

This is a snippet of code, for writing only:

var searchTerm = "ABCD"; using (var web = new WebClient()) { web.Headers.Add("Referrer", "http://your-website-here/"); var result = web.DownloadString(String.Format( "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q={0}&key=your-key-here", searchTerm)); Console.WriteLine(result); } 
+4
source share

All Articles