Reddit RSS API

Overview

Deno

This project is a Deno-based server application serving as an API for fetching Reddit posts from RSS feeds. It offers multiple endpoints to retrieve posts from one or more subreddits.

Merging Subreddits

The merge option enables you to gather data from multiple RSS feeds and consolidate them into a single response. By default, Reddit's RSS feed can return data from multiple subreddits in one request, but it has limitations on the amount of data. Setting the merge option to true prompts our API to send separate requests for each specified subreddit and then merge the results. This method yields more items compared to Reddit's default multiple subreddit RSS feed.

Getting Started

Combining Query Parameters

When using the API, you can combine different query parameters to tailor your request according to your needs.

Query Parameters

Response Types

type ResponseData = {
  feed?: Feed;
  title: string;
  lastBuildDate: Date;
  link: string;
  feedUrl: string;
  itemsLength?: number;
  items: ExtractedItem[];
};

type ExtractedItem = {
  title: string;
  link: string;
  author: string;
  isoDate: Date;
  feedURL: string;
  id: string;
  message?: string;
  links?: string[];
  images?: string[];
  videos?: string[];
};

type Feed = {
  title: string;
  lastBuildDate: Date;
  link: string;
  feedUrl: string;
  items: FeedItem[];
};

type FeedItem = {
  id: string;
  title: string;
  link: string;
  pubDate: Date;
  author: string;
  content: string;
  contentSnippet: string;
  isoDate: Date;
};

Postman Check out example endpoints on Postman Docs.

Github Source Code