Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggestions on how to access google webmaster tools' api through R?

I wish to access my Google Webmaster's tools' API via R.

I see from here:

http://code.google.com/apis/webmastertools/docs/2.0/reference.html

That it requires fetching a feed behind https and parsing it.

Any suggestions on how to do it?

like image 200
Tal Galili Avatar asked Oct 12 '10 21:10

Tal Galili


1 Answers

Based on some Googling, I'd say the RCurl library is your best bet for the HTTP stuff. They have a good example on how to do some basic operations and work with an XML payload: http://www.omegahat.org/RCurl/xmlParse.html

Like other GData services, the webmaster tools api is AtomPub-based XML. It should be fairly easy to parse using the XML library, but you'll need to code that yourself.

Googleanalytics4r mentioned by Brandon takes this same approach. See: https://github.com/sorenmacbeth/googleanalytics4r/blob/master/R/googleanalytics4r.R

like image 59
Chris Sears Avatar answered Nov 10 '22 11:11

Chris Sears