Google Reader API for Cocoa

Today I have just made the world a slightly better place. Better for Mac developers, that is. That’s because I have made an open-source Google Reader library for Cocoa. You can download the library from Github: GReader-Cocoa and hopefully you’ll like it enough to contribute patches.

Why yet another Google API library? Two reasons why, which you’ll read in the following two paragraphs.

For one, in case you don’t notice, Google Reader API is largely unofficial. Google is yet to provide a “blessed” way to access data from Google Reader. Sure you can find a few blog posts that describes how to access their API, but I’ve tried these and a large number of them are either confusing or not accurate (probably out of date and thus unintentionally inaccurate). You can also try to reverse-engineer Google’s AJAX scripts and try to document them yourself. It could work – until Google changes their API anyway and by then you will probably need to do it all over again.

Second reason is that there isn’t any Google Reader library for Cocoa. I did found a number of example codes in Python, PHP, or even JavaScript. But none for Cocoa, especially Cocoa for the Mac which I needed to integrate News Anchor with Google Reader. Furthermore Cocoa is primarily a GUI-application programming language** and you need to do things rather differently than with a server-side back-end programming languages. Simply wrapping Python or PHP code into a Cocoa class won’t do.

Why open source it and not just keep it to myself? That goes back to the first reason: Google Reader API is still not official and I need help. Google may break this API and we need to make it a community effort to keep the library up-to-date, at least until Google provides an official API documentation and hopefully Cocoa library.

As of now GReader-Cocoa is still very basic, it only provides a way to list out your Google Reader subscriptions. There still a long way to go needed to make this a full-fledged Cocoa Library for accessing and manipulating your Google Reader account. Your contributions and forks are welcome.

Special thanks to pyrfeed that provide the documentation to get me initially going. But it looks like the way they pass the SID back to other API calls is wrong. You’ll need to pass a special HTTP header to authenticate with the Reader API instead of setting a cookie. I found out the answer for Google Reader authentication in StackOverflow.

** Yes, I know Objective-C is the language whereas Cocoa is the library, but one without the other is kinda moot.



Avoid App Review rules by distributing outside the Mac App Store!


Get my FREE cheat sheets to help you distribute real macOS applications directly to power users.

* indicates required

When you subscribe you’ll also get programming tips, business advices, and career rants from the trenches about twice a month. I respect your e-mail privacy.

Avoid Delays and Rejections when Submitting Your App to The Store!


Follow my FREE cheat sheets to design, develop, or even amend your app to deserve its virtual shelf space in the App Store.

* indicates required

When you subscribe you’ll also get programming tips, business advices, and career rants from the trenches about twice a month. I respect your e-mail privacy.

0 thoughts on “Google Reader API for Cocoa

Leave a Reply