Reddit API Overview

Get familiar with the Reddit API.

What is Reddit?

Reddit acts as one of the largest and oldest forums on the internet. It aggregates web content like videos, GIFs, and text.

Paired with its rating system, it can be beneficial for exploring a wide range of topics. Reddit users can create subredditsSubreddits are communities dedicated towards specific topics. on different topics and can post, comment, and vote on those subreddits.

Reddit's API

Using the Reddit API endpoints, we can build many valuable tools for themselves and others. A typical example of Reddit's API in action is a comment bot, which scrapes new posts and comments on them. Imagine a sentiment analyzing application that can read the incoming posts on a subreddit. It can respond with a motivational quote whenever it finds a negative sentiment in the post. In addition, as Reddit has abundant text, it is usually used to train machine learning algorithms at very large scales.

The API allows the following uses through its various endpoints:

  • Add, block, and message other users on Reddit.
  • Create and manage collections, wikis, and flairs.
  • Interact with posts on subreddits via voting and commenting.
  • Moderate incoming posts to a subreddit.
  • Answer and manage mod mail.

Python wrapper for the Reddit API

While using the API directly is possible, Reddit also provides different wrappers with different languages for easier API use. PRAWPython Reddit API Wrapper is one such wrapper in Python that can be imported like any other Python module. In this course, we'll first explore endpoints directly using the Reddit API. Then we'll switch gears and learn the PRAW module as well.