Meet Feedsmith
Fast, all‑in‑one JavaScript parser and generator for RSS, Atom, RDF, and JSON Feed, with support for popular namespaces and OPML files.
Feedsmith offers universal and format‑specific parsers that maintain the original feed structure in a clean, object-oriented format while intelligently normalizing legacy elements. Access all feed data without compromising simplicity.
Features
Core
- Comprehensive support 🎯 — Supports all major feed formats and namespaces.
- Preserves structure 📦 — Parsed feed object maintains the original feed structure making it easy to access the data.
- Smart namespace handling 🧠 — Normalizes custom namespace prefixes to standard ones (e.g.,
<custom:creator>
becomesdc.creator
). - Parsing & generating 🔩 — Use one package for both parsing and generating feeds.
Leniency
- Normalizes legacy elements ✨ — Upgrades feed elements to their modern equivalents so that you never need to worry about reading feeds in older formats.
- CaSe INSENsiTive 🐍 — Handles fields and attributes in any case (lowercase, uppercase, mixed).
- Forgiving 🤝 — Gracefully handles malformed or incomplete feeds and extracts valid data. This makes it suitable for use with real-world feeds that may not strictly follow specifications.
Performance and Type-Safety
- Ultrafast parsing ⚡ — One of the fastest JavaScript feed parsers (see benchmarks).
- Type-safe API 🛟 — Built with TypeScript from the ground up, it provides complete type definitions for every feed format and namespace.
- Tree-shakable 🍃 — Only include the parts of the library you need, reducing bundle size.
- Well-tested 🔬 — Comprehensive test suite with over 2000 tests and 99% code coverage.
Compatibility
- Works in Node.js and modern browsers.
- Works with plain JavaScript, you don't need to use TypeScript.
Supported Formats
Feedsmith aims to fully support all major feed formats and namespaces in complete alignment with their specifications.
✅ Available · ⌛️ Work in progress · 📋 Planned
Feeds
Format | Versions | Parsing | Generating |
---|---|---|---|
RSS | 0.9x, 2.0 | ✅ | ✅ |
Atom | 0.3, 1.0 | ✅ | ✅ |
RDF | 0.9, 1.0 | ✅ | ⌛️ |
JSON Feed | 1.0, 1.1 | ✅ | ✅ |
Namespaces
Name | Prefix | Supported in | Parsing | Generating |
---|---|---|---|---|
Atom | <atom:*> | RSS, RDF | ✅ | ✅ |
Dublin Core | <dc:*> | RSS, Atom, RDF | ✅ | ✅ |
Syndication | <sy:*> | RSS, Atom, RDF | ✅ | ✅ |
Content | <content:*> | RSS, RDF | ✅ | ✅ |
Slash | <slash:*> | RSS, Atom, RDF | ✅ | ✅ |
iTunes | <itunes:*> | RSS, Atom | ✅ | ✅ |
Podcast | <podcast:*> | RSS | ✅ | ✅ |
Podlove Simple Chapters | <psc:*> | RSS, Atom | ✅ | ✅ |
Media RSS | <media:*> | RSS, Atom, RDF | ✅ | ✅ |
GeoRSS-Simple | <georss:*> | RSS, Atom, RDF | ✅ | ✅ |
Atom Threading | <thr:*> | RSS, Atom | ✅ | ✅ |
Dublin Core Terms | <dcterms:*> | RSS, Atom, RDF | ✅ | ✅ |
Well-Formed Web | <wfw:*> | RSS, Atom, RDF | ✅ | ✅ |
Source | <source:*> | RSS | ✅ | ✅ |
YouTube | <yt:*> | Atom | ✅ | ✅ |
Other
Format | Versions | Parsing | Generating |
---|---|---|---|
OPML | 1.0, 2.0 | ✅ | ✅ |
Why Feedsmith?
Why should you use this library over the alternatives?
The key advantage of Feedsmith is that it preserves the original feed structure exactly as defined in each specific feed format.
Many alternative packages attempt to normalize data by:
- Merging distinct fields like
author
,dc:creator
, andcreator
into a single property. - Combining date fields such as
dc:date
andpubDate
without preserving their sources. - Handling multiple
<atom:link>
elements inconsistently, sometimes keeping only the first or last one or ignoring differentrel
attributes. - Some libraries try to combine different feed formats into one universal structure.
While this approach can be useful for quick reading of feed data, it often results in a loss of information that may be crucial for certain applications, such as reading data from specific namespaces.