Fast, all‑in‑one JavaScript feed parser and generator for RSS, Atom, RDF, and JSON Feed, with support for popular namespaces and OPML.
See the codeFast, all‑in‑one JavaScript feed parser and generator for RSS, Atom, RDF, and JSON Feed, with support for popular namespaces and OPML files.
Feedsmith's universal and format-specific parsers turn each feed into an object that mirrors its original structure and maps legacy elements to their modern equivalents, so you read an old feed the same way as a new one.
[!IMPORTANT] Feedsmith 3.0 is out! 🎉 It comes with a range of improvements and some breaking changes. Check out the migration guide to see what's new and how to upgrade from 2.x.
Read full docs ↗ · Quick Start · Why Feedsmith? · Benchmarks →
<custom:creator> becomes dc.creator).Feedsmith aims to fully support all major feed formats and namespaces in complete alignment with their specs.
✅ Available · ⌛️ Work in progress · 📋 Planned
| Format | Versions | Parse | Generate |
|---|---|---|---|
| OPML | 1.0, 2.0 | ✅ | ✅ |
| Name | Prefix | Supported in | Parse | Generate |
|---|---|---|---|---|
| Atom | <atom:*> | RSS, RDF | ✅ | ✅ |
| Dublin Core | <dc:*> | RSS, Atom, RDF | ✅ | ✅ |
| Dublin Core Terms | <dcterms:*> | RSS, Atom, RDF | ✅ | ✅ |
| Syndication | <sy:*> | RSS, Atom, RDF | ✅ | ✅ |
| Content | <content:*> | RSS, RDF | ✅ | ✅ |
| Slash | <slash:*> | RSS, Atom, RDF | ✅ | ✅ |
| iTunes | <itunes:*> | RSS, Atom | ✅ | ✅ |
| Podcast Index | <podcast:*> | RSS | ✅ | ✅ |
| Podlove Simple Chapters | <psc:*> | RSS, Atom | ✅ | ✅ |
| Media RSS | <media:*> | RSS, Atom, RDF | ✅ | ✅ |
| Google Play Podcast | <googleplay:*> | RSS, Atom | ✅ | ✅ |
| Spotify | <spotify:*> | RSS | ✅ | ✅ |
| Acast | <acast:*> | RSS | ✅ | ✅ |
| RawVoice | <rawvoice:*> | RSS | ✅ | ✅ |
| FeedBurner | <feedburner:*> | RSS, Atom, RDF | ✅ | ✅ |
| FeedPress | <feedpress:*> | RSS | ✅ | ✅ |
| arXiv | <arxiv:*> | RSS, Atom | ✅ | ✅ |
| OpenSearch | <opensearch:*> | RSS, Atom, RDF | ✅ | ✅ |
| PRISM | <prism:*> | RSS, Atom, RDF | ✅ | ✅ |
| ccREL | <cc:*> | RSS, Atom, RDF | ✅ | ✅ |
| Creative Commons | <creativeCommons:*> | RSS, Atom | ✅ | ✅ |
| Atom Threading | <thr:*> | RSS, Atom | ✅ | ✅ |
| Atom Publishing Protocol | <app:*> | Atom | ✅ | ✅ |
| Comment API | <wfw:*> | RSS, Atom, RDF | ✅ | ✅ |
| Administrative | <admin:*> | RSS, Atom, RDF | ✅ | ✅ |
| Pingback | <pingback:*> | RSS, Atom, RDF | ✅ | ✅ |
| Trackback | <trackback:*> | RSS, Atom, RDF | ✅ | ✅ |
| Source | <source:*> | RSS | ✅ | ✅ |
| blogChannel | <blogChannel:*> | RSS | ✅ | ✅ |
| YouTube | <yt:*> | Atom | ✅ | ✅ |
| W3C Basic Geo | <geo:*> | RSS, Atom, RDF | ✅ | ✅ |
| GeoRSS Simple | <georss:*> | RSS, Atom, RDF | ✅ | ✅ |
| RDF | <rdf:*> | RDF | ✅ | ✅ |
| XML | <xml:*> | RSS, Atom, RDF | ✅ | ✅ |
This guide will get you up and running with Feedsmith in just a few minutes.
For a full overview of all the features, visit the documentation website.
npm install feedsmith
Migrating from v2.x? Check out the migration guide.
The simplest way to parse any feed is to use the universal parseFeed function:
import { parseFeed } from 'feedsmith'
// Works with RSS, Atom, RDF, and JSON Feed
const { format, feed } = parseFeed(feedContent)
console.log('Feed format:', format) // rss, atom, json, rdf
console.log('Feed title:', feed.title)
if (format === 'rss') {
console.log('RSS feed link:', feed.link)
}
If you know the format in advance, you can use the format-specific parsers:
import {
parseAtomFeed,
parseJsonFeed,
parseRssFeed,
parseRdfFeed
} from 'feedsmith'
// Parse specific formats
const rssFeed = parseRssFeed('rss content')
const atomFeed = parseAtomFeed('atom content')
const rdfFeed = parseRdfFeed('rdf content')
const jsonFeed = parseJsonFeed('json content')
// Access typed data
rssFeed.title
rssFeed.dc?.creator
rssFeed.items?.[0]?.title
import { parseOpml } from 'feedsmith'
const opml = parseOpml('opml content')
opml.head?.title
opml.body?.outlines?.[0].text
opml.body?.outlines?.[1].xmlUrl
import { generateRssFeed } from 'feedsmith'
const rss = generateRssFeed({
title: 'My Blog',
link: 'https://example.com',
description: 'A simple blog',
items: [{
title: 'Hello World',
link: 'https://example.com/hello',
description: 'My first post',
pubDate: new Date()
}]
})
console.log(rss) // Complete RSS XML
// You can also generate other formats:
// - generateAtomFeed() for Atom feeds
// - generateJsonFeed() for JSON feeds
// - generateOpml() for OPML files
If the feed is unrecognized or invalid, an Error will be thrown with a descriptive message.
import { parseFeed, parseJsonFeed } from 'feedsmith'
try {
const universalFeed = parseFeed('<not-a-feed></not-a-feed>')
} catch (error) {
// Error: Unrecognized feed format
}
try {
const jsonFeed = parseJsonFeed('{}')
} catch (error) {
// Error: Invalid feed format
}
Feedsmith provides comprehensive TypeScript types for all feed formats:
import type { AnyFeed, AtomFeed, JsonFeed, Opml, RssFeed } from 'feedsmith'
// Access all types for a format
type Feed = RssFeed.Feed<string>
type Item = RssFeed.Item<string>
type Category = RssFeed.Category
type Enclosure = RssFeed.Enclosure
// Return type of parseFeed
type Result = AnyFeed
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:
author, dc:creator, and creator into a single property.dc:date and pubDate without preserving their sources.<atom:link> elements inconsistently, sometimes keeping only the first or last one or ignoring different rel attributes.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.
1,672 followers · starred May 2025
4,253 followers · starred Dec 2025
715 followers · starred May 2025
1,375 followers · starred Jul 2026
Fast, all‑in‑one JavaScript feed parser and generator for RSS, Atom, RDF, and JSON Feed, with support for popular namespaces and OPML.
See the codeFast, all‑in‑one JavaScript feed parser and generator for RSS, Atom, RDF, and JSON Feed, with support for popular namespaces and OPML files.
Feedsmith's universal and format-specific parsers turn each feed into an object that mirrors its original structure and maps legacy elements to their modern equivalents, so you read an old feed the same way as a new one.
[!IMPORTANT] Feedsmith 3.0 is out! 🎉 It comes with a range of improvements and some breaking changes. Check out the migration guide to see what's new and how to upgrade from 2.x.
Read full docs ↗ · Quick Start · Why Feedsmith? · Benchmarks →
<custom:creator> becomes dc.creator).Feedsmith aims to fully support all major feed formats and namespaces in complete alignment with their specs.
✅ Available · ⌛️ Work in progress · 📋 Planned
| Format | Versions | Parse | Generate |
|---|---|---|---|
| OPML | 1.0, 2.0 | ✅ | ✅ |
| Name | Prefix | Supported in | Parse | Generate |
|---|---|---|---|---|
| Atom | <atom:*> | RSS, RDF | ✅ | ✅ |
| Dublin Core | <dc:*> | RSS, Atom, RDF | ✅ | ✅ |
| Dublin Core Terms | <dcterms:*> | RSS, Atom, RDF | ✅ | ✅ |
| Syndication | <sy:*> | RSS, Atom, RDF | ✅ | ✅ |
| Content | <content:*> | RSS, RDF | ✅ | ✅ |
| Slash | <slash:*> | RSS, Atom, RDF | ✅ | ✅ |
| iTunes | <itunes:*> | RSS, Atom | ✅ | ✅ |
| Podcast Index | <podcast:*> | RSS | ✅ | ✅ |
| Podlove Simple Chapters | <psc:*> | RSS, Atom | ✅ | ✅ |
| Media RSS | <media:*> | RSS, Atom, RDF | ✅ | ✅ |
| Google Play Podcast | <googleplay:*> | RSS, Atom | ✅ | ✅ |
| Spotify | <spotify:*> | RSS | ✅ | ✅ |
| Acast | <acast:*> | RSS | ✅ | ✅ |
| RawVoice | <rawvoice:*> | RSS | ✅ | ✅ |
| FeedBurner | <feedburner:*> | RSS, Atom, RDF | ✅ | ✅ |
| FeedPress | <feedpress:*> | RSS | ✅ | ✅ |
| arXiv | <arxiv:*> | RSS, Atom | ✅ | ✅ |
| OpenSearch | <opensearch:*> | RSS, Atom, RDF | ✅ | ✅ |
| PRISM | <prism:*> | RSS, Atom, RDF | ✅ | ✅ |
| ccREL | <cc:*> | RSS, Atom, RDF | ✅ | ✅ |
| Creative Commons | <creativeCommons:*> | RSS, Atom | ✅ | ✅ |
| Atom Threading | <thr:*> | RSS, Atom | ✅ | ✅ |
| Atom Publishing Protocol | <app:*> | Atom | ✅ | ✅ |
| Comment API | <wfw:*> | RSS, Atom, RDF | ✅ | ✅ |
| Administrative | <admin:*> | RSS, Atom, RDF | ✅ | ✅ |
| Pingback | <pingback:*> | RSS, Atom, RDF | ✅ | ✅ |
| Trackback | <trackback:*> | RSS, Atom, RDF | ✅ | ✅ |
| Source | <source:*> | RSS | ✅ | ✅ |
| blogChannel | <blogChannel:*> | RSS | ✅ | ✅ |
| YouTube | <yt:*> | Atom | ✅ | ✅ |
| W3C Basic Geo | <geo:*> | RSS, Atom, RDF | ✅ | ✅ |
| GeoRSS Simple | <georss:*> | RSS, Atom, RDF | ✅ | ✅ |
| RDF | <rdf:*> | RDF | ✅ | ✅ |
| XML | <xml:*> | RSS, Atom, RDF | ✅ | ✅ |
This guide will get you up and running with Feedsmith in just a few minutes.
For a full overview of all the features, visit the documentation website.
npm install feedsmith
Migrating from v2.x? Check out the migration guide.
The simplest way to parse any feed is to use the universal parseFeed function:
import { parseFeed } from 'feedsmith'
// Works with RSS, Atom, RDF, and JSON Feed
const { format, feed } = parseFeed(feedContent)
console.log('Feed format:', format) // rss, atom, json, rdf
console.log('Feed title:', feed.title)
if (format === 'rss') {
console.log('RSS feed link:', feed.link)
}
If you know the format in advance, you can use the format-specific parsers:
import {
parseAtomFeed,
parseJsonFeed,
parseRssFeed,
parseRdfFeed
} from 'feedsmith'
// Parse specific formats
const rssFeed = parseRssFeed('rss content')
const atomFeed = parseAtomFeed('atom content')
const rdfFeed = parseRdfFeed('rdf content')
const jsonFeed = parseJsonFeed('json content')
// Access typed data
rssFeed.title
rssFeed.dc?.creator
rssFeed.items?.[0]?.title
import { parseOpml } from 'feedsmith'
const opml = parseOpml('opml content')
opml.head?.title
opml.body?.outlines?.[0].text
opml.body?.outlines?.[1].xmlUrl
import { generateRssFeed } from 'feedsmith'
const rss = generateRssFeed({
title: 'My Blog',
link: 'https://example.com',
description: 'A simple blog',
items: [{
title: 'Hello World',
link: 'https://example.com/hello',
description: 'My first post',
pubDate: new Date()
}]
})
console.log(rss) // Complete RSS XML
// You can also generate other formats:
// - generateAtomFeed() for Atom feeds
// - generateJsonFeed() for JSON feeds
// - generateOpml() for OPML files
If the feed is unrecognized or invalid, an Error will be thrown with a descriptive message.
import { parseFeed, parseJsonFeed } from 'feedsmith'
try {
const universalFeed = parseFeed('<not-a-feed></not-a-feed>')
} catch (error) {
// Error: Unrecognized feed format
}
try {
const jsonFeed = parseJsonFeed('{}')
} catch (error) {
// Error: Invalid feed format
}
Feedsmith provides comprehensive TypeScript types for all feed formats:
import type { AnyFeed, AtomFeed, JsonFeed, Opml, RssFeed } from 'feedsmith'
// Access all types for a format
type Feed = RssFeed.Feed<string>
type Item = RssFeed.Item<string>
type Category = RssFeed.Category
type Enclosure = RssFeed.Enclosure
// Return type of parseFeed
type Result = AnyFeed
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:
author, dc:creator, and creator into a single property.dc:date and pubDate without preserving their sources.<atom:link> elements inconsistently, sometimes keeping only the first or last one or ignoring different rel attributes.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.
1,672 followers · starred May 2025
4,253 followers · starred Dec 2025
715 followers · starred May 2025
1,375 followers · starred Jul 2026