<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-build-a-headless-news-aggregator-with-wordpress-and-wp-rss-aggregator-pro-cg4kq7iai" -->

---
title: How to Build a Headless News Aggregator With WordPress...
description: WordPress can power a headless news aggregator by handling feed imports while a Cloudflare Worker builds the actual page. The author rebuilt...
canonical: https://daily.dev/posts/how-to-build-a-headless-news-aggregator-with-wordpress-and-wp-rss-aggregator-pro-cg4kq7iai
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Build a Headless News Aggregator With WordPress and WP RSS Aggregator Pro | daily.dev
og:description: WordPress can power a headless news aggregator by handling feed imports while a Cloudflare Worker builds the actual page. The author rebuilt...
og:url: https://daily.dev/posts/how-to-build-a-headless-news-aggregator-with-wordpress-and-wp-rss-aggregator-pro-cg4kq7iai
og:image: https://api.daily.dev/og/posts/Cg4kQ7iAI.png
og:image:alt: How to Build a Headless News Aggregator With WordPress and WP RSS Aggregator Pro
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Build a Headless News Aggregator With WordPress and WP RSS Aggregator Pro

**[WP Mayor](https://daily.dev/sources/wpmayor)** · 8 min read · 0 upvotes · 0 comments

## Summary

WordPress can power a headless news aggregator by handling feed imports while a Cloudflare Worker builds the actual page. The author rebuilt cryptoheadlines.com this way, using WP RSS Aggregator Pro to fetch and dedupe feeds, then a Hono-based Worker syncing into Cloudflare D1 every five minutes. The Worker clusters headlines into stories, ranks them, and uses Llama 3.3 70B to tag sections and sentiment. A second model, GLM 5.3, writes an hourly market summary under code-enforced rules requiring citations and banning invented claims. Claude Code agents wrote most of the code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://wpmayor.com/headless-news-aggregator-wordpress>

## Questions this post answers

### How can I combine WordPress with a Cloudflare Worker to build a headless news aggregator?

Use WordPress with WP RSS Aggregator Pro to import, dedupe, and store feed items with source names and URLs, then expose them via a read-only REST endpoint with a cursor. A Cloudflare Worker, built with Hono, syncs new items every five minutes into Cloudflare D1 (SQLite), then clusters, ranks, and serves the page while passing wp-admin and wp-json requests through untouched.

_Developers architecting headless WordPress setups can find more edge-rendering patterns like this on daily.dev._

### How do you stop an AI-generated news summary from hallucinating facts or citations?

Enforce the rules in code, not just the prompt. Every sentence must cite a story with a numbered marker linking to the source, every number in a cited sentence must appear in the source data, and no weekday names or relative terms like 'yesterday' are allowed since sources span time zones. If a draft breaks a rule, the model gets one chance to rewrite; otherwise the previous commentary stays up.

_Teams shipping AI-written content with guardrails like these often track emerging patterns on daily.dev._

### Which AI model is good for classifying news headlines into categories and sentiment at low cost?

Llama 3.3 70B, run through Workers AI with few-shot examples, was found to have the best balance of accuracy, speed, and reliability after testing several models on hand-labeled headlines. It classifies each story into a section like markets, bitcoin, regulation, or DeFi, and tags it bullish, bearish, or neutral in the same pass.

_Developers comparing LLMs for lightweight classification tasks can keep up with model benchmarks on daily.dev._

## Similar posts on daily.dev

- [Your WordPress Aggregator Site Is Now an AI Product](https://daily.dev/posts/your-wordpress-aggregator-site-is-now-an-ai-product-82ftjnadi) · WP Mayor · 2 upvotes · 1 comments
- [How to Build a Headless WordPress Frontend with Astro SSR on Cloudflare Pages](https://daily.dev/posts/how-to-build-a-headless-wordpress-frontend-with-astro-ssr-on-cloudflare-pages-30hassk3l) · freeCodeCamp · 3 upvotes · 0 comments
- [I built my own front page out of RSS, and stopped opening five news apps a day](https://daily.dev/posts/i-built-my-own-front-page-out-of-rss-and-stopped-opening-five-news-apps-a-day-n4tqe0trp) · XDA Developers · 6 upvotes · 0 comments
- [How to Set Up WordPress as a Headless CMS](https://daily.dev/posts/how-to-set-up-wordpress-as-a-headless-cms-s5cdjvowg) · ACF · 1 upvotes · 0 comments

---

Tags: [#wordpress](https://daily.dev/tags/wordpress), [#cloudflare](https://daily.dev/tags/cloudflare), [#cms](https://daily.dev/tags/cms)

[View this post on daily.dev](https://daily.dev/posts/how-to-build-a-headless-news-aggregator-with-wordpress-and-wp-rss-aggregator-pro-cg4kq7iai)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Build a Headless News Aggregator With WordPress and WP RSS Aggregator Pro","url":"https://daily.dev/posts/how-to-build-a-headless-news-aggregator-with-wordpress-and-wp-rss-aggregator-pro-cg4kq7iai","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-build-a-headless-news-aggregator-with-wordpress-and-wp-rss-aggregator-pro-cg4kq7iai"},"datePublished":"2026-10-29T22:33:22.732Z","dateModified":"2026-10-29T22:37:09.959Z","description":"WordPress can power a headless news aggregator by handling feed imports while a Cloudflare Worker builds the actual page. The author rebuilt...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0a2dbd7872f40bfe9675af41ee11ddc5?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0a2dbd7872f40bfe9675af41ee11ddc5?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"WP Mayor","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"WP Mayor","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/fb54640b1d3549b19d8b6a72616c095a","url":"https://daily.dev/sources/wpmayor"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-build-a-headless-news-aggregator-with-wordpress-and-wp-rss-aggregator-pro-cg4kq7iai","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"wordpress,cloudflare,cms","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"WP Mayor","item":"https://daily.dev/sources/wpmayor"},{"@type":"ListItem","position":3,"name":"How to Build a Headless News Aggregator With WordPress and WP RSS Aggregator Pro"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-build-a-headless-news-aggregator-with-wordpress-and-wp-rss-aggregator-pro-cg4kq7iai#faq","mainEntity":[{"@type":"Question","name":"How can I combine WordPress with a Cloudflare Worker to build a headless news aggregator?","acceptedAnswer":{"@type":"Answer","text":"Use WordPress with WP RSS Aggregator Pro to import, dedupe, and store feed items with source names and URLs, then expose them via a read-only REST endpoint with a cursor. A Cloudflare Worker, built with Hono, syncs new items every five minutes into Cloudflare D1 (SQLite), then clusters, ranks, and serves the page while passing wp-admin and wp-json requests through untouched. Developers architecting headless WordPress setups can find more edge-rendering patterns like this on daily.dev."}},{"@type":"Question","name":"How do you stop an AI-generated news summary from hallucinating facts or citations?","acceptedAnswer":{"@type":"Answer","text":"Enforce the rules in code, not just the prompt. Every sentence must cite a story with a numbered marker linking to the source, every number in a cited sentence must appear in the source data, and no weekday names or relative terms like 'yesterday' are allowed since sources span time zones. If a draft breaks a rule, the model gets one chance to rewrite; otherwise the previous commentary stays up. Teams shipping AI-written content with guardrails like these often track emerging patterns on daily.dev."}},{"@type":"Question","name":"Which AI model is good for classifying news headlines into categories and sentiment at low cost?","acceptedAnswer":{"@type":"Answer","text":"Llama 3.3 70B, run through Workers AI with few-shot examples, was found to have the best balance of accuracy, speed, and reliability after testing several models on hand-labeled headlines. It classifies each story into a section like markets, bitcoin, regulation, or DeFi, and tags it bullish, bearish, or neutral in the same pass. Developers comparing LLMs for lightweight classification tasks can keep up with model benchmarks on daily.dev."}}]}
```

