Feedr is a service for parsing RSS and Atom feeds. You just pass the URL of an RSS/Atom feed and the service will return the parsed feed as JSON. Feedr was originally designed as a drop-in replacement for Google's Feed API, which has been deprecated and taken offline on December 15th, 2016.
Feedr has to be requested with the query parameterq
that contains the URL of the to-be-parsed RSS/Atom feed. An example request looks like this:
curl 'http://www.feedrapp.info/?q=http://www.ebaytechblog.com/feed/'
The result will look like this (please note that the output is slightly truncated):
{
"responseStatus": 200,
"responseDetails": null,
"responseData": {
"feed": {
"feedUrl": "http://www.ebaytechblog.com/feed/",
"title": "eBay Tech Blog",
"link": "http://www.ebaytechblog.com",
"description": "Where e-commerce meets world-class technology",
"author": "",
"entries": [
{
"title": "A Surprising Pitfall of Human Judgement and How to Correct It",
"link": "http://www.ebaytechblog.com/2017/05/04/a-surprising-pitfall-of-human-judgement-and-how-to-correct-it/",
"content": "Introduction
\nAlgorithms based on machine learning, deep learning, and AI are in the news these days. Evaluating the quality of these algorithms is usually done using human judgment. For example, if an algorithm claims to detect whether an image contains a pet, the claim can be checked by selecting a sample of images, using human judges to detect if there is a pet, and then comparing this to the results to the algorithm. This post discusses a pitfall in using human judgment that has been mostly overlooked until now.
\nIn real life, human judges are imperfect. This is especially true if the judges are crowdsourced. This is not a new observation. Many proposals to process raw judgment scores and improve their accuracy have been made. They almost always involve having multiple judges score each item and combining the scores in some fashion. The simplest (and probably most common) method of combination is majority vote: for example, if the judges are rating yes/no (for example, is there a pet), you could report the rating given by the majority of the judges.
\n",
"contentSnippet": "Introduction\nAlgorithms based on machine learning, deep learning, and AI are in the news these days. Evaluating the qual",
"publishedDate": "2017-05-04T17:00:10.000Z",
"categories": [
{ "name": "Applied Math" },
{ "name": "Machine Learning" },
{ "name": "Mathematics" }
],
"author": "David Goldberg"
},
/* ... */
]
}
}
}
It is also possible to provide several feed URLs separated by commas. Please note, that this feature is experimental and might change in the future!
Here is an example:
curl 'http://www.feedrapp.info/?q=http://www.ebaytechblog.com/feed/,https://www.contentful.com/blog/feed.xml'
Feedr will now query all of the provided feeds and append all entries to the first feed. The result looks like this:
{
"responseStatus": 200,
"responseDetails": null,
"responseData": {
"feed": {
/* The meta data is extract from the first feed URL */
"feedUrl": "http://www.ebaytechblog.com/feed/",
"title": "eBay Tech Blog",
"link": "http://www.ebaytechblog.com",
"description": "Where e-commerce meets world-class technology",
"author": "",
"entries": [
{ /* Entry 1 of ebaytechblog.com */ },
{ /* ... */ }
{ /* Entry n of ebaytechblog.com */ },
{ /* Entry 1 of contentful.com */ },
{ /* ... */ }
{ /* Entry n of contentful.com */ },
]
}
}
}
In addition to theq
parameter, Feedr supports other optional parameters.
Parameter | Description | Examples |
---|---|---|
callback | Wraps the answer in a function call, which makes it compatible to JSONP calls | callback=callback123456789 |
num | Number of entries to load. Defaults to 4. | num=15 |
encoding | The text encoding of the to be parsed feed. Defaults to "utf8". Find supported values here. | encoding=ISO-8859-1 |
order | Specifies the order of entries. By default there is no ordering happening and the entries are kept in the order of the original RSS feed. The order can be overridden by providing any of the entry's fields (e.g. publishedDate, title, …). In order to reverse the order, just prefix the field with a - . | order=title order=-publishedDate |
Since the publicly available version of Feedr can be used by everybody, it might be unstable from time to time. If this is unacceptable for you, you can run your own dedicated version of the API yourself. The easiest way to get started is probably via Heroku:
git clone [email protected]:sdepold/feedrapp.git
cd feedrapp
heroku create
git push heroku master
heroku open
In order to run the app locally, you can execute the following steps:
git clone [email protected]:sdepold/feedrapp.git
cd feedrapp
yarn
yarn start
The app will now start on port 8080 and can be queried like this:
curl http://localhost:8080/?q=http://www.ebaytechblog.com/feed/
Since v1.5.0 every requested RSS feed is cached for 30 minutes. This value might be configurable in the future. Pull requests are welcome. The change was introduced because the app received too much traffic to function fine on Heroku – and because it just makes sense.