apifeedly

How to get all unread items using Feedly API


OK, either this is incredibly obvious and I'm just too dumb to see it, or it is not possible at all.

I created a Feedly developer access token and can call some end points just fine, like /profile, /categories, etc. Currently testing them with curl, but eventually will do this in Ruby.

What I can't find from the documentation (or even by Googling) is how to access all the unread entries from all my subscriptions just like I do in the Feedly app:

Feedly All Unread Items

As far as I understand, Streams are for specific feeds. And the closest thing to the All stream, I think, is the Global Resource Id "global.all". But when I call it according to the documentation I get "API handler not found".

curl -H 'Authorization: OAuth [<MY_ACCESS_TOKEN>]' http://cloud.feedly.com/v3/user/<MY_USER_ID>/category/global.all

{"errorCode":404,"errorId":"ap5int-sv2.2018082612.1607238","errorMessage":"API handler not found"}

At some point I thought maybe Feedly just doesn't support this and went and looked at Inoreader's API documentation and it looks pretty much the same. There is no /All stream where I can pull my unread entries. So I feel like I'm missing something very obvious here.

What I am trying to do:

Basically I want to create an app for myself where I pull all my unread entries and flag the ones I'm interested in as "Read Later". This is part of a bigger workflow app that I'm working on.


Solution

  • You're almost there. To get a stream of all your unread articles, the syntax would be:

    curl -H 'Authorization: OAuth <access token>' 'https://cloud.feedly.com/v3/streams/contents?streamId=user/<user id>/category/global.all&unreadOnly=true'
    

    The <user id> can be obtained by the Profile API which can be found here.

    The streams API is documented here. Hope this helps.