Skip to Content
DevelopmentAPIOverview

Overview

A modern TypeScript library for parsing and generating RSS/Atom feeds.

Overview

rss.Today is a comprehensive TypeScript library for working with RSS and Atom feeds. It provides:

  • Multiple Format Support: RSS 0.9, RSS 1.0, RSS 2.0, Atom 1.0, and JSON Feed 1.0
  • Flexible Input Sources: Parse from URLs, strings, files, buffers, or streams
  • Feed Generation: Create feeds in any supported format
  • Feed Validation: Validate feeds against format specifications
  • Feed Conversion: Convert feeds between different formats
  • Feed Utilities: Merge, diff, filter, sort, and manipulate feeds
  • OPML Support: Parse and generate OPML subscription lists
  • Podcast Support: iTunes namespace extensions for podcast feeds
  • TypeScript: Fully typed with comprehensive type definitions
  • ESM: Modern ES modules

Installation

npm install rss.today
yarn add rss.today
pnpm add rss.today

Quick Start

Parsing Feeds

import { Parser } from 'rss.today'; const parser = new Parser(); // Parse from URL const feed = await parser.parseURL('https://example.com/feed.xml'); console.log(feed.title); console.log(feed.items); // Parse from XML string const xml = '<?xml version="1.0"?><rss version="2.0">...</rss>'; const feed = await parser.parseString(xml);

Generating Feeds

import { Feed } from 'rss.today'; const feed = new Feed({ title: 'My Blog', description: 'A blog about technology', link: 'https://example.com', id: 'https://example.com/feed', language: 'en', }); feed.addItem({ title: 'First Post', link: 'https://example.com/first-post', description: 'This is my first post', date: new Date(), }); // Generate RSS 2.0 const rss = feed.rss2(); // Generate Atom 1.0 const atom = feed.atom1(); // Generate JSON Feed 1.0 const json = feed.json1();

Documentation Sections

License

ISC

Repository

https://github.com/rssToday/rsstoday 

Last updated on