I'm trying to use a google search api using this code :
// perform search
WebQuery retreiver = new WebQuery(query);
retreiver.StartIndex.Value = 1;
retreiver.HostLangauge.Value = Languages.English;
IGoogleResultSet<GoogleWebResult> rawresults = GoogleService.Instance.Search<GoogleWebResult>(retreiver);
//declare results list
List<string> resultslist = new List<string>();
//add results to list
foreach (GoogleWebResult result in rawresults.Results)
{
resultslist.Add(result.Content);
}
with this api - Search AP
but i keep getting a object reference not set to an instance of an object error , could you please explain why and how its erroring?