Coder Social home page Coder Social logo

pandimadhubabu / feed-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krismuniz/feed-api

0.0 1.0 0.0 62 KB

Spin up your own microservice for parsing RSS feeds, fetching items' metadata, and converting them to JSONFeed

License: MIT License

JavaScript 100.00%

feed-api's Introduction

FeedAPI

Code-Style:Standard License:MIT

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.

How it works

Infographic: How FeedAPI works

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.

Usage

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.

Example

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

One-click Cloud Deploys

You can deploy a FeedAPI server to any of these services with just one click!

Deploy

Deploy to now

Remix on Glitch

Deploy Locally

Clone the Repo

$ git clone [email protected]:krismuniz/feed-api.git feed-api

Install dependencies

$ npm install

Start the server with a PORT environment variable (default port is 3000)

$ PORT=3000 npm start

License

MIT © Kristian Muñiz

feed-api's People

Contributors

krismuniz avatar pandimadhubabu avatar jsdelivrbot avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.