Skip to the content.

How to convert RSS and Atom feeds to JSON

RSS and Atom are still the cleanest way to monitor blogs, news sites, changelogs and podcasts, and they make great input for AI summarizers and alerts. Here’s how to turn any feed, or any website, into uniform JSON.

Find a site’s feed

Look in the homepage HTML for <link rel="alternate" type="application/rss+xml" href="…"> (or application/atom+xml). If there isn’t one, try common paths: /feed, /rss, /rss.xml, /feed.xml, /atom.xml, /index.xml.

Parse any feed format

import calendar, datetime, feedparser

feed = feedparser.parse("https://hnrss.org/frontpage")
items = [{
    "title": e.get("title"),
    "link": e.get("link"),
    "published": datetime.datetime.fromtimestamp(calendar.timegm(e.published_parsed), datetime.timezone.utc).isoformat()
                 if e.get("published_parsed") else None,
    "summary": e.get("summary"),
    "categories": [t.term for t in e.get("tags", [])],
} for e in feed.entries]
print(items[0])

Pitfalls

Skip the build

RSS & Atom Feed Reader accepts feed URLs or plain website addresses (feeds auto-discovered) and returns clean JSON with date and keyword filters, ready to schedule and send to Slack, Sheets or an AI agent. $0.50 per 1,000 items. (Built by the author of this guide.)

← Home