NewsBlur is a personal news reader that brings people together to talk about the world. A new sound of an old instrument.
NewsBlur's API allows users to retrieve their feeds, feed counts, feed icons, feed statistics, and individual feed stories. No API key is required, but you are required to authenticate before using any of the API endpoints. Please be considerate, and don't hammer our servers.
We're quite pleased to point out that this entire API is open-source, including the implementation of the endpoints. You can find the source of the /reader/ views source, /social/ views source, /rss_feeds/ views source, as well as the API definitions in YAML.
We love pull requests. If you want to add an endpoint, modify output, or make something better, NewsBlur's repo on Github is the place to make that happen.
NewsBlur supports OAuth but to have an OAuth enabled client you must email Samuel to request a client ID and secret. You will need to provide your NewsBlur username, redirect URI (often just your client app's website), and app name.
To use OAuth when authenticating requests, be sure to pass the Bearer HTTP header with
every request, just as you would on any other OAuth API. Use the /oauth/authorize
endpoint to begin the OAuth authentication procedure. Use the /oauth/token
endpoint to receive your authorized token, which you can pass in with every request.
You are not required to use OAuth, in which case you will need to pass the newsblur_sessionid
cookie with every request. This cookie is set on login.
/api/login
/api/logout
/api/signup
/rss_feeds/search_feed
/reader/feeds
/reader/favicons
/reader/page/:id
/reader/refresh_feeds
/reader/feeds_trainer
/rss_feeds/statistics/:id
/rss_feeds/feed_autocomplete
/reader/feed/:id
/rss_feeds/original_text
/rss_feeds/original_story
/reader/starred_stories
/reader/starred_story_hashes
/reader/river_stories
/reader/river_stories
/reader/unread_story_hashes
/reader/read_stories
/reader/mark_story_hashes_as_read
/reader/mark_story_as_read
/reader/mark_feed_stories_as_read
/reader/mark_social_stories_as_read
/reader/mark_story_hash_as_unread
/reader/mark_story_hash_as_starred
/reader/mark_story_hash_as_unstarred
/reader/mark_feed_as_read
/reader/mark_all_as_read
/social/river_stories
/social/share_story
/social/unshare_story
/social/load_user_friends
/social/profile
/social/load_user_profile
/social/save_user_profile
/social/interactions
/social/activities
/social/follow
/social/unfollow
/social/mute_user
/social/unmute_user
/social/feed_trainer
/social/public_comments
/social/save_comment_reply
/social/remove_comment_reply
/social/like_comment
/social/remove_like_comment
/social/find_friends
/social/rss/:user_id/:username
/social/stories/:user_id/:username
/social/page/:user_id/:username
/social/settings/:user_id/:username
/social/statistics/:user_id/:username
/reader/add_url
/reader/add_folder
/reader/move_feed_to_folder
/reader/move_folder_to_folder
/reader/rename_feed
/reader/delete_feed
/reader/rename_folder
/reader/delete_folder
/reader/save_feed_order
/reader/save_search
/reader/delete_search
/classifier/:id
/classifier/save
/import/opml_export
/import/opml_upload
Parameter | Description | Default | Example |
---|---|---|---|
username | Required Username | samuelclay |
|
password | Optional Password | new$blur |
Parameter | Description | Default | Example |
---|---|---|---|
address | Required Searches the RSS and website address and returns a feed. | techcrunch.com |
|
offset | Optional Try paging through feeds found by using the offset. | 1 |
Parameter | Description | Default | Example |
---|---|---|---|
include_favicons | Optional Include favicons inline. Since they can be time consuming to download, you can optionally turn them off. Use /api/v1/feeds/favicons/ to retrieve the favicons in a separate request. | false |
true/false |
flat | Optional Returns a flat folder structure instead of nested folders. Useful when displaying all folders in a single depth without recursive descent. | false |
true/false |
update_counts | Optional Forces recalculation of unread counts on all feeds. The preferred method is to call this endpoint without updated counts, then call refresh_feeds to get updated counts. That way you can quickly show the user's feeds, then update the counts. Turning this option on will lead to a slower load-time. | false |
true/false |
/reader/refresh_feeds
to get updated unread counts.include_favicons
if you can either cache favicons or can wait to fetch them.
/reader/feeds
and include_favicons=false
, so the feeds request contains far less data. Useful for mobile devices, but requires a second request.
Parameter | Description | Default | Example |
---|---|---|---|
feed_ids | Optional Array of feed ids. Leave empty to retrieve all active (enabled) feeds. | feed_ids=12&feed_ids=24 |
<img src="data:image/png;base64,[IMAGE_DATA_STRING]" />
Parameter | Description | Default | Example |
---|---|---|---|
feed_id | Optional Only use a single feed. Omit this to get the classifiers for all feeds at once. | 42 |
/classifiers/:id
.Parameter | Description | Default | Example |
---|---|---|---|
term | Optional Phrase to search for in feed address, url, and title. | tech |
Parameter | Description | Default | Example |
---|---|---|---|
page | Optional Page of stories, starting from 1. | 1 |
2 |
order | Optional Story order by oldest or newest first | newest |
oldest |
read_filter | Optional Show all stories or only unread stories | all |
unread |
include_hidden | Optional Use this if you want to show hidden stories (provided you have a "Show Hidden Stories" button). All native NewsBlur apps (web, ios, android) use this. | false |
true |
include_story_content | Optional If you're just checking for story ids and meta-data, you don't need the story content, thus reducing bandwidth. | true |
false |
query | Optional Search for a keyword or phrase in the feed. Note that only premium users can search feeds. | pizza |
compute_story_score
in reader_utils.js on GitHub. Alternatively, you can use the score
parameter.
ps
: positive/focus countnt
: neutral/unread countng
: negative/hidden counthidden_stories_count
is non-zero. Don't rely on the stories
list being empty to assume that's when to stop paging.
Parameter | Description | Default | Example |
---|---|---|---|
story_hash | Required A story hash to fetch. | story_hash=123:a1d62b
|
Parameter | Description | Default | Example |
---|---|---|---|
story_hash | Required A story hash to fetch. | story_hash=123:a1d62b
|
Parameter | Description | Default | Example |
---|---|---|---|
page | Optional Page of starred stories, starting from 1. | 1 |
2 |
h | Optional Pass up to 100 story_hashes. Use with starred_story_hashes. | h=a1b2c3&h=d4e5f6 |
|
tag | Optional Only load stories under a specific saved story tag. | pizza |
|
highlights | Optional Only load stories that have highlighting. | true |
|
query | Optional Search for a keyword or phrase in the starred story feed. Note that only premium users can search feeds. | pizza |
Parameter | Description | Default | Example |
---|---|---|---|
include_timestamps | Optional Including timestamps for starred_date |
h
param.Parameter | Description | Default | Example |
---|---|---|---|
feeds | Required Feed ids to use in the river. Usually every feed in a folder with unread stories. | feeds=12&feeds=24 |
|
page | Optional Page of stories, starting from 1. | 1 |
2 |
order | Optional Story order by oldest or newest first | newest |
oldest |
read_filter | Optional Show all stories or only unread stories | unread |
all |
include_hidden | Optional Use this if you want to show hidden stories (provided you have a "Show Hidden Stories" button). All native NewsBlur apps (web, ios, android) use this. | false |
true |
query | Optional Search for a keyword or phrase in the folder. Note that only premium users can search feeds. | pizza |
|
infrequent |
Optional
Show only stories from infrequently published sites. Specify the number of stories/month (default: 30) or specify false .
|
false |
30 |
ps
: positive/focus countnt
: neutral/unread countng
: negative/hidden counthidden_stories_count
is non-zero. Don't rely on the stories
list being empty to assume that's when to stop paging.
unread_story_hashes
to store stories for offline use.Parameter | Description | Default | Example |
---|---|---|---|
h | Required Pass up to 100 story_hashes. Use with unread_story_hashes. | h=468:a1b2c3&h=7531:d4e5f6 |
Parameter | Description | Default | Example |
---|---|---|---|
feed_id | Optional Feed ids to check. Omit to include every feed subscription. | feed_id=12&feed_id=24 |
|
include_timestamps | Optional Including timestamps for story_date |
Parameter | Description | Default | Example |
---|---|---|---|
page | Optional Page of stories, starting from 1. | 1 |
2 |
order | Optional Story order by oldest or newest first | newest |
oldest |
Parameter | Description | Default | Example |
---|---|---|---|
story_hash | Required List of story hashes to mark as read. | story_hash=123:a1d62b&story_hash=1456789:4e3c12
|
story_hash
to mark_story_hashes_as_read
.Parameter | Description | Default | Example |
---|---|---|---|
story_id | Required List of story ids to mark as read. | story_id=http://blog.newsblur.com/post/1&story_id=http://blog.newsblur.com/post/2
|
|
feed_id | Required Feed id that each story is from. | 42 |
story_hash
to mark_story_hashes_as_read
.Parameter | Description | Default | Example |
---|---|---|---|
feeds_stories | Required JSON serialized dictionary of feed_ids to an array of story_ids. | { |
story_hash
to mark_story_hashes_as_read
.Parameter | Description | Default | Example |
---|---|---|---|
users_feeds_stories | Required JSON serialized dictionary of user_ids to feed_ids to an array of story_ids. | { |
message
parameter returned back to you.
Parameter | Description | Default | Example |
---|---|---|---|
story_hash | Required A story hash to mark as unread. | story_hash=123:a1d62b
|
Parameter | Description | Default | Example |
---|---|---|---|
story_hash | Required Story to save, specified by hash. | 64:a295ed |
|
user_tags | Optional Tags for the saved story | ['cooking', 'blogs'] |
|
highlights | Optional Strings to highlight | ['For example', 'this sentence is highlighted.'] |
user_tags[]=blog&user_tags[]=cooking
Parameter | Description | Default | Example |
---|---|---|---|
story_hash | Required Story to unsave, specified by hash. | 64:a295ed |
Parameter | Description | Default | Example |
---|---|---|---|
feed_id | Required List of feed ids to mark as read. | feed_id=12&feed_id=24 |
|
cutoff_timestamp | Optional Timestamp for older/newer cutoff. | 1400777921 |
|
direction |
Optional
Older or newer stories should be marked as read. Use with cutoff_timestamp
|
older |
Parameter | Description | Default | Example |
---|---|---|---|
social_user_ids | Required User ids to use in the river. | feed_id=12&feed_id=24 |
|
page | Optional Page of stories, starting from 1. | 1 |
2 |
order | Optional Story order by oldest or newest first | newest |
oldest |
Parameter | Description | Default | Example |
---|---|---|---|
feed_id | Required Feed id that the story is from. | 42 |
|
story_id | Required Story id to share. | http://blog.newsblur.com/post/1 |
|
comments | Optional The meat of the share. | 42 |
|
source_user_id | Optional If the story is being re-shared from another blurblog, note the user_id of the original sharer. | 128 |
|
post_to_services | Optional List of services to cross-post to. Can be 'twitter' and/or 'facebook'. | post_to_services=twitter&post_to_service=facebook |
|
format | Optional Return JSON or a HTML template | json |
html |
Parameter | Description | Default | Example |
---|---|---|---|
feed_id | Required Feed id that the story is from. | 42 |
|
story_id | Required Story id to remove the existing share. | http://blog.newsblur.com/post/1 |
|
format | Optional Return JSON or a HTML template | json |
html |
Parameter | Description | Default | Example |
---|---|---|---|
user_id | Required User id of user | 42 |
Parameter | Description | Default | Example |
---|---|---|---|
location | Optional Hometown | New York City |
|
bio | Optional 160 character bio. | Developer. API Designer. |
|
website | Optional Website address | http://www.samuelclay.com |
|
photo_service | Optional Which photo service to use: twitter, facebook, gravatar. | twitter |
Parameter | Description | Default | Example |
---|---|---|---|
user_id | Optional ID of user. Defaults to current logged in user. | 42 |
|
page | Optional 4 interactions per page. | 2 |
|
format | Optional JSON or HTML template | json |
html |
Parameter | Description | Default | Example |
---|---|---|---|
user_id | Optional ID of user. Defaults to current logged in user. | 42 |
|
page | Optional 4 activities per page. | 2 |
|
format | Optional JSON or HTML template | json |
html |
Parameter | Description | Default | Example |
---|---|---|---|
user_id | Required ID of user to follow. | 42 |
Parameter | Description | Default | Example |
---|---|---|---|
user_id | Required ID of user to unfollow. | 42 |
Parameter | Description | Default | Example |
---|---|---|---|
user_id | Required ID of user to mute. | 42 |
Parameter | Description | Default | Example |
---|---|---|---|
user_id | Required ID of user to unmute. | 42 |
Parameter | Description | Default | Example |
---|---|---|---|
user_id | Required ID of blurblog's user. | 42 |
reader/feed/:id
or /social/stories/:user_id
.
Parameter | Description | Default | Example |
---|---|---|---|
story_id | Required ID of shared story. | http://blog.newsblur.com/post/1 |
|
feed_id | Required ID of feed for the shared story. | 42 |
|
format | Optional JSON or HTML template | json |
html |
Parameter | Description | Default | Example |
---|---|---|---|
story_feed_id | Required ID of feed the story belongs to. | 42 |
|
story_id | Required ID of story being commented on. | http://blog.newsblur.com/post/1 |
|
comment_user_id | Required ID of user who left the original comment that is now being replied to. | 64 |
|
reply_comments | Required The content of the reply. | Brilliant analysis. |
|
reply_id | Optional If editing an existing reply, provide the original reply id so the correct reply can be overwritten. | 5000...0042 |
|
format | Optional Return JSON or a HTML template | json |
html |
Parameter | Description | Default | Example |
---|---|---|---|
story_feed_id | Required ID of feed the story belongs to. | 42 |
|
story_id | Required ID of story being commented on. | http://blog.newsblur.com/post/1 |
|
comment_user_id | Required ID of user who left the original comment that is now being replied to. | 64 |
|
reply_id | Optional The reply's id | 5000...0042 |
|
format | Optional Return JSON or a HTML template | json |
html |
Parameter | Description | Default | Example |
---|---|---|---|
story_feed_id | Required ID of feed the story belongs to. | 42 |
|
story_id | Required ID of story being commented on. | http://blog.newsblur.com/post/1 |
|
comment_user_id | Required ID of user who left the original comment that is now being replied to. | 64 |
|
format | Optional Return JSON or a HTML template | json |
html |
Parameter | Description | Default | Example |
---|---|---|---|
story_feed_id | Required ID of feed the story belongs to. | 42 |
|
story_id | Required ID of story being commented on. | http://blog.newsblur.com/post/1 |
|
comment_user_id | Required ID of user who left the original comment that is now being replied to. | 64 |
|
format | Optional Return JSON or a HTML template | json |
html |
Parameter | Description | Default | Example |
---|---|---|---|
query | Required Username, email, or part of a blurblog title. | samuel |
username
url parameter is optional. It's just recommended if you have it.
Parameter | Description | Default | Example |
---|---|---|---|
order | Optional Story order by oldest or newest first | newest |
oldest |
read_filter | Optional Show all stories or only unread stories | all |
unread |
username
url parameter is optional. It's just recommended if you have it.
username
url parameter is optional. It's just recommended if you have it.
Parameter | Description | Default | Example |
---|---|---|---|
url | Required URL of website or RSS feed. | http://blog.newsblur.com |
|
folder | Optional Folder to place feed in. Omit to use top level. | [Top Level] |
Blogs |
http://www.newsblur.com/?url=%u
Parameter | Description | Default | Example |
---|---|---|---|
folder | Required Folder name | Photo-blogs Extraordinaire |
|
parent_folder | Optional Existing folder to create new folder inside of. Omit for top level. | [Top Level] |
All Blogs |
Parameter | Description | Default | Example |
---|---|---|---|
feed_id | Required Feed id. | 12 |
|
in_folder | Required Current folder the feed is in. Necessary to disambiguate if a feed is in multiple folders. | Blogs |
|
to_folder | Required Folder the feed is going into. | Tumblrs |
Parameter | Description | Default | Example |
---|---|---|---|
folder_name | Required Name of folder being moved. | Tumblrs |
|
in_folder | Required Current folder the folder is in. Necessary to disambiguate if a folder name is in multiple folders. (Please don't let this happen.) | Blogs |
|
to_folder | Required New folder the existing folder is going into. | Daily Blogs |
Parameter | Description | Default | Example |
---|---|---|---|
feed_title | Required New feed title. | NYTimes |
|
feed_id | Required Feed id of the feed to be renamed. | 42 |
in_folder
parameter to remove a feed from the correct folder, in case the user is subscribed to the feed in multiple folders.
Parameter | Description | Default | Example |
---|---|---|---|
feed_id | Required Feed id of feed to remove. | 42 |
|
in_folder | Optional Name of folder the feed is in. | News |
Parameter | Description | Default | Example |
---|---|---|---|
folder_to_rename | Required Original folder name. | Photoblogs |
|
new_folder_name | Required New folder name. | East Coast Photoblogs |
|
in_folder | Required Name of parent folder, used to find the folder. | Blogs |
Parameter | Description | Default | Example |
---|---|---|---|
folder_to_delete | Required Name of folder to delete. | Photoblogs |
|
in_folder | Optional Name of parent folder, used to find the folder. Omit if folder is top level. | Blogs |
|
feed_id | Optional List of feed ids in the folder that's being deleted. These feeds also get removed. | feed_id=12&feed_id=24 |
Parameter | Description | Default | Example |
---|---|---|---|
folders | Required Object with folders and feed ids. | [12, 24, 36, |
Parameter | Description | Default | Example |
---|---|---|---|
feed_id | Required A single feed id of feed to search. | 42 |
|
query | Required Search for a keyword or phrase in the feed. Note that only premium users can search feeds. | pizza |
/reader/feeds_trainer
for popular classifiers.
/reader/feed/:id
.
Parameter | Description | Default | Example |
---|---|---|---|
feed_id | Required ID of feed for the classifier. | 42 |
|
like_[TYPE] | Optional Positive score for TYPE <- [tag, author, title, feed] | like_author= |
|
dislike_[TYPE] | Optional Negative score for TYPE <- [tag, author, title, feed] | dislike_title= |
|
remove_like_[TYPE] | Optional Clear score for a classifier. | remove_like_author= |
|
remove_dislike_[TYPE] |
Optional
Functionally the same as remove_like_[TYPE] .
|
remove_dislike_title= |
like_tag[]=tech&like_tag[]=mobile
NewsBlur's API allows users to retrieve their feeds, feed counts, feed icons, feed statistics, and individual feed stories. No API key is required, but you are required to authenticate before using any of the API endpoints. Please be considerate, and don't hammer our servers.
If your project or application allows users to interact with data from NewsBlur, you must cite NewsBlur as the source of your data.
You may use the API commercially, by which we mean you may charge people money to use your project which itself uses the API. You may not, however, sell advertising against any data retrieved from NewsBlur's API. Essentially, you can charge money for your application or service, but not wrap NewsBlur in advertisements.
We reserve the right to revise these guidelines. If you violate the spirit of these terms, expect to be blocked without advance warning.