DEV Community

Алексей Спинов
Алексей Спинов

Posted on

How to Build a News Aggregator with Web Scraping (5 Free Sources)

A news aggregator that pulls from multiple sources is easy to build with free APIs.

The 5 Free News Sources

  1. Google News RSSnews.google.com/rss/search?q=QUERY
  2. Hacker News Algoliahn.algolia.com/api/v1/search?query=QUERY
  3. Redditreddit.com/r/SUBREDDIT.json
  4. Wikipedia Current Eventsen.wikipedia.org/w/api.php
  5. arXivexport.arxiv.org/api/query

All free. No API keys.

The Aggregator

async function aggregateNews(topic) {
  const sources = [
    fetchGoogleNews(topic),
    fetchHN(topic),
    fetchReddit(topic),
    fetchWikipedia(topic),
    fetchArxiv(topic)
  ];

  const results = await Promise.allSettled(sources);
  const articles = results
    .filter(r => r.status === "fulfilled")
    .flatMap(r => r.value);

  // Sort by date
  articles.sort((a, b) => new Date(b.date) - new Date(a.date));
  return articles;
}
Enter fullscreen mode Exit fullscreen mode

Output

[
  { "title": "...", "source": "Google News", "date": "2026-03-21" },
  { "title": "...", "source": "Hacker News", "date": "2026-03-21" },
  { "title": "...", "source": "Reddit", "date": "2026-03-21" }
]
Enter fullscreen mode Exit fullscreen mode

Resources


Need a custom news aggregator built? $50. Any industry, 5+ sources. Email: Spinov001@gmail.com | Hire me

Top comments (0)