[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Data scrapping of google results in C#

Posted on 2009-03-31
2
Medium Priority
?
515 Views
Last Modified: 2012-05-06
Hi,
Can anyone please suggest a tutorial or good resource for data mining of Google results.
Actually I want to search a particular string in a Google and want to store them in my Access/MSSQL database.

Regards,
Mushi
0
Comment
Question by:Mushq
2 Comments
 
LVL 31

Assisted Solution

by:RiteshShah
RiteshShah earned 450 total points
ID: 24036762
0
 
LVL 23

Accepted Solution

by:
Tony McCreath earned 1050 total points
ID: 24037155
Google has discontinued registering for the soap api, however they do provide a new AJAX api in its place:

http://code.google.com/apis/ajaxsearch/

Here's some code I've played with...
// rsz=small    4
// rsz=large    8
// start=4      index based
 
string url = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&hl=en&rsz=large&start=0";
 
url += "&q=" + HttpUtility.UrlEncode("the search phrase");
 
url += "&key=XXXXXXXXXXXXXX";
 
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Referer = "http://www.mydomain.com/"; // Google requests you do this
 
WebResponse response = request.GetResponse();
 
StreamReader reader = new StreamReader(response.GetResponseStream());
 
string jsonResponse = reader.ReadToEnd();
 
// then parse the jsonResponse 

Open in new window

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question