Skip to content

Herman J. Radtke III

Hacking Google Reader API

I have wanted to replace the static Blogroll on my website with a listing of my Google Reader subscriptions. I figured this was easy and someone would have already made this a Wordpress plugin, but I was wrong. The Google Reader API is not yet official and not very well documented. I finally sat down to figure out exactly how to do this and with a little Google research I managed to hack together a working prototype.

The problem is broken down into two steps. The ClientLogin part of the Google Data Protocol must be used to obtain an Auth token. The ClientLogin is simply a GET request with three paramters. The service parameter gives the user access to the particular API. In this case, the service parameter value is "reader" for Google Reader. The next two parameters are email and password. These values are the same as what one would use to login to Google Reader using a normal webpage. The response will contain newline delimited key/value pairs. One of those pairs will be the Auth token.

Requests to the Google Reader API can then be made using this Auth token in an Authorization header. I chose to add the "output" parameter to my request so the response would be json instead of the default xml.

Here are some of the resources I used to figure this all out:

Using this prototype I will create a Wordpress widget to display my Google Reader subscription list and get rid of my static Blogroll.