Working with the Reddit API

In this challenge, you’ll pull the concepts you learned in Working With APIs and Intermediate APIs together to explore trending posts and comments on Reddit.

Reddit is a community-driven link-sharing site. Users submit links to articles, photos, and other content. Other users upvote the sublessons they like and downvote the ones they dislike. Users can comment on sublessons, and even upvote or downvote other people’s comments.

Reddit consists of many smaller communities called subreddits where more focused communities can discuss niche posts. The posts you submit to a subreddit will appear on the group’s front page if enough users upvote them. Very popular subreddit posts may appear on Reddit’s home page.

In this challenge, you’ll practice:

  • Retrieving a list of trending posts on a particular subreddit.
  • Exploring the comments on a single article.
  • Posting your own comment on an article using the API.

At Dataquest, we’re huge believers in learning through doing, and we hope this shows in your experience with the lesson. While other lessons focus on introducing concepts, challenges allow you to perform deliberate practice by completing structured problems. Challenges will feel similar to previous lessons, but with little instructional material and a greater focus on real-world skills applications.


  • Learn to authenticate with an API.
  • Learn about the different types of API requests.

Lesson Outline

  1. Reddit
  2. Authenticating with the API
  3. Getting the Most Upvoted Post
  4. Getting Post Comments
  5. Getting the Most Upvoted Comment
  6. Upvoting a Comment
  7. Next Steps

Get started for free

No credit card required.

Or With

By creating an account you agree to accept our terms of use and privacy policy.