Back to services

feedmixer

Micro web service which takes a list of feed URLs and returns a new feed consisting of the most recent n entries from each given feed (returns Atom, RSS, or JSON).

View alternatives to feedmixer
Suggest edit
Open source
Self-hostable
WTFPL
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Introduction

FeedMixer is a small web service written in Python3 that follows the WSGI specification. It takes a list of feed URLs, combines their entries into a single feed, and returns it in Atom, RSS, or JSON format. It's well suited for building a personal news aggregator or a "Planet"-style aggregation site. The project is open source under the WTFPL license. At v1.0.0 the author stated that the API was stable, and he uses it himself in production to run a small personal aggregator site.

API

FeedMixer provides three endpoints:

  • /atom: returns an Atom feed
  • /rss: returns an RSS 2.0 feed
  • /json: returns a feed that conforms to the JSON Feed specification (since v2.4.0 the output is JSON Feed 1.1)

Query parameters for GET requests:

  • f: the URL of a feed (must be URL-encoded). Almost all versions of Atom and RSS are supported. To use multiple feeds, pass multiple f parameters
  • n: the number of entries to keep from each feed. Pass 0 or omit it to keep all entries
  • full: if this parameter is set at all, the full content is preferred in the output; if it is not set, the shorter summary is preferred

The repository includes an OpenAPI specification file, openapi.yaml.

Example:

curl 'localhost:8000/atom?f=https%3A%2F%2Fhnrss.org%2Fnewest&n=1'

Key Features

  • Combines multiple Atom/RSS feeds into one, with entries sorted by date. RSS entries that lack a pubDate are placed last
  • Preserves RSS enclosures and Atom links, so it can be used to aggregate podcasts
  • Parsed feeds are cached in memory, so repeated requests don't need to be parsed again
  • The bundled WSGI app uses a session with an HTTP response cache, which makes responses faster when the same set of feeds is fetched repeatedly
  • You can pass a custom requests.session to the FeedMixer object for flexible control over how HTTP requests are made
  • If an error occurs while fetching or parsing a remote feed, the error message is written to the custom HTTP header X-fm-errors

Installation and Running

git clone https://github.com/cristoper/feedmixer.git
cd feedmixer
uv venv
. .venv/bin/activate
uv sync
uv pip install gunicorn
gunicorn feedmixer_wsgi

The project consists of three modules: feedmixer.py (the core logic), feedmixer_api.py (a Falcon-based API), and feedmixer_wsgi.py (a ready-to-use WSGI app).

Docker

The repository includes an Alpine-based Dockerfile that produces an image of about 60MB and runs with gunicorn. If you have problems with the Alpine build, you can use the Debian Dockerfile instead.

docker build . -t feedmixer
docker run --rm -p 8000:8000 -e FM_ALLOW_CORS=1 feedmixer

Production Deployment

It can be deployed on any WSGI-compatible server, such as uWSGI, gunicorn, or mod_wsgi. The official recommendation is to put an asynchronous HTTP proxy such as Nginx in front of it to handle SSL, caching, authentication, and slow connections. The repository documentation also includes instructions for deploying behind Apache.

Configuration (Environment Variables)

  • FM_LOG_LEVEL: the log level, INFO by default; logs are written to stderr
  • FM_ALLOW_CORS: when set to a non-empty value, adds the Access-Control-Allow-Origin: * header, which makes it easy to call from frontend JavaScript
  • FM_TIMEOUT: the timeout for fetching remote feeds, in seconds, 30 by default
  • FM_CACHE_SIZE: the number of parsed results cached in memory, 128 by default

Notes

FeedMixer itself does no authorization and no rate limiting. When deploying it on the public internet, you should add access control yourself through a reverse proxy or WSGI middleware. Since v2.0.0 the JSON output uses the JSON Feed format; if you need the old JSON format, you can use the v1 branch.