A Google Reader api. Programmed in ruby. This is an unofficial api. Licensed under the MIT license:


If you would like to implement your own methods, you can quite easily use the api class provided.

api = {:email => '', :password => 'the pass'}

# OR

api = {:auth => 'token'}

# OR If your token was getted from oauth2 (bearer token)

api = {:auth => 'token', :auth_type => :bearer}    

and then you can perform requests using the get_link and post_link methods.

# this will give the user info.
api.get_link "api/0/user-info"

# this will add a feed 
api.post_link 'api/0/subscription/edit', :s => "feed/#{url}" , :ac => :subscribe

The following methods all use the Api class, so there is no magic involved.

# password should be asked by the app using the api
# you probably don't want to type that in cleartext here
user = {:email => '', :password => 'the pass'}

# OR

user = {:auth => 'token'}

you can access your feeds from there


which will return an array of GoogleReader::Feed objects. then you can get the unread items, the read items, ...

hn = user.feeds.find {|feed| feed.title =~ /hacker news/i }
# return 3 unread items (ordered by date)
# return all the read items
# all the starred items

you get the idea. you can like items, star items, and mark them as read or unread.

hn.all_unread_items.each {|item| item.toggle_read}

subscribing to new feeds is also easy

user.subscriptions.add "any feed url here"

unsubscribing is best done via remove_if method

user.subscriptions.remove_if {|feed| feed.title =~ /hacker news/i}


  • provide nicer convenience methods. (user.subscriptions.feeds is not a good way to access your feeds).
  • labels should be part of the api.