New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

rss2yaml

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rss2yaml

Standalone CLI tool to fetch RSS feeds and output YAML

Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
3
-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

rss2yaml

Standalone command-line tool to fetch RSS/Atom feeds and output structured YAML.

Install

Global (permanent, available everywhere):

npm install -g rss2yaml

Run without installing (via npx):

npx -y rss2yaml --urls "https://techcrunch.com/feed/"

From source (clone the repo):

git clone https://github.com/YOUR_USER/rss2yaml.git
cd rss2yaml
npm install
node rss2yaml.js --urls "https://hnrss.org/frontpage" --limit 5

Usage

npx -y rss2yaml --urls "https://techcrunch.com/feed/"
rss2yaml --urls "https://techcrunch.com/feed/" --fields title,description,url,date --limit 10 --sort newest

One-liner examples (copy-paste friendly)

Fetch Reddit AI news, save to file:

rss2yaml --urls "https://www.reddit.com/search.rss?q=ai+models+news&sort=hot" --fields title,description,url,date --limit 10 --sort newest --out feed-news.yaml

Multiple feeds, filter by keyword:

rss2yaml --urls "https://techcrunch.com/feed/,https://hnrss.org/frontpage" --fields title,url,date --limit 5 --sort newest --filter "openai"

Print to stdout (pipe to another tool):

rss2yaml --urls "https://hnrss.org/frontpage" --fields title,url --limit 20 --no-dedupe

Google News

Google News RSS feeds return redirect URLs instead of the real article links. rss2yaml automatically decodes them to the original website URL using google-news-url-decoder.

rss2yaml --urls "https://news.google.com/rss/search?q=openai" --fields title,url,date --limit 5

Output will contain the real article URLs (e.g. https://techcrunch.com/...) instead of https://news.google.com/rss/articles/... redirects.

Filter tips

The --filter flag does a simple substring match (case-insensitive). For short keywords like "AI", add spaces around it to avoid matching words like "email", "daily", "train", etc.:

# Bad — matches "email", "daily", "omain", etc.
rss2yaml --urls "https://hnrss.org/frontpage" --filter "ai"

# Good — matches only " AI " as a standalone word
rss2yaml --urls "https://hnrss.org/frontpage" --filter " AI "

Flags

FlagDescriptionDefault
--urls, --urlComma-separated feed URLs (required)—
--fieldsFields to extract: title, description, url, date, authortitle,description,url,date
--limitMax items per feed10
--sortSort order: newest, oldest, nonenewest
--dedupeDedup strategy: url, title, url_or_title, noneurl_or_title
--no-dedupeDisable deduplication—
--filterKeep only items matching this keyword—
--keep-htmlKeep HTML in text fields (default: HTML is stripped)—
--jsonOutput JSON instead of YAMLfalse
--cache <sec>Cache TTL in seconds300 (5 min)
--no-cacheSkip cache, force fresh fetch—
--outWrite output to file (omit to print to stdout)—
--helpShow help message—

Output format

total_items: 5
items:
  - source_feed: TechCrunch
    title: Some Article
    description: Brief summary here
    url: https://example.com/article
    date: '2025-07-30T12:00:00.000Z'

Notes

  • Works with node (v18+) or bun.
  • Google News URLs are automatically decoded to the real article URL (via google-news-url-decoder).
  • Reddit feeds use a specific User-Agent to avoid rate limiting.
  • HTML tags are stripped from text fields by default. Use --keep-html to preserve them.
  • Feeds are cached locally (.rss-cache/) for 5 minutes by default. Use --no-cache to force a fresh fetch, or --cache 600 to change the TTL.

Keywords

rss

FAQs

Package last updated on 01 Aug 2026

Related posts