top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

how to get google indexed page using api in C#

+3 votes
1,021 views

I want get Number of indexed pages of any website so, it will give me exact number of pages in google.
What I have tried:

Uri queryUri = new Uri(string.Format("http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=site:{0}", url));
using (WebClient client = new WebClient())
{
    string getString = client.DownloadString(queryUri);
    dynamic s = JsonConvert.DeserializeObject(getString);
    var IndexedPage = s["responseData"]["cursor"]["estimatedResultCount"].Value;
    lblIndexedPageRecv.Text = IndexedPage;
}

its working but not giving me right answer

my code is giving different values then other online webCheckers like one of this: http://www.pingler.com/seo-tools/tools/google-indexed-pages-checker

posted Nov 30, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
 
Best answer

I quickly checked http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=site:queryhome.com&filter=0 and total number of index pages were 3820 as my guess is total number of pages are about 4000 then I checked the count on pingler which gave me result as 6100 which is not possible as my site does not have so many pages. So pingler is giving wrong result.

I have not checked the code I assuming it to be correct.

answer Dec 1, 2013 by Salil Agrawal
Similar Questions
+2 votes

What are some of the best ways to build XML in C# code?

+4 votes

Is it possible to override this method? if yes then how can we achieve it?

...