Dev.to AI πŸ€– Ai πŸ‘ 2 πŸ“– 2 min read

How to Parse Any RSS, Atom, or Podcast Feed into Clean JSON for AI Agents & n8n

If you've ever built an AI news digest, RAG pipeline, or n8n automation that ingests blogs or podcasts, you already know how messy XML feeds are in the wild: Sites mix RSS 2.0, Atom 1.0, RDF, and iTunes/Podcast XML nam

If you've ever built an AI news digest, RAG pipeline, or n8n automation that ingests blogs or podcasts, you already know how messy XML feeds are in the wild:

  • Sites mix RSS 2.0, Atom 1.0, RDF, and iTunes/Podcast XML namespaces
  • Descriptions are stuffed with raw HTML tags, CDATA wrappers, and tracking pixels
  • Half the time you only have a blog homepage URL and don't even know the exact feed URL

Instead of installing heavy XML parsers or writing brittle regexes inside n8n Code nodes, you can normalize any RSS, Atom, or Podcast feed into clean, typed JSON in one edge API call (<20ms compute on Cloudflare Workers).

1. Parse Any RSS, Atom, or Podcast Feed to Clean JSON (curl)

curl -X POST "https://rss-atom-podcast-feed-parser.p.rapidapi.com/v1/parse" \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: rss-atom-podcast-feed-parser.p.rapidapi.com" \
  -d '{"url": "https://hnrss.org/frontpage", "limit": 10}'

You get a clean, consistent JSON schema every time β€” title, link, publishedAt (ISO-8601), stripped plain-text summary, author, categories, and podcast enclosure audio URLs.

2. Auto-Discover Hidden Feed URLs From Any Website (Python)

Only have a homepage URL? Use the /v1/discover endpoint to extract <link rel="alternate" type="application/rss+xml"> and Atom links automatically:

import requests

resp = requests.post(
    "https://rss-atom-podcast-feed-parser.p.rapidapi.com/v1/discover",
    headers={
        "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
        "X-RapidAPI-Host": "rss-atom-podcast-feed-parser.p.rapidapi.com",
    },
    json={"url": "https://blog.cloudflare.com"},
)
print(resp.json()["feeds"])

3. Drop-In n8n Workflow Template (RSS -> AI Newsletter)

I published a ready-to-import n8n JSON workflow (rss-to-ai-newsletter.json) that fetches any feed via this API, extracts the top articles, and hands clean JSON straight to your LLM node.

All 12 edge micro-APIs include a free tier and run natively on Cloudflare Workers with zero cold starts. Let me know in the comments if there's a tricky podcast or Atom feed format you want supported!

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.