rss-parser
Lightweight RSS and Atom feed parser for Node.js and the browser that turns XML feeds into plain JavaScript objects
Repository Health
Technical Analysis
rss-parser is a small library that fetches or accepts RSS/Atom XML and converts it into a normalized JavaScript object with a title, description, link, and an items array - handling the inconsistencies between feed formats (RSS 2.0, Atom, dc: namespaced fields) so callers get a consistent shape regardless of the source feed’s dialect. Both parseURL (fetch and parse in one call) and parseString (parse an already-downloaded XML string) are supported, with either callback or Promise/async-await usage.
Built on top of xml2js for the underlying XML-to-object conversion, it adds feed-specific normalization on top: stripping HTML from a contentSnippet field, converting dates to ISO 8601, and unifying naming differences like Atom’s updated vs RSS’s pubDate. A customFields option lets consumers pull in feed-specific fields (like podcast <itunes:*> tags) that aren’t mapped by default, and a browser build is published in dist/ for use outside Node.
What You Get
parser.parseURL(url)to fetch and parse a feed in one call, andparser.parseString(xml)for already-downloaded XML- Normalized output fields across RSS and Atom - unified
items, ISO 8601isoDate,creator, and HTML-strippedcontentSnippet - A
customFieldsoption to map additional/non-standard XML tags (e.g. podcastitunes:fields) into the parsed feed or item objects - Configurable HTTP behavior - request timeout, custom headers, and max redirect count for
parseURL - A pre-built browser distribution in
dist/alongside the Node.js module, plus TypeScript type definitions with generic custom-field typing
Common Use Cases
- Building a feed reader or aggregator that ingests many different RSS/Atom feeds and needs a single consistent item shape
- Pulling blog or news updates into a Node.js backend for further processing, storage, or re-publishing
- Parsing podcast RSS feeds by mapping
itunes:namespaced fields via thecustomFieldsoption - Fetching and displaying a feed directly in the browser (with a CORS proxy) without a server-side component
Under The Hood
Architecture - The library is a thin, focused wrapper: lib/parser.js implements the Parser class with parseURL/parseString, delegating XML tokenization to xml2js and then running the result through lib/fields.js (defines the default RSS/Atom field mappings) and lib/utils.js (helpers for HTML stripping, date normalization, and applying customFields overrides); index.js is a 4-line entry point that just re-exports the Parser class. Tech Stack - Plain JavaScript (no TypeScript source, though index.d.ts ships hand-written types), depends on xml2js for XML parsing and entities for HTML entity decoding, built for the browser with Webpack 5, tested with Mocha/Chai plus Puppeteer for browser-environment verification. Code Quality - test/input and test/output hold golden-file fixtures for numerous real-world feeds (Reddit, podcasts, various blogs), and the test suite fails if any change alters the parsed output for those fixtures - a snapshot-style regression strategy that catches unintended parsing changes; however, the repo has had low recent commit activity, so newer edge cases may lag. API Design - The API mirrors common Node HTTP-client idioms (new Parser(), await parser.parseURL(url)) with both callback and Promise support, and the TypeScript definitions support generics (Parser<CustomFeed, CustomItem>) so custom fields get compile-time type checking.
Used by 7 apps in this directory
Helicone
Monitoring · AI Development · Analytics
An open-source AI gateway and LLM observability platform that routes requests to 100+ models while logging cost, latency, and full traces for every call.
Karakeep
Bookmarks Archiving
Self-hosted bookmark manager that captures links, notes, images, and PDFs with AI tagging, full-text search, and automatic archiving.
Linkwarden
Bookmarks Archiving · Knowledge Management
Self-hosted collaborative bookmark manager that captures full-page archives, enables annotation, and keeps your knowledge accessible forever.
n8n
Automation · No Code Platforms
Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.
Omnivore
Knowledge Management · Bookmarks Archiving · Note Taking
Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.
Postiz
Social Media · Automation
The agentic social media scheduler — AI-powered content creation, 33-platform posting, and team workflows, all self-hosted.
RSSHub
Automation · Social Media
Turn any website into an RSS feed — social media, streaming platforms, and niche sites all become subscribable in seconds.