Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Webmaster Tool API in c#

I want to use Google Webmaster Tool API in c# application. I have gone through different documents that are available on https://developers.google.com. Unfortunately I did not get any working example of using Google WT API using .Net . I have also seen the “Client Libraries” (“https://developers.google.com/gdata/docs/client-libraries”) for this.

Can anybody provide me any working example of how to use Google Webmaster Tool API in c# ?

I have account on Google WT, and want to download .CSV reports for “CrawlErrors”, “InternalLinks”,” TopSearchQueries” etc.

Thanks

like image 816
user2960249 Avatar asked Nov 06 '13 11:11

user2960249


People also ask

Is there an API for Google?

Google Cloud APIs are programmatic interfaces to Google Cloud Platform services. They are a key part of Google Cloud Platform, allowing you to easily add the power of everything from computing to networking to storage to machine-learning-based data analysis to your applications.

Are Google APIs open source?

Google's API client libraries are produced with open source tools and automation.

What is API console?

The Console API provides functionality to allow developers to perform debugging tasks, such as logging messages or the values of variables at set points in your code, or timing how long an operation takes to complete.


1 Answers

Here you can find the official C# library source code for Webmaster Tools Data API:
http://google-gdata.googlecode.com/svn/trunk/clients/cs/src/webmastertools/

And here you can find examples of usage in the form of unit tests:
http://google-gdata.googlecode.com/svn/trunk/clients/cs/src/unittests/webmastertools/

More specifically, examples of authentication, QuerySites, QuerySitemaps, QueryKeywords, etc.:
http://google-gdata.googlecode.com/svn/trunk/clients/cs/src/unittests/webmastertools/WebmasterToolsServiceTest.cs

Note also there are some bug reports, your mileage may vary: http://productforums.google.com/forum/#!topic/webmasters/gh7vCzYfm6A

If you're still getting 403 Forbidden, the reason behind this might be the 2-Step Verification installed on your Google account. If that's the case, try generating a dedicated password in the Application-specific passwords section of your Google account, and use it with GDataCredentials(this.userName, this.passWord).

Alternatively, you may try adding sub-accounts at https://www.google.com/webmasters/tools/user-admin and use of one of them. The 2-Step Verification concern may apply to those accounts, too.

like image 125
noseratio Avatar answered Sep 18 '22 19:09

noseratio