FeedAPI (i.e. feed-api
) is a simple, ready-to-use microservice for parsing RSS feeds, optimizing each item using metadata and converting them to JSONFeed format.
FeedAPI takes an RSS Feed link, parses it, scrapes and collects OpenGraph and <meta/>
tags data from each item to ensure all items have all the data necessary in the proper format, and finally it presents the results in a minimal, developer-friendly format, JSONFeed.
To get a specific feed, simply add that URL to the url
query parameter. Remember to safely escape it (e.g. use encodeURIComponent
or something). Optionally, you may pass a limit
query parameter to limit the number of items returned.
To get The Economist's Science and Technology RSS Feed, just pass the escaped url to the root (/
) endpoint.
curl https://your-url.now.sh/?url=http%3A%2F%2Fwww.economist.com%2Fsections%2Fscience-technology%2Frss.xml
A successfully-parsed rss feed will result in a feed
object with the following shape:
{
"version": "https://jsonfeed.org/version/1",
"title": "String (free-text)",
"homepage_url": "String (url)",
"feed_url": "String (url)",
"description": "String (free-text)",
"author": {
"name": "String (free-text)",
"url": "String (url)"
},
"items": [
{
"url": "String (url)",
"title": "String (free-text)",
"content_text": "String (free-text)",
"image": "String (url)",
"date_published": "String (date-format:rfc3339)",
"author":{
"name": "String (free-text)",
"url": "String (url)"
}
}
]
}
Not all fields will always be listed, it varies depending on the feed supplied. For more information, read the JSONFeed v1 Spec
You can deploy a FeedAPI server to any of these services with just one click!
$ git clone [email protected]:krismuniz/feed-api.git feed-api
$ npm install
$ PORT=3000 npm start