RSS to JSON: Convert Any RSS or Atom Feed

Convert RSS to JSON three tested ways: Magpie's zero-LLM rss vertical, the rss2json API, and Python feedparser. Exact output shapes, and what each drops.

MMotherlode Lab9 min read
Magpie title card: RSS to JSON: Convert Any RSS or Atom Feed

Feeds are XML. Your code speaks JSON, and the top Google results for converting RSS to JSON are ad-covered web forms and one hosted API that sees every feed you fetch. So I ran three routes against real feeds today: a WordPress blog, GitHub’s release Atom, Hacker News. The exact JSON for each is below, along with the fields each route silently drops.

The routes: Magpie’s zero-LLM rss vertical (local CLI, one command), the rss2json API (one GET, nothing to install), and Python’s feedparser library (full fidelity, eight lines). Pick by constraint, not by vibes.

Route Setup Keeps Hard limits
Magpie rss vertical Install one Go binary, no API key title, link, published, summary per item 50 items; drops enclosures, authors, content:encoded, custom fields; refuses feed URLs without /feed or /rss hints
rss2json API None, one GET title, pubDate, link, guid, author, thumbnail, description, content, enclosure, categories 10 items without an API key; a third party sees your feed list; count/sort params need the key
Python feedparser pip install feedparser (6.0.14) Everything the feed has, normalized You write the mapping to your own JSON shape yourself

Why JSON, and when you can skip the conversion

JSON is what jq, JavaScript, and most automation tools read natively. A feed parsed as XML means namespace-aware selectors and date-format footguns; a JSON object means jq '.items[0].title' and done.

One skip-first check: a growing set of sites publish JSON Feed natively, a spec (v1.1, published 2020) that is exactly this conversion, done by the publisher. Probe /feed.json on the site before you build anything. When it’s not there, the feed you do have is RSS 2.0 or Atom, and the glossary entry on RSS feeds covers how those differ if the acronyms are fuzzy.

Route 1: Magpie’s rss vertical

Magpie is a free, open source CLI (AGPL-3.0-or-later, with a commercial license option; single static binary, no API keys) whose pipeline ends in typed extractors called verticals. The rss vertical parses RSS 2.0 and Atom with Go’s stdlib and returns items as JSON. No LLM call, no cost. I ran all receipts below on v0.1.32 from a home connection.

Step 1: Convert RSS to JSON in one command

The command is magpie vertical <feed-url> --name rss. The --name rss part is not optional, and this is the gotcha that costs everyone ten confused minutes: rss is registered as opt-in, so plain auto-dispatch never fires it. I ran magpie vertical https://wordpress.org/news/feed/ without the flag first and got the markdown scraper’s view of the feed, one giant blob with no items array anywhere. With the flag:

$ magpie vertical https://wordpress.org/news/feed/ --name rss
{
  "url": "https://wordpress.org/news/feed/",
  "title": "WordPress News",
  "vertical": "rss",
  "record": {
    "description": "The latest news about WordPress and the WordPress community",
    "items": [
      {
        "link": "https://wordpress.org/news/2026/10/wordpress-7-1-4/",
        "published": "Wed, 28 Oct 2026 17:13:02 +0000",
        "summary": "This security release features fixes for multiple issues. Because this is a security release, it is recommended that you update your sites immediately. You can download WordPress 7.1.4 from WordPress.org ... [&8230;]",
        "title": "WordPress 7.1.4"
      }
    ]
  }
}

(abridged; the real record carries 10 items, the feed’s default page size)

The output is plain JSON on stdout, so jq chains onto it directly. Titles and dates off the same WordPress feed:

$ magpie vertical https://wordpress.org/news/feed/ --name rss \
  | jq -r '.record.items[] | "\(.published)  \(.title)"'
Wed, 28 Oct 2026 17:13:02 +0000  WordPress 7.1.4
Tue, 27 Oct 2026 15:49:21 +0000  WordPress 7.2 Beta 2
Wed, 21 Oct 2026 13:44:09 +0000  Critical PHP Security Release
Tue, 20 Oct 2026 16:02:09 +0000  WordPress 7.2 Beta 1 is Ready for Download and Testing

Failure case: a URL that isn’t a feed returns a typed error, vertical: rss: not a feed at <url>, rather than an empty record you have to sniff at.

Step 2: Point it at an Atom feed, same flag

Magpie sniffs the root element (<rss> vs <feed>), not the file extension, so Atom needs no special handling. GitHub’s release feed converts cleanly:

$ magpie vertical https://github.com/motherlodelab/magpie/releases.atom --name rss
{
  "title": "Release notes from magpie",
  "vertical": "rss",
  "record": {
    "items": [
      {
        "link": "https://github.com/motherlodelab/magpie/releases/tag/v0.1.32",
        "published": "2026-10-12T08:21:44Z",
        "title": "v0.1.32"
      }
    ]
  }
}

(abridged)

Note the date format changed on its own: Atom entries carry ISO 8601 (2026-10-12T08:21:44Z), RSS 2.0 items carry RFC 822 (Mon, 28 Oct 2026 17:13:02 +0000). Magpie passes both through as strings without normalizing them, so if you merge feeds from both dialects, sort in your own code.

The field mapping, verified against both dialects today:

RSS 2.0 Atom JSON key
channel/title feed/title record.title
channel/link link rel="alternate" record.link
channel/description feed/subtitle record.description
item/title entry/title items[].title
item/link entry/link items[].link
item/pubDate entry/published (falls back to updated) items[].published
item/description entry/summary items[].summary
content:encoded entry/content dropped
dc:creator / author entry/author dropped
enclosure (no Atom equivalent) dropped
category, media:*, custom fields category, namespaced fields dropped

