Feed Reader

FREEMIUM
By PWSHub | Updated 5일 전 | Data
Popularity

8.6 / 10

Latency

721ms

Service Level

100%

Health Check

100%

Followers: 2
Resources:
Product Website
API Creator:
Rapid account: PWS Hub
PWSHub
pwshub
Log In to Rate API
Rating: 5 - Votes: 1

README

Feed Reader API

Stay ahead of the information curve with Feed Reader, a powerful API designed to simplify the process of extracting feed data from various sources.

Key Features

  • Broad Format Support: process feeds in RSS, ATOM, RDF, and JSON Feed formats, ensuring compatibility with a wide range of content providers.
  • Normalized Output: eliminate the need for manual data parsing. Feed Reader delivers normalized data, making it readily usable in your applications.

Authentication

Include the following headers in your requests:

  • X-RapidAPI-Key: your unique RapidAPI key obtained upon registration
  • X-RapidAPI-Host: set to feed-reader1.p.rapidapi.com

Request Parameters

  • url (required): provide the URL of the RSS source you wish to extract feed data from
  • normalization (optional): can be set to yes or no, default to yes. If you want to get raw data, just specify no
  • iso_date_format (optional): can be set to yes or no, default to yes means that the datetime values will be converted to ISO 8601 standard. If you want to get original date format, just specify no.

Example

Request from Node.js server

We love native approach with build-in fetch util:

import querystring from 'node:querystring'

export async function extract (url)  {
  try {
    const queryString = querystring.stringify({
      url,
      normalize: 'yes',
      iso_date_format: 'yes',
    })

    const target = `https://feed-reader1.p.rapidapi.com/feed/parse?${queryString}`
    
    const res = await fetch(target, {
      headers: {
        'X-RapidAPI-Key': 'YOUR_OWN_RAPID_API_KEY',
        'X-RapidAPI-Host': 'feed-reader1.p.rapidapi.com'
      },
    })
    const json = await res.json()
    return json
  } catch (err) {
    console.error(err)
    return null
  }
}

const data = await extract('https://a16z.com/feed/')
console.log(data)

Of course you can use axios or other alternatives exist for sending requests:

import axios from 'axios'

const options = {
  method: 'GET',
  url: 'https://feed-reader1.p.rapidapi.com/feed/parse',
  params: {
    url: 'https://a16z.com/feed/',
    normalize: 'yes',
    iso_date_format: 'yes',
  },
  headers: {
    'X-RapidAPI-Key': 'YOUR_OWN_RAPID_API_KEY',
    'X-RapidAPI-Host': 'feed-reader1.p.rapidapi.com'
  }
}

try {
  const response = await axios.request(options);
  console.log(response.data);
} catch (error) {
  console.error(error);
}

Response in JSON format:

{
  "error": 0,
  "message": "Feed extraction success",
  "data": {
    "title": "Andreessen Horowitz",
    "link": "https://a16z.com/",
    "description": "Software Is Eating the World",
    "language": "en-US",
    "generator": "https://wordpress.org/?v=6.4.3",
    "published": "2024-04-26T22:21:19.000Z",
    "entries": [
      {
        "id": "https://a16z.com/?post_type=podcast&p=365832",
        "title": "Vector Databases and the Power of RAG",
        "link": "https://a16z.com/podcast/vector-databases-and-the-power-of-rag/",
        "published": "2024-04-26T14:00:07.000Z",
        "description": "In this episode of the AI + a16z podcast, Pinecone Founder and CEO Edo Liberty joins a16z’s Satish Talluri and Derrick Harris to discuss the promises, challenges, and opportunities for vector databases and retrieval augmented generation (RAG). He..."
      },
      {
        "id": "https://a16z.com/?p=365435",
        "title": "Forecasting Fintech’s Future and Keeping Culture Alive: A Q&A with the CEOs of BILL and Mercury",
        "link": "https://a16z.com/forecasting-fintechs-future-with-the-ceos-of-bill-and-mercury/",
        "published": "2024-04-23T14:00:32.000Z",
        "description": "At a16z’s recent Connect/Fintech event, a16z Partner Alex Immerman sat down for a broad conversation with Immad Akhund, co-founder and CEO of Mercury, and René Lacerte, founder and CEO of financial services company BILL. They discussed the..."
      },
      // more entries...
    ]
  }
}

If something wrong, the API will return:

{
  "error": 1,
  "message": "error description",
  "data": null
}