Overview

The Reddit API Suite offers multiple types of APIs, each designed for specific data collection needs from Reddit. Below is an overview of how these APIs connect and interact, based on the available features:

Posts API

Collect by URL

This API allows users to retrieve detailed post data from a specific Reddit post using the provided URL.

Input Parameters

URL
string
required

The URL of the Reddit post to be retrieved.

Output Structure
Includes comprehensive data points:

  • Post Details: post_id, url, title, description, num_comments, date_posted, tag, related_posts, comments, photos, videos.

    For all data points, click here.

  • User Details: user_posted.

  • Community Details: community_name, community_url, community_description, community_members_num, community_rank.

  • Engagement Metrics: num_upvotes.

This API enables efficient retrieval of Reddit post information, including user engagement metrics, community details, and multimedia content, supporting advanced analysis and content tracking.

Discover by Keywords

This API allows users to discover Reddit posts by specific keywords, with options to filter by date and the number of posts to retrieve.

Input Parameters

keyword
string
required

The search term to find relevant posts.

date
string
required

The date to filter posts by, ensuring results fall within the specified timeframe.

num_of_posts
number

The number of posts to collect. If not provided, all matching posts are retrieved.

Output Structure
Includes comprehensive data points:

  • Post Details:
    post_id, url, user_posted, title, description, num_comments, date_posted, tag, related_posts, comments.

    For all data points, click here.

  • Community Details:
    community_name, community_url, community_description, community_members_num, community_rank.

  • Media Details:
    photos, videos.

This API enables users to efficiently discover and analyze Reddit posts related to specific keywords, providing valuable insights into community discussions, post popularity, and associated media content.

Discover by subreddit URL

This API allows users to retrieve posts from a specific subreddit using the subreddit URL, with an option to sort results based on specific criteria.

Input Parameters

URL
string
required

The URL of the subreddit to collect posts from.

sort_by
string

Determines the sorting method for the posts (e.g., new, top, hot).

Output Structure
Includes comprehensive data points:

  • Post Details:
    post_id, url, user_posted, title, description, num_comments, date_posted, tag, related_posts, comments.

    For all data points, click here.

  • Community Details:
    community_name, community_url, community_description, community_members_num, community_rank.

  • Media Details:
    photos, videos.

This API provides a streamlined way to explore and analyze posts within a subreddit, offering insights into post content, community dynamics, and associated media files. Perfect for monitoring subreddit activity or extracting post-level data for further analysis.

Comments API

Collect by URL

This API allows users to collect detailed comment data from a specific Reddit post or comment URL, with the option to filter comments based on the number of days since they were published.

Input Parameters

URL
string
required

The URL of the Reddit post or comment to retrieve comments from.

days_back
number

Collect all comments published no later than the specified number of days.

Output Structure
Includes comprehensive data points:

  • Comment Details:
    comment_id, user_posted, comment, date_posted, replies, num_upvotes, num_replies.

    For all data points, click here.

  • Post Details:
    post_url, post_id, post_language, post_state, post_type, images.

  • Community Details:
    community_name, community_url, community_description, community_members_num, community_rank.

  • Post Attributes:
    is_moderator, is_pinned, has_bot_in_username, is_locked, is_admin_post, is_archived_post, is_moderator_post, is_quarantined_post, is_not_safe_for_work_post, is_eligible_for_content_blocking_post, is_promoted_post.

This API provides comprehensive insights into Reddit comments and their associated posts, enabling users to analyze engagement, user activity, and content trends effectively.

Was this page helpful?