Step 3: Know what the vertical refuses

Three limits, each with a receipt from today.

It drops every namespaced and custom element. The parser maps title, link, date, and summary, and nothing else. On the Lex Fridman podcast feed, each item kept its HTML summary but lost the <enclosure> that holds the actual audio URL, which makes the vertical useless for building a podcast app. The WordPress feed’s full content:encoded article bodies are gone too; you get the truncated description ending in [&8230;].

It caps at 50 items, first 50 in document order. Fine for the feeds I test, which publish 10 to 20 items; wrong for outliers like We Work Remotely, whose site-wide feed ships 96.

The URL must smell like a feed. The path needs a /feed or /rss segment, or a .xml/.atom suffix. Anything else refuses even when you force --name rss:

$ magpie vertical https://hnrss.org/frontpage --name rss
Error: scrape: vertical "rss": vertical extractor does not handle URL
for https://hnrss.org/frontpage

$ magpie vertical https://weworkremotely.com/remote-jobs.rss --name rss
Error: scrape: vertical "rss": vertical extractor does not handle URL
for https://weworkremotely.com/remote-jobs.rss

Both are real, working feeds. HN’s front-page feed has no hint in its path, and We Work Remotely uses a .rss suffix, which the matcher doesn’t recognize (only .xml and .atom). When a feed you want fails this check, that’s your cue to switch routes, and route 2 handled the same HN URL without complaint.

Where the vertical does fit, it’s the fastest local option, and it composes with the rest of the tool: the same records feed watch mode if what you actually want after converting is notification when an item lands. For pulling feed content into a wider crawl, the WordPress scrape guide covers the feed’s REST API sibling, which returns richer records than any feed does.

Route 2: The rss2json API

rss2json is a hosted converter: one GET, feed URL in, JSON out. The exact call that Magpie’s matcher refused, keyless:

$ curl -s "https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fhnrss.org%2Ffrontpage"
{
  "status": "ok",
  "feed": { "title": "Hacker News: Front Page", ... },
  "items": [
    {
      "title": "F/OSS Comics #13: BSD Unix, Part 3 ...",
      "pubDate": "2026-11-02 01:59:38",
      "link": "https://fosscomics.com/posts/...",
      "guid": "...", "author": "", "thumbnail": "...",
      "description": "...", "content": "...",
      "enclosure": {}, "categories": []
    }
  ]
}

(abridged)

Three things worth knowing, all verified against the live API today. Keyless requests return 10 items; their API docs confirm count, order_by, and order_dir need an API key. The item shape is richer than Magpie’s vertical: enclosures, thumbnails, authors, and categories all survive, and dates come back pre-normalized as 2026-11-02 01:59:38. And the obvious cost: every feed you convert passes through their servers, tied to your IP or account. For a public blog widget, fine. For anything internal, that’s a data-leak review you shouldn’t skip.

Route 3: feedparser, when you want everything

feedparser is the Python library that has parsed ugly feeds since 2004; the current release is 6.0.14. It accepts any URL, detects RSS 2.0, Atom, and RDF on its own, sets a bozo flag instead of crashing on malformed XML, and keeps every field, so nothing gets dropped the way route 1 drops it.

import feedparser, json

d = feedparser.parse("https://hnrss.org/frontpage")
out = {
    "title": d.feed.title,
    "items": [
        {
            "title": e.title,
            "link": e.link,
            "published": e.get("published", ""),
            "summary": e.get("summary", ""),
        }
        for e in d.entries
    ],
}
print(json.dumps(out, ensure_ascii=False))

Live run against the same HN feed: Hacker News: Front Page - 20 entries, and d.entries[0].enclosures is right there for podcast work. The dict comprehension is where you normalize dates, strip HTML, and shape the output to your schema. That mapping code is the price: feedparser gives you parsed fields, not a finished JSON document, so you own it when a feed omits published or stuffs HTML into summary.

Which route when

  • Local pipeline or CI, boring feed URLs (/feed, /feed.xml): Magpie’s vertical piped to jq. Zero dependencies beyond one binary.
  • Browser-side widget, or a feed whose enclosures you need: rss2json, accepting the third party.
  • Weird feed URLs, custom namespaces, full fidelity including audio: feedparser, and write the ten lines of mapping.

I keep all three installed; the decision takes longer than the conversion.

FAQ

Is rss2json free? Keyless requests are free at 10 items per call. The count, order_by, and order_dir parameters require an API key from a free account. Paid tiers exist for higher volume; check their pricing page before you commit.

Can jq parse RSS directly? No. jq reads JSON only. Convert the feed first (any route above), or use xq/yq, which wrap XML parsing, if your goal is one-lining XML at the terminal.

What’s the difference between RSS and Atom here? Field names and date formats. RSS uses item/pubDate in RFC 822; Atom uses entry/published in ISO 8601. A converter maps both to one shape; Magpie’s key mapping is in the table above.

Why is my converted JSON full of HTML? Because the feed itself stores HTML in description/summary, escaped as character data. That’s the data, not a conversion bug. Strip it downstream with your HTML-to-text tool of choice.

Before converting a feed into pipeline input, decide what should happen when a new item appears, because a one-shot conversion never tells you; the feed monitor build is the piece that does.

Stop renting credits.

One flat price, your machine, your keys.

Download free for Windows, macOS and Linux

Windows · macOS · Linux $49/mo flat, cancel anytime