This method returns the articles for a given collection. There are two major methods here:
https://www.inoreader.com/reader/api/0/stream/contents
- returns JSON
objecthttps://www.inoreader.com/reader/atom
- Returns Atom
feed with the same structure as the JSON
object.The latter one is used for compatibility purposes. It's always adviseable to use the JSON
method and that's why it will be documented here exclusively.
Request:
https://www.inoreader.com/reader/api/0/stream/contents/[streamId]
Request parameters:
n
- Number of items to return (default 20
, max 1000
).
r
- Order. By default, it is newest first. You can pass o
here to get oldest first.
ot
- Start time (unix timestamp) from which to start to get items. If r=o
and the time is older than one month ago, one month ago will be used instead.
xt
- Exclude Target - You can query all items from a feed that are not flagged as read by setting this to user/-/state/com.google/read
.
it
- Include Target - You can query for a certain label with this. Accepted values: user/-/state/com.google/starred
, user/-/state/com.google/like
.
c
- Continuation - a string used for continuation process. Each response returns not all, but only a certain number of items. You'll find in the JSON response a string called continuation
. Just add that string as argument for this parameter, and you'll retrieve next items. If the continuation
string is missing, then you are at the end of the stream.
output
- if you prefer JSON object pass json here. Note that reader/api/0/stream/contents
always returns json object, while reader/atom
returns XML by default.
includeAllDirectStreamIds
- set this to false
if you want to receive only manually added tags in the categories
list. Otherwise automatically added tags from the folders will be populated there too.
streamId
is not a parameter. It is appended to the URL, but it's important to URL encode it first. See Stream IDs.
Example requests:
Get the unread articles from Ars Technica Science feed:
https://www.inoreader.com/reader/api/0/stream/contents/feed%2Fhttp%3A%2F%2Ffeeds.arstechnica.com%2Farstechnica%2Fscience1&xt=user/-/state/com.google/read
Get the oldest articles from Google folder:
https://www.inoreader.com/reader/api/0/stream/contents/user%2F-%2Flabel%2FGoogle?r=o
Example response:
{
direction: "ltr",
id: "user/-/label/Google",
title: "Reading List",
description: "",
self: {
href: "https://www.inoreader.com/reader/api/0/stream/contents/user%2F-%2Flabel%2FGoogle?r=o&n=3"
},
updated: 1424637593,
updatedUsec: "1424637593264558",
items: [{
crawlTimeMsec: "1422046342882",
timestampUsec: "1422046342881684",
id: "tag:google.com,2005:reader/item/00000000f8b9270e",
categories: [
"user/1005921515/state/com.google/reading-list",
"user/1005921515/state/com.google/read",
"user/1005921515/label/Google"
],
title: "Through the Google lens: Search trends January 16-22",
published: 1422046320,
updated: 1422669611,
canonical: [{
href: "http://feedproxy.google.com/~r/blogspot/MKuf/~3/_Hkdwh7yKMo/through-google-lens-search-trends_23.html"
}],
alternate: [{
href: "http://feedproxy.google.com/~r/blogspot/MKuf/~3/_Hkdwh7yKMo/through-google-lens-search-trends_23.html",
type: "text/html"
}],
summary: {
direction: "ltr",
content: "..."
},
author: "Emily Wood",
likingUsers: [],
comments: [],
commentsNum: -1,
annotations: [],
origin: {
streamId: "feed/http://feeds.feedburner.com/blogspot/MKuf",
title: "The Official Google Blog",
htmlUrl: "http://googleblog.blogspot.com/"
}
}, {
crawlTimeMsec: "1422263983452",
timestampUsec: "1422263983452401",
id: "tag:google.com,2005:reader/item/00000000f9ccc3f9",
categories: [
"user/1005921515/state/com.google/reading-list",
"user/1005921515/state/com.google/read",
"user/1005921515/label/Google"
],
title: "Google Maps Engine deprecated",
published: 1422262271,
updated: 1422538193,
canonical: [{
href: "http://feedproxy.google.com/~r/GoogleEarthBlog/~3/HqKBr0Se8K8/google-maps-engine-deprecated.html"
}],
alternate: [{
href: "http://feedproxy.google.com/~r/GoogleEarthBlog/~3/HqKBr0Se8K8/google-maps-engine-deprecated.html",
type: "text/html"
}],
summary: {
direction: "ltr",
content: "..."
},
author: "Timothy Whitehead",
likingUsers: [],
comments: [],
commentsNum: -1,
annotations: [],
origin: {
streamId: "feed/http://feeds.feedburner.com/GoogleEarthBlog",
title: "Google Earth Blog",
htmlUrl: "http://www.gearthblog.com/"
}
}, {
crawlTimeMsec: "1422283522174",
timestampUsec: "1422283522173992",
id: "tag:google.com,2005:reader/item/00000000f9efb84d",
categories: [
"user/1005921515/state/com.google/reading-list",
"user/1005921515/state/com.google/read",
"user/1005921515/label/Google"
],
title: "Strava maps runs, rides and fitness data using the Maps API",
published: 1422283440,
updated: 1422554242,
canonical: [{
href: "http://feedproxy.google.com/~r/GoogleforWork/~3/-GpQzKk4LJY/mapping-runs-rides-and-fitness-data-using-the-maps-API.html"
}],
alternate: [{
href: "http://feedproxy.google.com/~r/GoogleforWork/~3/-GpQzKk4LJY/mapping-runs-rides-and-fitness-data-using-the-maps-API.html",
type: "text/html"
}],
summary: {
direction: "ltr",
content: "..."
},
author: "Jane Smith",
likingUsers: [],
comments: [],
commentsNum: -1,
annotations: [],
origin: {
streamId: "feed/http://feeds.feedburner.com/OfficialGoogleEnterpriseBlog",
title: "Google Enterprise Blog",
htmlUrl: "http://googleforwork.blogspot.com/"
}
}],
continuation: "trMnkg7wWT62"
}
items
list:crawlTimeMsec
and timestampUsec
are the same date, the first with milisecond, the second with microsecond resolution. Use timestampUsec
whenever possible, because we need microsecond resultion.id
is the ID of the article. This is coming in the long id format. See Article ID formats.categories
is a list of properties for the article. Those can be:
user/-/state/com.google/reading-list
- it's a system tag. All articles from subscribed feeds have this.user/-/state/com.google/read
- this article has been readuser/-/state/com.google/starred
- this article has been starreduser/-/state/com.google/broadcast
- this article has been broadcasteduser/-/state/com.google/like
- this article has been likeduser/-/label/tag_name
- a tag with this name has been assigned to this article (note that articles in feeds that are assigned to folders will automatically receive the folder tag here.title
is the article title.published
is the published date for the article. This date is gathered from the publisher and may only be used for display purposes.updated
is set if the article was updated after it was fetched and represents the updated timestamp.canonical.href
is the article URL.summary.direction
is the detected direction (ltr
or rtl
) of the article content.summary.content
is the actual article content in HTML format.author
is the article author and can be empty in some cases.origin.streamId
is the originating feedId of the article.origin.title
is the feed title.